Ian Romanick <[email protected]> writes: > From: Ian Romanick <[email protected]> > > Set the scissor rectangle for all of the possible viewports to different > values, and verify that only the scissor rectangle for viewport 0 > affects the clear. > > Signed-off-by: Ian Romanick <[email protected]> > --- > tests/all.py | 1 + > tests/spec/arb_viewport_array/CMakeLists.gl.txt | 1 + > tests/spec/arb_viewport_array/clear.c | 84 > +++++++++++++++++++++++++ > 3 files changed, 86 insertions(+) > create mode 100644 tests/spec/arb_viewport_array/clear.c > > diff --git a/tests/all.py b/tests/all.py > index f81765c..abadb1f 100644 > --- a/tests/all.py > +++ b/tests/all.py > @@ -2140,6 +2140,7 @@ arb_viewport_array['minmax'] = > concurrent_test('arb_viewport_array-minmax') > arb_viewport_array['render-viewport'] = > concurrent_test('arb_viewport_array-render-viewport') > arb_viewport_array['render-depthrange'] = > concurrent_test('arb_viewport_array-render-depthrange') > arb_viewport_array['render-scissor'] = > concurrent_test('arb_viewport_array-render-scissor') > +arb_viewport_array['clear'] = PlainExecTest(['ab_viewport_array-clear', > '-auto', '-fbo'])
s/ab/arb/. Also, -fbo but not concurrent_test seems weird.
> +enum piglit_result
> +piglit_display(void)
> +{
> + static const float expected[] = {
> + 0.f, 1.f, 0.f, 1.f
> + };
"0.f" and "0." read weird to me (I write "0" or "0.0", but usually just
"0"), but I don't feel strongly about it.
> + glDisable(GL_SCISSOR_TEST);
> + glClearColor(0., 0., 0., 0.);
> + glClear(GL_COLOR_BUFFER_BIT);
> +
> + glScissorIndexed(0, 0, 0, piglit_width, piglit_height);
> + glEnablei(GL_SCISSOR_TEST, 0);
> +
> + for (i = 1; i < num_viewports; i++) {
> + glEnablei(GL_SCISSOR_TEST, i);
> + glScissorIndexed(i,
> + 0, i * slice_height,
> + piglit_width, slice_height);
> + }
> +
> + glClearColor(0., 1., 0., 1.);
> + glClear(GL_COLOR_BUFFER_BIT);
The other one I wonder about is what if the scissor rect for 0 is set to
something small, and 0 is disabled but 1..n are enabled.
But this test itself, with the all.py fixed, is:
Reviewed-by: Eric Anholt <[email protected]>
pgpKTXzDKTZP0.pgp
Description: PGP signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
