[Piglit] [PATCH] arb_uniform_buffer_object/maxblocks: use larger window, set viewport
Matthew McClure
mcclurem at vmware.com
Fri Jul 18 14:42:56 PDT 2014
Reviewed-by: Matthew McClure <mcclurem at vmware.com>
________________________________________
From: Piglit <piglit-bounces at lists.freedesktop.org> on behalf of Brian Paul <brianp at vmware.com>
Sent: Friday, July 18, 2014 2:22 PM
To: piglit at lists.freedesktop.org
Subject: [Piglit] [PATCH] arb_uniform_buffer_object/maxblocks: use larger window, set viewport
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
_______________________________________________
Piglit mailing list
Piglit at lists.freedesktop.org
https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/piglit&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=Vlukj7htlXQOYRouhHnZbWXYcQvOJnTLOoZzNyO4nxE%3D%0A&m=FDegIQSaCR652c6fXJRT9WpLpQSOBUSHRpGQjx4O0Os%3D%0A&s=824dc741a0a37468cd6979d65bf2f7f760020393423e8ef1ebb5b5e1e5d973e8
More information about the Piglit
mailing list