[Mesa-dev] [PATCH 12/16] glsl: Also track matrix layout information into structures
Ian Romanick
idr at freedesktop.org
Mon Jul 21 14:04:28 PDT 2014
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/glsl/ast_to_hir.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 1fb4274..eeafb44 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -5203,7 +5203,13 @@ ast_process_structure_or_interface_block(exec_list *instructions,
"in uniform blocks or structures.");
}
- if (field_type->is_matrix_or_array_of()) {
+ /* Propogate row- / column-major information down the fields of the
+ * structure or interface block. Structures need this data because
+ * the structure may contain a structure that contains ... a matrix
+ * that need the proper layout.
+ */
+ if (field_type->is_matrix_or_array_of()
+ || field_type->is_record_or_array_of()) {
fields[i].matrix_layout = block_row_major
? GLSL_MATRIX_LAYOUT_ROW_MAJOR
: GLSL_MATRIX_LAYOUT_COLUMN_MAJOR;
--
1.8.1.4
More information about the mesa-dev
mailing list