[Piglit] [PATCH] Fix swapbuffers timing in arb_seamless_cubemap test.
Brian Paul
brian.e.paul at gmail.com
Tue Aug 7 06:55:53 PDT 2012
On Tue, Aug 7, 2012 at 3:11 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 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;
> }
>
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the Piglit
mailing list