piglit/tests/glslparsertest/glsl2/invariant-05.vert has been failed since committed on July 1st, with either mesa master branch or glsl2 branch: It's expected to be compiled fail, but it gets compiled successfully. Tested on Piketon. invariant-05.vert: /* FAIL - * * From page 27 (page 33 of the PDF) of the GLSL 1.20 spec: * * "All uses of invariant must be at the global scope, and before any use * of the variables being declared as invariant." */ #version 120 void main() { gl_Position = gl_Vertex; } invariant gl_Position;
it still fails now.
If the IR were to maintain the source location of each variable's declarations and usages, the bugfix would not be difficult. With the IR's status quo, though, I don't see a good fix.
I marked the bug as assigned because I'm working a fix for this and some related issues.
Fixed by 48e81e3b9eb8b880cd702a4ca3237101e3bc6f2d (7.9) and aff41708493f9145c4f424e4b37e76978e78a1c4 (7.10).
verified
bug/show.html.tmpl processed on Mar 20, 2017 at 09:48:28. (provided by the Example extension).