Mesa (master): glsl ast_to_hir: reject row/column_major for in/ out interface blocks

Jordan Justen jljusten at kemper.freedesktop.org
Thu May 23 18:23:43 UTC 2013


Module: Mesa
Branch: master
Commit: cb29a7095f6cf3700eb3d2c575640ea129388782
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb29a7095f6cf3700eb3d2c575640ea129388782

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Sat Mar 23 17:16:28 2013 -0700

glsl ast_to_hir: reject row/column_major for in/out interface blocks

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/glsl/ast_to_hir.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 0e2e652..b2a1811 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -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 "




More information about the mesa-commit mailing list