mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
glsl: remove restriction on unsized arrays in GLSL ES 3.10
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
parent
563706c146
commit
adee54f826
1 changed files with 9 additions and 1 deletions
|
|
@ -3849,7 +3849,15 @@ ast_declarator_list::hir(exec_list *instructions,
|
|||
decl->identifier);
|
||||
}
|
||||
|
||||
if (state->es_shader) {
|
||||
/* GLSL ES 3.10 removes the restriction on unsized arrays.
|
||||
*
|
||||
* 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)
|
||||
? var->type : earlier->type;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue