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

Anuj Phogat anuj.phogat at gmail.com
Mon Apr 28 10:08:55 PDT 2014


On Fri, Apr 25, 2014 at 6:06 PM, Eric Anholt <eric at anholt.net> wrote:
> 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.

I agree. Will make the changes before pushing the patch.


More information about the Piglit mailing list