Created attachment 126514 [details] Glmark2-es2 Jellyfish shader_test triggering the bug GLES 3.2 spec: https://www.khronos.org/registry/gles/specs/3.2/GLSL_ES_Specification_3.20.pdf States following in "4.7.4 Default Precision Qualifiers": -------------------------------------------- Non-precision qualified declarations will use the precision qualifier specified in the most recent precision statement that is still in scope. The precision statement has the same scoping rules as variable declarations. ... *Multiple precision statements for the same basic type can appear inside the same scope, with later statements overriding earlier statements within that scope.* ... " All languages except for the fragment language have the following predeclared globally scoped default precision statements: precision highp float; ... The fragment language has no default precision qualifier for floating point types. Hence for float, floating point vector and matrix variable declarations, either the declaration must include a precision qualifier or the default float precision must have been previously declared. -------------------------------------------- Check for latter was added with bug 60737, but precision overriding doesn't seem to work. Attached Glmark2 shader test fails to Mesa bug 97532. Vertex shader float uniform defaults to highp, and same should happen in fragment shader, however, that happens only if the first precision statement in shader is removed, as only then it will pass the linker check. I.e. precision overriding doesn't work.
GL 4.5 GLSL spec: https://www.opengl.org/registry/doc/GLSLangSpec.4.50.pdf Says the same in "4.7.3 Default Precision Qualifiers": "Multiple precision statements for the same basic type can appear inside the same scope, with later statements overriding earlier statements within that scope."
I wrote a piglit test that reproduces the failure: https://lists.freedesktop.org/archives/piglit/2016-October/021103.html And sent a couple of patches to fix it in Mesa: https://lists.freedesktop.org/archives/mesa-dev/2016-October/132772.html
Piglit test and Mesa fix pushed: commit 0e742926c6895dcaf8bdbe43022c8a0bc74fdd96 Author: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Date: Fri Oct 21 08:23:59 2016 +0200 glsl: update default precision qualifier when it is set in the shader
Verified. "glmark2-es2 -b jellyfish" works now, and old versions of terrain & ideas tests fail as expected.
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.