Mesa (master): glsl: reject image qualifiers with non-image types inside uniform blocks

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Fri Apr 28 08:47:24 UTC 2017


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Apr 26 18:50:16 2017 +0200

glsl: reject image qualifiers with non-image types inside uniform blocks

Fixes the following ARB_shader_image_load_store tests:

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

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.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 1159b2cdfb..e714f866c4 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -6875,6 +6875,8 @@ ast_process_struct_or_iface_block_members(exec_list *instructions,
                           "to struct or interface block members");
       }
 
+      validate_image_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