summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <t_arceri@yahoo.com.au>2015-06-09 16:53:55 +1000
committerTimothy Arceri <t_arceri@yahoo.com.au>2015-06-10 18:54:43 +1000
commitadee54f8269c5e9f4fde91d19f0e465afc8f14d8 (patch)
treef2d02fa256f16eab6e94c71496c89df997490afb /src/glsl/ast_to_hir.cpp
parent563706c14641fde2ab604d590b5425680354f280 (diff)
downloadexternal_mesa3d-adee54f8269c5e9f4fde91d19f0e465afc8f14d8.zip
external_mesa3d-adee54f8269c5e9f4fde91d19f0e465afc8f14d8.tar.gz
external_mesa3d-adee54f8269c5e9f4fde91d19f0e465afc8f14d8.tar.bz2
glsl: remove restriction on unsized arrays in GLSL ES 3.10
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r--src/glsl/ast_to_hir.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 8aebb13..aab0c29 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -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;