[Piglit] [PATCH] arb_uniform_buffer_object/maxblocks: use larger window, set viewport
Brian Paul
brianp at vmware.com
Fri Jul 18 14:22:14 PDT 2014
Commit 42d2fdf changed the test to use the default window size. But
even before that, the window was too small for common values of
GL_MAX_VERTEX/FRAGMENT/COMBINED_UNIFORM_BLOCKS so we skipped some
testing.
Now use a larger window and call glViewport() so that if we resize
the window we don't blow up.
Finally, print a warning if the window is too small in the future.
---
tests/spec/arb_uniform_buffer_object/maxblocks.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/spec/arb_uniform_buffer_object/maxblocks.c b/tests/spec/arb_uniform_buffer_object/maxblocks.c
index 688cae1..c520e74 100644
--- a/tests/spec/arb_uniform_buffer_object/maxblocks.c
+++ b/tests/spec/arb_uniform_buffer_object/maxblocks.c
@@ -48,6 +48,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
+ config.window_width = 800;
+ config.window_height = 100;
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
@@ -195,6 +197,10 @@ test_draw(int y_index, GLuint prog,
int i;
float *expected_color;
+ assert(test_block < active_blocks);
+
+ glViewport(0, 0, piglit_width, piglit_height);
+
expected_color = other_colors[test_block % ARRAY_SIZE(other_colors)];
for (i = 0; i < active_blocks; i++) {
@@ -212,6 +218,7 @@ test_draw(int y_index, GLuint prog,
if (screen_x + screen_w >= piglit_width ||
screen_y + screen_h >= piglit_height) {
+ printf("warning: window too small to display test rect.\n");
return true;
}
--
1.7.10.4
More information about the Piglit
mailing list