[Piglit] default piglit window size change
Eric Anholt
eric at anholt.net
Sun Nov 4 12:11:45 PST 2012
Brian Paul <brianp at vmware.com> writes:
> On 11/02/2012 10:52 AM, Paul Berry wrote:
>> On 2 November 2012 09:32, Brian Paul <brianp at vmware.com
>> <mailto:brianp at vmware.com>> wrote:
>>
>>
>> I think I've brought this up in the past. On Windows, the minimum
>> width of a window is 116 pixels (at least in my current Win7
>> setup). A lot of piglit tests create 100x100 pixels and when
>> piglit creates the window, Win7 resizes it to 116x100. The
>> framework code detects this change and reports:
>>
>> Got spurious window resize in automatic run (100,100 to 116,100)
>> PIGLIT: {'result': 'warn'}
>>
>> So a bunch of tests get the 'warn' result instead of being run
>> properly. I think this changed at some point during the recent
>> framework/waffle overhaul.
>>
>> My proposal for this is to set a default window size of 150x150 in
>> the piglit-framework-gl.h header:
>>
>> --- a/tests/util/piglit-framework-__gl.h
>> +++ b/tests/util/piglit-framework-__gl.h
>> @@ -216,6 +216,13 @@ piglit_gl_test_run(int argc, char *argv[],
>>
>> \
>> config.init = piglit_init; \
>> config.display = piglit_display; \
>> + \
>> + /* Default window size. Note: Win7's min window
>> width */ \
>> + /* seems to be 116 pixels. When the window size
>> is */ \
>> + /* unexpectedly resized, tests are marked as
>> "WARN". */ \
>> + /* Let's use a larger default to avoid that. */
>> \
>> + config.window_width = 150; \
>> + config.window_height = 150;
>>
>> #define PIGLIT_GL_TEST_CONFIG_END \
>>
>>
>> And then remove these config lines from a bunch of tests:
>>
>> config.window_width = 100;
>> config.window_height = 100;
>>
>> Of course, I'll have to inspect these tests to make sure they
>> don't rely on that specific window size, but I bet few if any of
>> them do.
>>
>> This change fixes things here.
>>
>> Sound OK?
>>
>> -Brian
>>
>>
>> Sounds reasonable to me. I like the idea of having a default window
>> size, since a lot of piglit tests just paint the whole window with the
>> same color, so for those tests the size is pretty much irrelevant :)
>
> And there's quite a few tests that don't draw anything at all.
>
> I'll post my first batch of patches soon. There'll be more as I get time.
I don't like how this turned out, really. On our side, we'd like to see
tests that don't care about size rendered to smaller buffers, since we
run tests under simulation for HW bringup. I don't like losing the
information that the test author had about requested size, even though
in many cases the author just copy and pasted.
There are two things I'd like to see done with regards to test size:
- Have a "I don't draw anything" flag (or maybe just ask for 1x1) in
tests that don't need the window system buffer.
- Convert the remaining tests that aren't specific to window system
buffer interactions to run with an FBO as the framebuffer. This
avoids window systems (including gnome-shell) screwing with our window
size, and should improve performance slightly if we take advantage of
surfaceless contexts. Now that swapbuffers has been replaced, I think
this should be easy.
-------------- 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/20121104/c3bc388e/attachment.pgp>
More information about the Piglit
mailing list