diff options
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 98090d2b01b..41371e75367 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) |