Mesa (master): glsl: Never allow the sequence operator anywhere in an array size
Ian Romanick
idr at kemper.freedesktop.org
Mon Oct 12 18:36:31 UTC 2015
Module: Mesa
Branch: master
Commit: eeb444bc995c25224ce661c49dd5df6266e370d1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eeb444bc995c25224ce661c49dd5df6266e370d1
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Fri Oct 9 15:26:20 2015 -0700
glsl: Never allow the sequence operator anywhere in an array size
Fixes:
spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert
spec/glsl-es-1.00/compiler/array-sized-by-sequence-in-parenthesis.vert
spec/glsl-es-3.00/compiler/array-sized-by-sequence-in-parenthesis.vert
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/glsl/ast_to_hir.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 23ded46..c04db35 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2069,7 +2069,7 @@ process_array_size(exec_node *node,
}
ir_constant *const size = ir->constant_expression_value();
- if (size == NULL) {
+ if (size == NULL || array_size->has_sequence_subexpression()) {
_mesa_glsl_error(& loc, state, "array size must be a "
"constant valued expression");
return 0;
More information about the mesa-commit
mailing list