glsl: Drop duplicate error messages.
authorMatt Turner <mattst88@gmail.com>
Thu, 15 Aug 2013 17:46:46 +0000 (10:46 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 22 Aug 2013 05:47:02 +0000 (22:47 -0700)
This same message is printed in the validate_matrix_layout_for_type
function.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/glsl/ast_to_hir.cpp

index 06b3a521299ef11d76195d281d956798c312cb7d..ac86c4242ac51ce2a0e2a542a0890800a290bfe8 100644 (file)
@@ -2297,13 +2297,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);
    }
 }
 
@@ -4476,11 +4470,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);
          }