diff options
author | Timothy Arceri <[email protected]> | 2015-11-13 09:45:36 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2015-11-18 07:29:32 +1100 |
commit | 8cf795dc7c874a9062a27fc393066e7bdae94501 (patch) | |
tree | e9208ac23ca432836aafe7c3c234b994b24a3528 | |
parent | 649803742dd96ea6702c6ef16c35c36e6d4fd676 (diff) |
glsl: move block validation outside function that validates members
Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index d96caf40304..33b0f1b76bb 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -6068,14 +6068,6 @@ ast_process_structure_or_interface_block(exec_list *instructions, { unsigned decl_count = 0; - /* For blocks that accept memory qualifiers (i.e. shader storage), verify - * that we don't have incompatible qualifiers - */ - if (layout && layout->flags.q.read_only && layout->flags.q.write_only) { - _mesa_glsl_error(&loc, state, - "Interface block sets both readonly and writeonly"); - } - /* Make an initial pass over the list of fields to determine how * many there are. Each element in this list is an ast_declarator_list. * This means that we actually need to count the number of elements in the @@ -6492,6 +6484,14 @@ ast_interface_block::hir(exec_list *instructions, */ state->struct_specifier_depth++; + /* For blocks that accept memory qualifiers (i.e. shader storage), verify + * that we don't have incompatible qualifiers + */ + if (this->layout.flags.q.read_only && this->layout.flags.q.write_only) { + _mesa_glsl_error(&loc, state, + "Interface block sets both readonly and writeonly"); + } + unsigned int num_variables = ast_process_structure_or_interface_block(&declared_variables, state, |