glsl ast_to_hir: reject row/column_major for in/out interface blocks
authorJordan Justen <jordan.l.justen@intel.com>
Sun, 24 Mar 2013 00:16:28 +0000 (17:16 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 23 May 2013 16:37:12 +0000 (09:37 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast_to_hir.cpp

index 0e2e6527761b26c1cc403ea3db8ef8a9fbc515df..b2a18114ac058d2da92edf9eeff6a1a4812f1848 100644 (file)
@@ -4054,7 +4054,11 @@ ast_process_structure_or_interface_block(exec_list *instructions,
         fields[i].name = decl->identifier;
 
          if (qual->flags.q.row_major || qual->flags.q.column_major) {
-            if (!field_type->is_matrix() && !field_type->is_record()) {
+            if (!qual->flags.q.uniform) {
+               _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 "