On 04/05/17 22:24, Nicolai Hähnle wrote:
On 02.05.2017 22:53, Samuel Pitoiset wrote:
From section 4.3.7 of the ARB_bindless_texture spec:
"(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
v3: - update the spec comment
- update the glsl error message
Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> (v2)
Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com> (v2)
Feel free to remove the v2 on my R-b for patches 8-12.
Same here.
Cheers,
Nicolai
---
src/compiler/glsl/ast_to_hir.cpp | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/compiler/glsl/ast_to_hir.cpp
b/src/compiler/glsl/ast_to_hir.cpp
index d193028acd..ee1bd4f968 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -6964,9 +6964,19 @@
ast_process_struct_or_iface_block_members(exec_list *instructions,
assert(decl_type);
if (is_interface) {
- if (decl_type->contains_opaque()) {
+ /* From section 4.3.7 of the ARB_bindless_texture spec:
+ *
+ * "(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");
+ "interface block contains %s variable",
+ state->has_bindless() ? "atomic" :
"opaque");
}
} else {
if (decl_type->contains_atomic()) {
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev