Unfortunately some developers still don't seem to read the specifications and write code that should not work. For example if no #version is set in shaders, according to spec glsl version 1.10 is assumed. I would like a way to override that behavior. There are already two variables related to that: force_glsl_extensions_warn MESA_GLSL_VERSION_OVERRIDE but as far as I am aware the first doesn't help with syntax changes like arrays as out or inout parameters and the second does apparently not influence what the compiler will assume when no #version is set. An example of a shader that can not be compiled with force_glsl_extensions_warn=true MESA_GLSL_VERSION_OVERRIDE=130 would be this one: void a(inout vec4 b[1]) {} Some time ago this was on the mailing list, but rejected because for several reason that was the wrong place and way to do it: http://lists.freedesktop.org/archives/mesa-dev/2012-August/026022.html
For Gallium drivers, there's a driconf option: force_glsl_version=130 Does that not do what you want? (It looks like i965 doesn't support it, but it probably ought to...)
For gallium drivers it actually does what I want. But I did not find it with google (14 results...) and of course I neglected looking into driconf. Could it be added to http://www.mesa3d.org/envvars.html? (it does seem to work as a variable with force_glsl_version=130) If this was added to i965 I would be completely happy. And if the compiler behaves differently for different drivers, would it be possible to make mesa/src/glsl/glsl_compiler work with DRI_PRIME too?
(In reply to Christoph Haag from comment #2) > For gallium drivers it actually does what I want. But I did not find it with > google (14 results...) and of course I neglected looking into driconf. > > Could it be added to http://www.mesa3d.org/envvars.html? (it does seem to > work as a variable with force_glsl_version=130) > > If this was added to i965 I would be completely happy. > > And if the compiler behaves differently for different drivers, would it be > possible to make mesa/src/glsl/glsl_compiler work with DRI_PRIME too? The release notes say this was added to i965 in 13.0.6 so closing.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.