Commit b010fa85675b98962426fe8961466fbae2d25499 re-added this check
after it was erroneously dropped while fixing another bug.  However,
the control flow was slightly off, and it ended up only applying to
UBOs and not SSBOs.

Fixes dEQP-GLES31.functional.debug.negative_coverage.
{callbacks,get_error,log}.shader.compile_compute_shader.

Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
---
 src/compiler/glsl/ast_to_hir.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index b31b61d1ed6..851a7d6ef4d 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -7903,10 +7903,9 @@ ast_interface_block::hir(exec_list *instructions,
          }
 
          if (var->type->is_unsized_array()) {
-            if (var->is_in_shader_storage_block()) {
-               if (is_unsized_array_last_element(var)) {
-                  var->data.from_ssbo_unsized_array = true;
-               }
+            if (var->is_in_shader_storage_block() &&
+                is_unsized_array_last_element(var)) {
+               var->data.from_ssbo_unsized_array = true;
             } else {
                /* From GLSL ES 3.10 spec, section 4.1.9 "Arrays":
                 *
-- 
2.11.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to