summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/glsl/ast_to_hir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 98090d2b01..41371e7536 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -1233,6 +1233,8 @@ ast_expression::hir(exec_list *instructions,
if ((v != NULL) && (unsigned(idx) > v->max_array_access))
v->max_array_access = idx;
}
+ } else if (array->type->array_size() == 0) {
+ _mesa_glsl_error(&loc, state, "unsized array index must be constant");
}
if (error_emitted)