Mesa (master): glsl: Add AoA support when checking for non-const index

Timothy Arceri tarceri at kemper.freedesktop.org
Thu Oct 15 10:43:38 UTC 2015


Module: Mesa
Branch: master
Commit: d9f1f2bbc6690e7ef85d79a857dbb64cf5fd1cd8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9f1f2bbc6690e7ef85d79a857dbb64cf5fd1cd8

Author: Timothy Arceri <t_arceri at yahoo.com.au>
Date:   Thu Jun  4 11:19:05 2015 +1000

glsl: Add AoA support when checking for non-const index

When checking for non-const indexing of interfaces
take into account arrays of arrays

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

---

 src/glsl/ast_array_index.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp
index 5927c91..74d403f 100644
--- a/src/glsl/ast_array_index.cpp
+++ b/src/glsl/ast_array_index.cpp
@@ -235,7 +235,7 @@ _mesa_ast_array_index_to_hir(void *mem_ctx,
                   ir_var_shader_storage) {
             _mesa_glsl_error(&loc, state, "unsized array index must be constant");
          }
-      } else if (array->type->fields.array->is_interface()
+      } else if (array->type->without_array()->is_interface()
                  && (array->variable_referenced()->data.mode == ir_var_uniform ||
                      array->variable_referenced()->data.mode == ir_var_shader_storage)
                  && !state->is_version(400, 0) && !state->ARB_gpu_shader5_enable) {




More information about the mesa-commit mailing list