[Piglit] [PATCH] fbo-missing-attachment-blit: make sure the viewport is, properly initialized.

Morgan Armand morgan.devel at gmail.com
Tue Nov 8 13:18:10 PST 2011


On 11/8/2011 3:17 AM, Eric Anholt wrote:
> On Mon, 07 Nov 2011 09:46:15 -0800, Ian Romanick <idr at freedesktop.org> wrote:
>> On 11/06/2011 02:35 PM, Morgan Armand wrote:
>>> This test reports failure on my computer because the test is launched from piglit_init, before the viewport has a chance
>>> to be setup correctly. This patch resolve the problem (but maybe the right thing to do is to move the whole test into
>>> piglit_display).
>>
>> I didn't have the test run from piglit_display because it doesn't 
>> display anything. :)  I think this change is correct either way.  The 
>> OpenGL 3.0 spec says:
>>
>>      "In the initial state, w and h are set to the width and height,
>>      respectively, of the window into which the GL is to do its
>>      rendering. If the default framebuffer is bound but no default
>>      framebuffer is associated with the GL context (see chapter 4),
>>      then w and h are initially set to zero. ox and oy are set to
>>      w/2 and h/2, respectively."
>>
>> It makes no mention of a default viewport setting for an FBO.
>>
>> This patch is
>>
>> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> 
> The first/only glXMakeCurrent() occurred on a window of size
> piglit_width, piglit_height though.  It just wasn't a mapped window, but
> I don't think that ought to matter.

Thank you both for your precisions. I made some tests in order to try clear
things up and the problem is definitely related to Windows and tiny-sized windows.
Because of the title bar and the buttons, the window will be created with a larger width.
The patch just fix a part of the problem, but I'm not sure how to treat it correctly.


More information about the Piglit mailing list