[Mesa-dev] [PATCH 2/4] glsl: Drop duplicate error messages.

Matt Turner mattst88 at gmail.com
Thu Aug 15 11:27:14 PDT 2013


This same message is printed in the validate_matrix_layout_for_type
function.
---
 src/glsl/ast_to_hir.cpp | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 9bc713d..c9ffa30 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2275,13 +2275,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
    }
 
    if (qual->flags.q.row_major || qual->flags.q.column_major) {
-      if (!ubo_qualifiers_allowed) {
-	 _mesa_glsl_error(loc, state,
-			  "uniform block layout qualifiers row_major and "
-			  "column_major can only be applied to uniform block "
-			  "members");
-      } else
-	 validate_matrix_layout_for_type(state, loc, var->type);
+      validate_matrix_layout_for_type(state, loc, var->type);
    }
 }
 
@@ -4415,11 +4409,6 @@ ast_process_structure_or_interface_block(exec_list *instructions,
                _mesa_glsl_error(&loc, state,
                                 "row_major and column_major can only be "
                                 "applied to uniform interface blocks");
-            } else if (!field_type->is_matrix() && !field_type->is_record()) {
-               _mesa_glsl_error(&loc, state,
-                                "uniform block layout qualifiers row_major and "
-                                "column_major can only be applied to matrix and "
-                                "structure types");
             } else
                validate_matrix_layout_for_type(state, &loc, field_type);
          }
-- 
1.8.3.2



More information about the mesa-dev mailing list