Mesa (master): glsl: reject format qualifiers with non-image types everywhere

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Thu May 4 12:02:57 UTC 2017


Module: Mesa
Branch: master
Commit: f8003d2516b33fff9a749e62fd994c6cb57b27d4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8003d2516b33fff9a749e62fd994c6cb57b27d4

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon May  1 12:34:42 2017 +0200

glsl: reject format qualifiers with non-image types everywhere

Including structures, interfaces and uniform blocks.

Fixes the following ARB_shader_image_load_store test:

format-layout-with-non-image-type.frag

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/compiler/glsl/ast_to_hir.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 558cafb708..e5604a10ac 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -6894,6 +6894,8 @@ ast_process_struct_or_iface_block_members(exec_list *instructions,
                           "to struct or interface block members");
       }
 
+      validate_image_format_qualifier_for_type(state, &loc, qual, decl_type);
+
       /* From Section 4.4.2.3 (Geometry Outputs) of the GLSL 4.50 spec:
        *
        *   "A block member may be declared with a stream identifier, but




More information about the mesa-commit mailing list