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

Submitted by Brian Paul on June 18, 2014, 2:21 p.m.

Details

Message ID 1403101270-31053-1-git-send-email-brianp@vmware.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Brian Paul June 18, 2014, 2:21 p.m.
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(+)

Patch hide | download patch | download mbox

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);