<div class="gmail_quote">On 23 August 2012 17:27, Chris Forbes <span dir="ltr"><<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello<br>
<br>
I sent in a pile of random patches some time ago working toward having<br>
more of the tests support -fbo. This is important on WMs which don't<br>
give you the size you ask for [pretty much any tiling WM].<br></blockquote><div><br></div><div>Sorry I didn't notice those.  I will try to keep a better eye out for your upcoming patches.  I am definitely in favor of this idea--even for those of us who don't use tiling WMs, the tests that support -fbo run much faster, since they can run concurrently and they don't tie up GPU time in the compositor.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
I realize that was a bit chaotic, so I'm starting over, making the<br>
following changes:<br>
<br>
- glutSwapBuffers gets replaced with piglit_present_results, and moved<br>
to the right place if it's somewhere odd [there's a couple of cases<br>
where pixels get read after the buffer swap, which seems bogus].<br></blockquote><div><br></div><div>This sounds like a good idea, and yes, reading pixels after glutSwapBuffers is definitely bogus (in most cases it will lead to undefined results and hence sporadic failures)--I didn't realize we still had any tests that did that.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
- unguarded glutKeyboardFunc moved to being consistently conditional<br>
on !piglit_automatic. In most cases there is already a suitable block<br>
because the test emits some keyboard instructions in non-automatic<br>
mode<br></blockquote><div><br></div><div>BTW, we are hoping to reduce the use of glutKeyboardFunc as much as possible because it gets in the use of Waffle, so if you happen to notice some opportunities to get rid of glutKeyboardFunc entirely (or at least take some steps in that direction), feel free.</div>
<div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
- use of glutReshapeFunc converted to appropriate piglit_*_projection<br>
in piglit_display<br></blockquote><div><br>Are you talking about adding calls to the piglit_*_projection functions, or simply moving the existing calls from the reshape functions to piglit_display so that the reshape functions can be removed?  I'm definitely in favor of the latter.  But adding piglit_*_projection function calls is problematic because those functions rely on deprecated functionality, and we're trying as much as possible to reduce Piglit's dependence on deprecated functionality so that we can start testing GLES 2.0, GLES 3.0, and forward compatible contexts.<br>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
And some tidiness things:<br>
<br>
- spurious glFlush/glFinish removed<br>
<br>
- raw glReadPixels converted to piglit_probe_*<br>
<br>
- handrolled version checks converted to piglit_require_gl_version<br></blockquote><div><br>These all sound like good ideas.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<br>
Things I've yet to tackle:<br>
<br>
- there's a few random tests which don't use the framework at all<br>
(texline is particularly weird, unused and perhaps just broken now?)<br></blockquote><div><br>I would love to see these tests modernized.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

- glean tests -- it would be nice if these could be run offscreen, but<br>
will take some more doing<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- it seems that the testrunner can jam at the end of the run, in some<br>
rare cases. This gets worse with more concurrent tests.<br>
- the choice of projections varies wildly between tests<br>
<br>
Will follow up with actual patches shortly, and would appreciate<br>
feedback on whether this is a sensible thing to do / traps / how to do<br>
this for glean / etc.<br></blockquote><div><br>Cool.  Looking forward to it.<br><br>BTW, not to derail your plans (since I like the direction you're headed), but there's another possible approach that might deal with the tiling WM problems with a lot less effort.  Assuming the problem we are trying to address is the WM giving us a larger window than we requested*, what if we change the default resize function so that instead of updating piglit_width, piglit_height, and the viewport, it leaves them unchanged?  The vast majority of tests should still work in this case; they just won't render to the entire window anymore.<br>
<br>*I think this is a safe assumption because most (all?) tests that use a large window do so because they actually *need* that many pixels to do the test they are trying to do.  In which case, if the WM gives them a smaller size than they request, we're screwed anyway.  In fact, maybe what we should do in this case is just have the default resize function print out a message explaining that the window wasn't big enough to do the test, and exit with a PIGLIT_WARN.  And then when we run into those warnings, we should think about reducing the window size requirements of those tests.<br>

</div></div>