summaryrefslogtreecommitdiff
path: root/tests/fbo/fbo-mipmap-copypix.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2012-01-17 15:50:42 -0800
committerIan Romanick <ian.d.romanick@intel.com>2012-01-20 13:05:53 -0800
commitd635dceb3e28ab0910eddc29538ee30846142005 (patch)
treeabca3c3ea732641be7bfcb2dc9e6311477d7ff23 /tests/fbo/fbo-mipmap-copypix.c
parent97c940ea456ecbb197d8d5f4f2fa09e4fccd0b03 (diff)
fbo-mipmap-copypix: Probe pixels before SwapBuffers, make concurrent
Calling SwapBuffers may invalidate the back buffer, and the default read buffer is GL_BACK. Since the flashing lights don't help anyone, use piglit_present_results (and the piglit_winsys_fbo) to allow this test to run concurrently without a window. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'tests/fbo/fbo-mipmap-copypix.c')
-rw-r--r--tests/fbo/fbo-mipmap-copypix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/fbo/fbo-mipmap-copypix.c b/tests/fbo/fbo-mipmap-copypix.c
index 84f9f41cd..d94717616 100644
--- a/tests/fbo/fbo-mipmap-copypix.c
+++ b/tests/fbo/fbo-mipmap-copypix.c
@@ -182,7 +182,7 @@ test_mipmap_copypixels(GLenum srcIntFormat, GLenum dstIntFormat,
glDeleteFramebuffers(1, &fboSrc);
glDeleteFramebuffers(1, &fboDst);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
if (!pass)
return GL_FALSE;
@@ -205,8 +205,6 @@ test_mipmap_copypixels(GLenum srcIntFormat, GLenum dstIntFormat,
piglit_draw_rect_tex(0, 0, piglit_width, piglit_height,
0.0, 0.0, 1.0, 1.0);
- glutSwapBuffers();
-
p = piglit_probe_pixel_rgba(piglit_width/2, piglit_height/2, colors[level]);
if (!p) {
printf(" Mipmap level %d\n", level);
@@ -224,6 +222,8 @@ test_mipmap_copypixels(GLenum srcIntFormat, GLenum dstIntFormat,
}
size /= 2;
+
+ piglit_present_results();
}
glDisable(GL_TEXTURE_2D);