glsl: reject image qualifiers with non-image types inside uniform blocks
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 26 Apr 2017 16:50:16 +0000 (18:50 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 28 Apr 2017 08:43:53 +0000 (10:43 +0200)
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@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/ast_to_hir.cpp

index 1159b2cdfbf9552617b782781393d9e58cdb97aa..e714f866c447daeceac759670abb0f6fbc3a2bf9 100644 (file)
@@ -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