mesa: 1a93e7690dc90211164082d6a2d26d93da8127ef (master 10.6.0-devel) $ ./bin/glslparsertest tests/spec/glsl-1.50/compiler/invariant-qualifier-in-out-block-01.vert pass 1.50 Failed to compile vertex shader tests/spec/glsl-1.50/compiler/invariant-qualifier-in-out-block-01.vert: 0:10(1): error: invariant qualifiers cannot be used with interface blocks members Shader source: // [config] // expect_result: pass // glsl_version: 1.50 // [end config] // // Tests that the invariant qualifier can be applied to a member of an out block. #version 150 out block { invariant vec4 x; }; void main() { } PIGLIT: {"result": "fail" } fe1e89a026fb85cc7dffbd3f967687186796631e is the first bad commit commit fe1e89a026fb85cc7dffbd3f967687186796631e Author: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Date: Tue Nov 25 14:03:05 2014 +0100 glsl: don't allow invariant qualifiers for interface blocks GLSL 1.50 and GLSL 4.40 specs, they both say the same in "Interface Blocks" section: "If optional qualifiers are used, they can include interpolation qualifiers, auxiliary storage qualifiers, and storage qualifiers and they must declare an input, output, or uniform member consistent with the interface qualifier of the block" From GLSL ES 3.0, chapter 4.3.7 "Interface Blocks", page 38: "GLSL ES 3.0 does not support interface blocks for shader inputs or outputs." and from GLSL ES 3.0, chapter 4.6.1 "The invariant qualifier", page 52. "Only variables output from a shader can be candidates for invariance." This patch fixes the following dEQP tests: dEQP-GLES3.functional.shaders.declarations.invalid_declarations.invariant_uniform_block_2_vertex dEQP-GLES3.functional.shaders.declarations.invalid_declarations.invariant_uniform_block_2_fragment No piglit regressions. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> v2: - Enable this check for GLSL. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> :040000 040000 0cee593d241827bd1c6d887230a9c0a80469d1d4 60a36c9d9729caa6272b959d003de9124e1509e3 M src bisect run success
We submitted a spec bug because it's not completely clear whether or not invariant should be allowed in an 'in' or 'out' block in GLSL or OES_shader_io_blocks extension specs. Once we have the answer, we will reply to this bug report. Thanks!
I also see this fail.
Feedback from Khronos is that invariant should be allowed on block members. In this case "global scope" meant "not in a function and not in a structure." Future spec versions will clarify the use of "global scope" here and elsewhere.
(In reply to Ian Romanick from comment #3) > Feedback from Khronos is that invariant should be allowed on block members. > In this case "global scope" meant "not in a function and not in a > structure." Future spec versions will clarify the use of "global scope" > here and elsewhere. Thanks for the feedback. I sent a patch to the mailing list: https://lists.freedesktop.org/archives/mesa-dev/2016-February/107263.html
Should be fixed by: commit 61ceb36ead2e88cce4b4bac63793e94d343a3cc4 glsl: Allow invariant qualifer in block members in desktop OpenGL. Feedback from Khronos is that 'invariant' should be allowed on block members for desktop OpenGL. Fix piglit regression added by fe1e89a0: invariant-qualifier-in-out-block-01.vert v2: - Allow it for in/out blocks in OpenGL ES too, so when OES_shader_io_blocks is supported we don't need to do any change (Timothy) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89330 Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
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.