arb_shader_image_load_store.compiler.declaration-format-qualifier-duplicate.frag and arb_shader_image_load_store.compiler.declaration-format-qualifier-duplicate.vert regressed on mesa 6a660a5f5dad02a6594ea905c511ba3cae6862a5 glsl: allow multiple layout qualifiers for a single declaration From the ARB_shading_language_420pack spec: "More than one layout qualifier may appear in a single declaration. If the same layout-qualifier-name occurs in multiple layout qualifiers for the same declaration, the last one overrides the former ones." The parser was already failing correctly when the extension is not available but testing for duplicates within a single layout qualifier was still causing this to fail when available as both cases share the same function for merging. Here we add a parameter to differentiate between the two uses and apply it to the duplicate test. However, the piglit test's output references a different part of the spec in asserting that multiple layout qualifiers are not permitted: /tmp/build_root/m64/lib/piglit/bin/glslparsertest /tmp/build_root/m64/lib/piglit/generated_tests/spec/ARB_shader_image_load_store/compiler/declaration-format-qualifier-duplicate.frag fail 1.50 GL_ARB_shader_image_load_store piglit: debug: Requested an OpenGL 3.2 Core Context, and received a matching 3.3 context Shader source: /* * [config] * expect_result: fail * glsl_version: 1.50 * require_extensions: GL_ARB_shader_image_load_store * [end config] */ #version 150 #extension GL_ARB_shader_image_load_store: require /* * From the ARB_shader_image_load_store spec: * * "Only one format qualifier may be specified for any image variable * declaration." */ layout(rgba32f) layout(rgba32f) uniform image2D img; void main() { } Standard Error Successfully compiled fragment shader /tmp/build_root/m64/lib/piglit/generated_tests/spec/ARB_shader_image_load_store/compiler/declaration-format-qualifier-duplicate.frag:
It may be that the test is wrong, and Timothy's patch to Mesa is correct.
It may be that the test is incorrect and Timothy's patch is correct.
Fixed by: commit 0a6a05c8eaeda570891fdece2d86e8e0b0e4d56f glsl: add missing explicit_image_format flag to has_layout() Fixes piglit regression after fixes to duplicate layout rules. Previously catching multiple layouts was relying on the code meant to catch duplicates within a single layout(...), this change triggers the rules for multiple layouts.
On hsw/ivb, the following tests now fail: piglit.spec.arb_shader_image_load_store.max-images piglit.spec.arb_shader_image_load_store.indexing piglit.spec.arb_shader_image_load_store.semantics piglit.spec.arb_shader_image_load_store.shader-mem-barrier piglit.spec.arb_shader_image_size.builtin skl/bdw fails: piglit.spec.arb_shader_image_size.builtin This is with piglit=e792463, which fixed many other failures associated with 0a6a05. stderr for shader_image_load_store tests show: Failed to compile compute shader: 0:38(1): error: storage qualifiers must come after precise, invariant, interpolation, layout and auxiliary storage qualifiers for shader_image_size stderr is: Failed to compile fragment shader: 0:22(26): error: syntax error, unexpected NEW_IDENTIFIER, expecting '{' I'm changing the product of this bug to piglit, as per Tim's comments.
I've tested on my IVB and there is indeed more issues with the tests. They seem to take different paths in the tests on different hardware, so I didn't notice these when fixing on my BDW. Should have a fix shortly.
HSW/IVB issues resolve by piglit: commit 9bd8454a24304eabadcc4a5f6766158bbb8eb508 arb_shader_image_load_store: fix location of storage qualifier In GLSL 1.50 layout qualifiers must come before the storage qualifier. A recent fix in Mesa exposed this issue. However I can't reproduce the last problem on either skl or bdw, any chance you could copy the shader that's failing into the bug report?
Created attachment 121192 [details] output from arb_shader_image_size
Looks like there's some left-over IMAGE_T usage... pushed a fix. commit 1e7ca7fc900fbf59a37e84b46c2a2fb69686dc1f Author: Ilia Mirkin <imirkin@alum.mit.edu> Date: Thu Jan 21 13:51:21 2016 -0500 arb_shader_image_size: fix last use of IMAGE_T Trivial
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.