glsl: allow bindless images to be declared inside structures
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Apr 2017 14:44:19 +0000 (16:44 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 6 May 2017 14:40:19 +0000 (16:40 +0200)
The spec doesn't clearly state this, but I have got clarification
from the spec authors.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl/ast_to_hir.cpp

index 25e473c..5ee7d9a 100644 (file)
@@ -6989,7 +6989,7 @@ ast_process_struct_or_iface_block_members(exec_list *instructions,
             _mesa_glsl_error(&loc, state, "atomic counter in structure");
          }
 
-         if (decl_type->contains_image()) {
+         if (!state->has_bindless() && decl_type->contains_image()) {
             /* FINISHME: Same problem as with atomic counters.
              * FINISHME: Request clarification from Khronos and add
              * FINISHME: spec quotation here.