[Mesa-dev] [RFC PATCH 06/12] glsl: dont allow gl_PerVertex to be redeclared as an array of arrays

Timothy Arceri t_arceri at yahoo.com.au
Sat Mar 21 02:49:16 PDT 2015


Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
---
 src/glsl/ast_to_hir.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 36f3eb7..7516e60 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -5595,7 +5595,11 @@ ast_interface_block::hir(exec_list *instructions,
                              _mesa_shader_stage_to_string(state->stage));
          }
          if (this->instance_name == NULL ||
-             strcmp(this->instance_name, "gl_in") != 0 || this->array_specifier == NULL) {
+             strcmp(this->instance_name, "gl_in") != 0 || this->array_specifier == NULL ||
+             (this->array_specifier->is_unsized_array &&
+              !this->array_specifier->array_dimensions.is_empty()) ||
+             (this->array_specifier->array_dimensions.tail_pred->prev != NULL &&
+              !this->array_specifier->array_dimensions.tail_pred->prev->is_head_sentinel())) {
             _mesa_glsl_error(&loc, state,
                              "gl_PerVertex input must be redeclared as "
                              "gl_in[]");
-- 
2.1.0



More information about the mesa-dev mailing list