summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_array_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ast_array_index.cpp')
-rw-r--r--src/glsl/ast_array_index.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp
index ae399f03a9b..dfb31073f82 100644
--- a/src/glsl/ast_array_index.cpp
+++ b/src/glsl/ast_array_index.cpp
@@ -226,7 +226,8 @@ _mesa_ast_array_index_to_hir(void *mem_ctx,
* by the linker.
*/
}
- else {
+ else if (array->variable_referenced()->data.mode !=
+ ir_var_shader_storage) {
_mesa_glsl_error(&loc, state, "unsized array index must be constant");
}
} else if (array->type->fields.array->is_interface()