[Mesa-dev] [PATCH 8/8] glsl: don't validate binding when its not needed
Timothy Arceri
t_arceri at yahoo.com.au
Thu Nov 12 17:13:41 PST 2015
From: Timothy Arceri <timothy.arceri at collabora.com>
Checking that the flag has been set is all the validation thats
needed here.
Also not calling the binding validation function will make things
much simpler when adding compile time constant support as we
won't need to resolve the binding value.
---
src/glsl/ast_to_hir.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 75da399..44660c2 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -5881,8 +5881,11 @@ ast_process_struct_or_iface_block_members(exec_list *instructions,
"uniform block");
}
- if (qual->flags.q.explicit_binding)
- validate_binding_qualifier(state, &loc, decl_type, qual);
+ if (qual->flags.q.explicit_binding) {
+ _mesa_glsl_error(&loc, state,
+ "binding layout qualifier cannot be applied "
+ "to struct or interface block members");
+ }
if (qual->flags.q.std140 ||
qual->flags.q.std430 ||
--
2.4.3
More information about the mesa-dev
mailing list