[Mesa-dev] [PATCH v3 04/14] glsl: remove duplicate validation for index layout qualifier
Timothy Arceri
t_arceri at yahoo.com.au
Sat Nov 14 05:42:39 PST 2015
From: Timothy Arceri <timothy.arceri at collabora.com>
The minimum value for index is validated in the ast code and
we want to remove validation from the parser so we can add
compile time constant support.
---
src/glsl/glsl_parser.yy | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 5eb54c4..b902411 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1471,13 +1471,7 @@ layout_qualifier_id:
if (match_layout_qualifier("index", $1, state) == 0) {
$$.flags.q.explicit_index = 1;
-
- if ($3 >= 0) {
- $$.index = $3;
- } else {
- _mesa_glsl_error(& @3, state, "invalid index %d specified", $3);
- YYERROR;
- }
+ $$.index = $3;
}
if ((state->has_420pack() ||
--
2.4.3
More information about the mesa-dev
mailing list