[Piglit] [PATCH 1/3] ext_transform_feedback: use default window size for interleaved test

Brian Paul brianp at vmware.com
Wed Jun 4 07:39:51 PDT 2014


This test has a hard-coded array of expected results which assume
a 64 x 32 window.  Now the window size can be anything but we
explicitly set up the projection matrix for a 64 x 32 region.
---
 tests/spec/ext_transform_feedback/interleaved.c |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/tests/spec/ext_transform_feedback/interleaved.c b/tests/spec/ext_transform_feedback/interleaved.c
index ad7c7f9..d061344 100644
--- a/tests/spec/ext_transform_feedback/interleaved.c
+++ b/tests/spec/ext_transform_feedback/interleaved.c
@@ -32,9 +32,6 @@
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
-
-	config.window_width = 64;
-	config.window_height = 32;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
 
 PIGLIT_GL_TEST_CONFIG_END
@@ -161,8 +158,18 @@ enum piglit_result piglit_display(void)
 
 	glClear(GL_COLOR_BUFFER_BIT);
 
-	/* Render into TFBO. */
+	/* Setup projection for a 64 x 32 window region.  That's what
+	 * the expected coords above assume.
+	 * XXX it would be better if the position coords in the above
+	 * array were compute instead of fixed.
+	 */
+	glMatrixMode(GL_PROJECTION);
+	glLoadIdentity();
+	glOrtho(0, 64, 0, 32, -1, 1);
+	glMatrixMode(GL_MODELVIEW);
 	glLoadIdentity();
+
+	/* Render into TFBO. */
 	glUseProgram(prog);
 	glEnable(GL_RASTERIZER_DISCARD);
 	glBeginTransformFeedback(GL_TRIANGLES);
-- 
1.7.10.4



More information about the Piglit mailing list