mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
Revert "glsl: remove restriction on unsized arrays in GLSL ES 3.10"
This reverts commit adee54f826.
Further down in the GLSL ES 3.10 spec it say:
"If an array is declared as the last member of a shader storage block
and the size is not specified at compile-time, it is sized at run-time.
In all other cases, arrays are sized only at compile-time."
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
This commit is contained in:
parent
7d88ab42b9
commit
da6996485f
1 changed files with 1 additions and 9 deletions
|
|
@ -3943,15 +3943,7 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||||
decl->identifier);
|
decl->identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GLSL ES 3.10 removes the restriction on unsized arrays.
|
if (state->es_shader) {
|
||||||
*
|
|
||||||
* Section 4.1.9 (Arrays) of the GLSL ES 3.10 spec says:
|
|
||||||
*
|
|
||||||
* "Variables of the same type can be aggregated into arrays by
|
|
||||||
* declaring a name followed by brackets ([ ]) enclosing an
|
|
||||||
* optional size."
|
|
||||||
*/
|
|
||||||
if (state->es_shader && state->language_version < 310) {
|
|
||||||
const glsl_type *const t = (earlier == NULL)
|
const glsl_type *const t = (earlier == NULL)
|
||||||
? var->type : earlier->type;
|
? var->type : earlier->type;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue