<div dir="ltr">On 20 February 2013 11:32, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5">Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> writes:<br>
<br>
> On 18 February 2013 11:50, Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>> wrote:<br>
><br>
>> Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> writes:<br>
>><br>
>> > On 18 February 2013 07:53, Michel Dänzer <<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>> wrote:<br>
>> ><br>
>> >> On Don, 2013-02-14 at 08:50 -0800, Paul Berry wrote:<br>
>> >> > Previously, both shader_runner and glslparsertest contained switch<br>
>> >> > statements that attempted to choose a GL version for testing based on<br>
>> >> > a GLSL version requirement, and those switch statements didn't choose<br>
>> >> > a GL version very accurately (for example, they converted GLSL version<br>
>> >> > 1.50 to GL version 3.1, which doesn't work).<br>
>> >> ><br>
>> >> > This patch replaces the switch statements with a single common<br>
>> >> > function (in piglit-util-gl-common) that does the right thing.<br>
>> >><br>
>> >> This change caused quick-driver.tests to skip more than 2000 tests on<br>
>> >> radeonsi (GL 2.1, GLSL 1.2). Almost all of the skipped tests were<br>
>> >> previously passing.<br>
>> >><br>
>> >> Was this intended?<br>
>> >><br>
>> ><br>
>> > No, this wasn't expected, and probably indicates a bug in the driver.<br>
>> ><br>
>> > The specific behavioural change in Piglit is that previously, when<br>
>> running<br>
>> > a test that required GLSL 1.20, Piglit would request (via Waffle) a GL<br>
>> 1.0<br>
>> > context.  Then it would query the context to see if it supported GLSL<br>
>> > 1.20.  After this patch, when running a test that requires GLSL 1.20,<br>
>> > Piglit requests a GL 2.1 context, and then skips if a GL 2.1 context<br>
>> can't<br>
>> > be created.  On an implementation that supports GL 2.1 and GLSL 1.20,<br>
>> both<br>
>> > methods should yield the same results.<br>
>><br>
>> But what about an implementation that does GLSL 1.20 but not GL 2.1?  Or<br>
>> GLSL 1.30 but not all of GL 3.1?<br>
>><br>
><br>
> I assume you meant to say "Or GLSL 1.30 but not all of GL 3.0?"  In other<br>
> words, you want to be able to test implementations that support a<br>
> higher-numbered GLSL version than what is required by the GL version that<br>
> they support.  I can definitely see the value in this, especially because<br>
> when we're developing support for the next version of GLSL in Mesa, we<br>
> often use MESA_GLSL_VERSION_OVERRIDE=xxx to switch on support for that GLSL<br>
> version, and it's nice to be able to do that without having to override the<br>
> GL version too.<br>
><br>
> On the other hand, I also want to be able to test implementations that<br>
> require core contexts in order to get at more recent GL/GLSL features (such<br>
> as Apple and Mesa/i965), as well as implementations that return only the<br>
> level of GL support that was requested (such as nVidia).  This is<br>
> especially important for the geometry shader tests I've just introduced,<br>
> because at the moment the only implementation available to me for<br>
> validating those tests is an nVidia system.<br>
><br>
> Unfortunately, it's impossible to meet all those requirements without a<br>
> more significant change to piglit.  Consider the case where we're tesitng<br>
> GLSL 1.50.  What type of context should Piglit attempt to create?<br>
><br>
> - If it attempts to create a GL 1.0 through GL 2.1 context, then the test<br>
> won't run on Apple, because we'll get a compatibility context, and Apple<br>
> doesn't support GLSL 1.50 with compatibility functionality.<br>
><br>
> - If it attempts to create a GL 1.0 through GL 3.0 context, then the test<br>
> won't run on Mesa/i965, because we'll get a compatibility context, and<br>
> we're not planning for Mesa/i965 to support GLSL 1.50 with compatibility<br>
> functionality.<br>
><br>
> - If it attempts to create a GL 1.1 through GL 3.1 context, then the test<br>
> won't run on nVidia, because on nVidia's implementation, if you request GL<br>
> version N, you get only the features required by GL version N and no<br>
> higher-numbered features.<br>
><br>
> - If it attempts to create a GL 3.2 context, then the test won't run on<br>
> implementations that support GLSL 1.50 but not GL 3.2.<br>
><br>
> Given that we have to sacrifice something, it seems to me that the least<br>
> bad alternative is to sacrifice implementations that support a higher GLSL<br>
> version than required by their GL version, because such an ability is rare<br>
> (outside our internal development of Mesa) and unlikely to be taken<br>
> advantage of by client programs.  The downside, of course, is that we have<br>
> to go some extra work when we're doing internal develpoment of a new GLSL<br>
> version.<br>
<br>
</div></div>The thing I'd prefer to sacrifice is testing of closed source drivers --<br>
piglit is a tool for Mesa development, and we should prefer testing Mesa<br>
over testing other things.  If hacks are needed for developing tests on<br>
other drivers first, do so locally, but don't regress Mesa testing.<br>
</blockquote></div><br></div><div class="gmail_extra">I was initially skeptical about this, but I may be coming around.  A few days ago I thought that supporting a higher GLSL version than required by the GL version was limited to internal Mesa development, but I've since learned that (a) softpipe supports GL 2.1 and GLSL 1.30, and (b) it's been suggested that adding GLSL 1.30 support to i965 Gen5 might be sufficient to address <a href="https://bugs.freedesktop.org/show_bug.cgi?id=59187">https://bugs.freedesktop.org/show_bug.cgi?id=59187</a>.<br>
</div></div>