diff options
author | Iago Toral Quiroga <[email protected]> | 2015-01-19 12:32:12 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2015-02-03 13:19:36 +0100 |
commit | ec7dcaf578b26179f6d6782f20af17c3b75149df (patch) | |
tree | d891ad33e4f6d97a7aa0e9fc5e184b669a2e7e69 /src/glsl | |
parent | 5d655a43e606e7eb7ef09af60d2b8896f271e0de (diff) |
glsl: can't have 'const' qualifier used with struct or interface block members
Fixes the following 2 dEQP tests:
dEQP-GLES3.functional.shaders.declarations.invalid_declarations.uniform_block_const_vertex
dEQP-GLES3.functional.shaders.declarations.invalid_declarations.uniform_block_const_fragment
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index c2c9f0653e8..ed0eb0982dd 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -5201,6 +5201,13 @@ ast_process_structure_or_interface_block(exec_list *instructions, "members"); } + if (qual->flags.q.constant) { + YYLTYPE loc = decl_list->get_location(); + _mesa_glsl_error(&loc, state, + "const storage qualifier cannot be applied " + "to struct or interface block members"); + } + field_type = process_array_type(&loc, decl_type, decl->array_specifier, state); fields[i].type = field_type; |