diff options
author | Ian Romanick <[email protected]> | 2014-07-18 10:27:21 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-08-04 14:40:07 -0700 |
commit | 68fa4cab1a3e80d97f759253dcc392e451ab110a (patch) | |
tree | bc8f7c8253527e5fe82ec373f8f5a69ba0eeec47 /src/glsl/ast_to_hir.cpp | |
parent | 814d694160da436a2b6218976b212e52478802b7 (diff) |
glsl: Also track matrix layout information into structures
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 89ac84e6b06..d5699935e60 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->without_array()->is_matrix()) { + /* 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->without_array()->is_matrix() + || field_type->without_array()->is_record()) { fields[i].matrix_layout = block_row_major ? GLSL_MATRIX_LAYOUT_ROW_MAJOR : GLSL_MATRIX_LAYOUT_COLUMN_MAJOR; |