diff options
author | Ian Romanick <[email protected]> | 2014-07-16 16:51:14 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-08-04 14:40:07 -0700 |
commit | 814d694160da436a2b6218976b212e52478802b7 (patch) | |
tree | f561daed5c3a30defa27b156aa0819069c8c83c6 /src/glsl/ast_to_hir.cpp | |
parent | ab7098c8dfeb0c6de508b02a34c592aa4e343dff (diff) |
glsl: Track matrix layout of structure fields using two bits
v2: Rename GLSL_MATRIX_LAYOUT_DEFAULT to GLSL_MATRIX_LAYOUT_INHERITED.
Add comments in glsl_types.h explaining the layouts. Suggested by Matt.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Jordan Justen <[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, 5 insertions, 3 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 397a575501d..89ac84e6b06 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -5204,11 +5204,13 @@ ast_process_structure_or_interface_block(exec_list *instructions, } if (field_type->without_array()->is_matrix()) { - fields[i].row_major = block_row_major; + fields[i].matrix_layout = block_row_major + ? GLSL_MATRIX_LAYOUT_ROW_MAJOR + : GLSL_MATRIX_LAYOUT_COLUMN_MAJOR; if (qual->flags.q.row_major) - fields[i].row_major = true; + fields[i].matrix_layout = GLSL_MATRIX_LAYOUT_ROW_MAJOR; else if (qual->flags.q.column_major) - fields[i].row_major = false; + fields[i].matrix_layout = GLSL_MATRIX_LAYOUT_COLUMN_MAJOR; } i++; |