[Piglit] [PATCH] Fix expected behavior of glBlitFramebuffer() with conditional rendering

Eric Anholt eric at anholt.net
Fri Apr 25 18:06:13 PDT 2014


Anuj Phogat <anuj.phogat at gmail.com> writes:

> It is clarified on page 679 of OpenGL 4.4 core profile spec:
>    "Added BlitFramebuffer to commands affected by conditional
>     rendering in section 10.10 (Bug 9562)."
>
> This addition is also made to OpenGL 4.4 compatibility profile spec.
>
> Tests the bug fix made in mesa commits 1d350b9 and 8ed42dd:
> "i965: Add glBlitFramebuffer to commands affected by conditional
> rendering"
>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  tests/spec/nv_conditional_render/blitframebuffer.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/tests/spec/nv_conditional_render/blitframebuffer.c b/tests/spec/nv_conditional_render/blitframebuffer.c
> index 6d83316..c410973 100644
> --- a/tests/spec/nv_conditional_render/blitframebuffer.c
> +++ b/tests/spec/nv_conditional_render/blitframebuffer.c
> @@ -27,11 +27,11 @@
>  /**
>   * @file blitframebuffer.c
>   *
> - * Tests that conditional rendering does not affect glBlitFramebuffer().
> + * Tests that conditional rendering also affects glBlitFramebuffer().
>   *
> - * It's something that would be likely to be implemented through
> - * normal rendering inside of the driver, and thus easy to
> - * accidentally disable during conditional rendering.
> + * It is clarified on page 679 of OpenGL 4.4 spec:
> + *    "Added BlitFramebuffer to commands affected by conditional rendering in
> + *     section 10.10 (Bug 9562)."
>   */
>  
>  PIGLIT_GL_TEST_CONFIG_BEGIN
> @@ -112,7 +112,7 @@ piglit_display(void)
>  	glBeginQuery(GL_SAMPLES_PASSED, q);
>  	glEndQuery(GL_SAMPLES_PASSED);
>  
> -	/* This should not be affected by conditional rendering. */
> +	/* This should be affected by conditional rendering. */
>  	glBeginConditionalRenderNV(q, GL_QUERY_WAIT_NV);
>  	blit_window_to_tex(texture, piglit_width, piglit_height / 2);
>  	glEndConditionalRenderNV();
> @@ -123,8 +123,9 @@ piglit_display(void)
>  			     0, 0, 1, 1);
>  	glDisable(GL_TEXTURE_2D);
>  
> -	pass = piglit_probe_rect_rgba(0, 0, piglit_width, piglit_height,
> -				      green);
> +	pass = piglit_probe_rect_rgba(0, piglit_width / 2,
> +				      piglit_width, piglit_height / 2,
> +				      red);
>  
>  	piglit_present_results();

I'd prefer to keep things as "success is a screen full of green".  I
think that should just be a matter of doing blit_window_to_tex from
the green half of the window instead of the red half.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140425/6f4ee942/attachment-0001.sig>


More information about the Piglit mailing list