[Piglit] [PATCH] Fix swapbuffers timing in arb_seamless_cubemap test.
Kenneth Graunke
kenneth at whitecape.org
Tue Aug 7 02:11:17 PDT 2012
Prior to this patch, the test would:
1. Draw into the back buffer.
2. glutSwapBuffers
3. Read/probe pixel values...from what used to be the front buffer?
This patch moves the SwapBuffers to after the probing, which should
ensure that draws and reads use the same buffer. It also switches
from glutSwapBuffers to piglit_present_results().
This may help with bug #46212.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46212
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c b/tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c
index 182ab2d..63de8de 100644
--- a/tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c
+++ b/tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c
@@ -70,13 +70,13 @@ enum piglit_result piglit_display(void)
draw_quad(100, 10, 1, 0, 0.99);
glDisable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
- glutSwapBuffers();
-
pass = piglit_probe_pixel_rgb(20, 20, colors[4]) && pass;
pass = piglit_probe_pixel_rgb(50, 20, colors[0]) && pass;
pass = piglit_probe_pixel_rgb(80, 20, violet) && pass;
pass = piglit_probe_pixel_rgb(110, 20, violet) && pass;
+ piglit_present_results();
+
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
--
1.7.11.4
More information about the Piglit
mailing list