[Mesa-dev] [PATCH] glsl: allow ForceGLSLVersion to override #version directives

Brian Paul brianp at vmware.com
Fri Mar 27 12:00:26 PDT 2015


On 03/27/2015 12:49 PM, Ilia Mirkin wrote:
> On Fri, Mar 27, 2015 at 2:44 PM, Brian Paul <brianp at vmware.com> wrote:
>>
>> The Geeks3d GpuTest GiMark test for Windows has several shaders with
>> #version 330 that don't actually use any 3.30 features.  Other shaders in
>> the test use #version 130.  Furthermore, when a context is created, only a
>> 3.0 context is requested.  We don't support GL 3.0 w/ 3.30 shaders but if I
>> override the #version 330 with 130 then everything works fine.
>
> That's incredibly annoying. Well your patch looks like it'll work as
> advertised, so
>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
>
> But perhaps leave it on the list for a bit in case there are
> dissenting opinions on the actual functionality?

Sure, no problem.

The sad reality is that Windows OpenGL apps are pretty sloppy/buggy when 
it comes to choosing the right OpenGL context version/profile and shader 
versions.  We have quite a few work-arounds in our in-house code to 
allow these apps to run.  If we don't do that, we get bug reports and 
negative comments from product reviewers.

The problem is the Windows nvidia/amd/intel drivers are often more lax 
than Mesa about version/extension checking.  Also, the nvidia/amd/intel 
drivers support compat profile with OpenGL 3.2+ so a lot of those apps 
don't have any consideration of core vs. compat profile issues.  It's an 
ongoing headache.

-Brian



More information about the mesa-dev mailing list