glsl: validate binding qualifier on block members
authorTapani Pälli <tapani.palli@intel.com>
Fri, 2 Oct 2015 07:08:55 +0000 (10:08 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Fri, 2 Oct 2015 07:50:42 +0000 (10:50 +0300)
Fixes following Piglit test:
member-invalid-binding-qualifier.frag

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/glsl/ast_to_hir.cpp

index 6899a554f2c92cb5779bfa42c4301855be6c304a..7bcf1820b19e0f761065f81eb739c9c5c2085abe 100644 (file)
@@ -5765,6 +5765,10 @@ ast_process_structure_or_interface_block(exec_list *instructions,
 
          const struct ast_type_qualifier *const qual =
             & decl_list->type->qualifier;
+
+         if (qual->flags.q.explicit_binding)
+            validate_binding_qualifier(state, &loc, decl_type, qual);
+
          if (qual->flags.q.std140 ||
              qual->flags.q.std430 ||
              qual->flags.q.packed ||