[Piglit] [PATCH 1/2] fbo-mipmap-copypix: Probe pixels before SwapBuffers
Eric Anholt
eric at anholt.net
Tue Jan 17 16:27:39 PST 2012
On Tue, 17 Jan 2012 16:00:41 -0800, "Ian Romanick" <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Calling SwapBuffers may invalidate the back buffer, and the default
> read buffer is GL_BACK. Don't call SwapBuffers at all of -auto is
> used. The flashing lights don't help anyone.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> tests/fbo/fbo-mipmap-copypix.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/fbo/fbo-mipmap-copypix.c b/tests/fbo/fbo-mipmap-copypix.c
> index 84f9f41..af2fe48 100644
> --- a/tests/fbo/fbo-mipmap-copypix.c
> +++ b/tests/fbo/fbo-mipmap-copypix.c
> @@ -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,9 @@ test_mipmap_copypixels(GLenum srcIntFormat, GLenum dstIntFormat,
> }
>
> size /= 2;
> +
> + if (!piglit_automatic)
> + glutSwapBuffers();
If you're going to check for automatic here, care to just use
piglit_present_results() and make it concurrent?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120117/b7a8d253/attachment.pgp>
More information about the Piglit
mailing list