[Mesa-dev] [PATCH v2 10/31] glsl: allow bindless samplers/images inside interface blocks
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Apr 24 10:35:41 UTC 2017
The ARB_bindless_texture spec says:
"Modify Section 4.3.7, Interface Blocks, p. 38"
"(remove the following bullet from the last list on p. 39, thereby
permitting sampler types in interface blocks; image types are also
permitted in blocks by this extension)"
* sampler types are not allowed
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/compiler/glsl/ast_to_hir.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index b100ded836..a63f9da912 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -6919,7 +6919,18 @@ ast_process_struct_or_iface_block_members(exec_list *instructions,
assert(decl_type);
if (is_interface) {
- if (decl_type->contains_opaque()) {
+ /* The ARB_bindless_texture spec says:
+ *
+ * "Modify Section 4.3.7, Interface Blocks, p. 38"
+ *
+ * "(remove the following bullet from the last list on p. 39, thereby
+ * permitting sampler types in interface blocks; image types are also
+ * permitted in blocks by this extension)"
+ *
+ * * sampler types are not allowed
+ */
+ if (decl_type->contains_atomic() ||
+ (!state->has_bindless() && decl_type->contains_opaque())) {
_mesa_glsl_error(&loc, state, "uniform/buffer in non-default "
"interface block contains opaque variable");
}
--
2.12.2
More information about the mesa-dev
mailing list