[Piglit] window size issues on Windows

Eric Anholt eric at anholt.net
Tue Jun 21 16:20:43 PDT 2011


On Tue, 21 Jun 2011 16:05:31 -0600, Brian Paul <brianp at vmware.com> wrote:
> 
> I was looking into some piglit failures on Windows today.
> 
> One thing common among the failing tests is an initial window size of 
> 100x100.
> 
> It looks like width=100 is too small for Win7 to draw the window title 
> bar w/ buttons, etc. so Windows resizes the window to 116x100.
> 
> When this happens, the reshape() callback in piglit-framework.c is 
> called and it updates the piglit_width and piglit_height vars and 
> calls glViewport() with the new dimensions.
> 
> However, the ortho projection used by these tests isn't updated.
> 
> piglit_ortho_projection() is typically called in the test's 
> piglit_init() function.  That happens before the resize so when we get 
> to piglit_display() the ortho projection doesn't reflect the current 
> window size.
> 
> I think there's two possible, easy fixes:
> 
> 1. Call piglit_ortho_projection() in the piglit_display() function 
> instead of in the piglit_init() function.
> 
> 2. Use a larger initial window size.  Maybe define 
> PIGLIT_DEFAULT_WIDTH=150 and PIGLIT_DEFAULT_HEIGHT=150 and use those 
> values when initializing piglit_width/height.
> 
> I think I prefer (1) since it would allow the test to work properly if 
> the user resizes the window.

Agreed on 1) where possible.  But you're going to get failures anyway
because a lot of tests aren't actually ready for size changes even then.

I'd object to 2).  We've already got too many tests that take up
gratuitous amounts of screen real estate for people testing on their
development systems.  While I like the visible results of tests that we
do for debugging, giant 100x100 green isn't better visualization than
30x30 green for most tests.

I'd love to see us dump glut for window-system-specific code, which
should let you tell Windows to knock it off, for example, but that's a
way bigger project.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20110621/26b1616e/attachment.pgp>


More information about the Piglit mailing list