[Piglit] [PATCH] pbo-readpixels-small: restore 2x2 window size, report SKIP for other sizes

Brian Paul brianp at vmware.com
Wed Jun 18 07:21:10 PDT 2014


This test requires a 2x2 window size- it's not just the glReadPixels(2x2)
that matters.
---
 tests/general/pbo-readpixels-small.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/general/pbo-readpixels-small.c b/tests/general/pbo-readpixels-small.c
index 900a929..9f2f338 100644
--- a/tests/general/pbo-readpixels-small.c
+++ b/tests/general/pbo-readpixels-small.c
@@ -41,6 +41,9 @@
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
+
+	config.window_width = 2;
+	config.window_height = 2;
 	config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
 
 PIGLIT_GL_TEST_CONFIG_END
@@ -66,6 +69,12 @@ piglit_display(void)
 	uint32_t *addr;
 	GLuint pbo;
 
+	if (piglit_width != 2 || piglit_height != 2) {
+		printf("Test requires 2x2 window, found %dx%d\n",
+		       piglit_width, piglit_height);
+		piglit_report_result(PIGLIT_SKIP);
+	}
+
 	glClearColor(0.0, 0.0, 0.0, 0.0);
 	glClear(GL_COLOR_BUFFER_BIT);
 
-- 
1.7.10.4



More information about the Piglit mailing list