[Piglit] [PATCH 1/2] fbo-mipmap-copypix: Probe pixels before SwapBuffers
Ian Romanick
idr at freedesktop.org
Tue Jan 17 16:56:51 PST 2012
On 01/17/2012 04:27 PM, Eric Anholt wrote:
> 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?
I can, but what's the equivalent to glBindFramebuffer(GL_FRAMEBUFFER, 0)
for the -fbo case?
More information about the Piglit
mailing list