[Piglit] [PATCH 1/2] glx-tfp: Swap after checking results.

Eric Anholt eric at anholt.net
Wed Jun 1 12:18:57 PDT 2011


Fixes failures under a compositing wm due to readback of undefined values.
---
 tests/glx/glx-tfp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/glx/glx-tfp.c b/tests/glx/glx-tfp.c
index 45a7963..db7f94c 100644
--- a/tests/glx/glx-tfp.c
+++ b/tests/glx/glx-tfp.c
@@ -174,11 +174,11 @@ draw(Display *dpy)
 	draw_pixmap(rgb_pixmap, rgb_x, rgb_y, draw_w, draw_h);
 	draw_pixmap(rgba_pixmap, rgba_x, rgba_y, draw_w, draw_h);
 
-	glXSwapBuffers(dpy, win);
-
 	pass &= check_results(GL_FALSE, rgb_x, rgb_y, draw_w, draw_h);
 	pass &= check_results(GL_TRUE, rgba_x, rgba_y, draw_w, draw_h);
 
+	glXSwapBuffers(dpy, win);
+
 	return pass ? PIGLIT_PASS : PIGLIT_FAIL;
 }
 
-- 
1.7.5.1



More information about the Piglit mailing list