mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 07:20:16 +01:00
glsl2: Disallow non-constant array indexing for unsized arrays.
Fixes piglit test unsized-array-non-const-index.vert.
This commit is contained in:
parent
e4768eecd5
commit
2b7c42b40a
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue