diff options
author | Timothy Arceri <[email protected]> | 2014-06-24 07:43:05 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2015-10-15 20:36:01 +1100 |
commit | d337da81f28d6a5a65d0a09f9b1ddf905dc7c3aa (patch) | |
tree | c88782e43ef3cd3f43684f992b15d01faf175dee /src/glsl/ast.h | |
parent | dea0af8f826ca9ad638a158fdaacb2a4436f11d7 (diff) |
glsl: dont allow gl_PerVertex to be redeclared as an array of arrays
V3: move patch after fixes to ast for AoA and add const to helper
as suggested by Ian
V2: move single dimensional array detection into a helper
Signed-off-by: Timothy Arceri <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r-- | src/glsl/ast.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 57d432d4b02..e803e6d7675 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -336,6 +336,12 @@ public: array_dimensions.push_tail(&dim->link); } + const bool is_single_dimension() + { + return this->array_dimensions.tail_pred->prev != NULL && + this->array_dimensions.tail_pred->prev->is_head_sentinel(); + } + virtual void print(void) const; /* This list contains objects of type ast_node containing the |