summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2015-11-13 11:21:42 +1100
committerTimothy Arceri <[email protected]>2015-11-18 07:29:58 +1100
commita01b8c7e774aec651302fc8177b937c915daf1e7 (patch)
treea69406f3793c590ef14c7105c63c0f4a50ba8255 /src/glsl/ast_to_hir.cpp
parentf8b5cc827e2fcbd64424495eac31e5d3d3f0567c (diff)
glsl: cleanup and fix validate matrix function for arrays
Previously if the member was an array of matrices then a warning message would be incorrectly given. Also the struct case could never be met so it has been removed. Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r--src/glsl/ast_to_hir.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 1088ca26779..d2b97d2848f 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2490,7 +2490,7 @@ validate_matrix_layout_for_type(struct _mesa_glsl_parse_state *state,
"uniform block layout qualifiers row_major and "
"column_major may not be applied to variables "
"outside of uniform blocks");
- } else if (!type->is_matrix()) {
+ } else if (!type->without_array()->is_matrix()) {
/* The OpenGL ES 3.0 conformance tests did not originally allow
* matrix layout qualifiers on non-matrices. However, the OpenGL
* 4.4 and OpenGL ES 3.0 (revision TBD) specifications were
@@ -2501,15 +2501,6 @@ validate_matrix_layout_for_type(struct _mesa_glsl_parse_state *state,
"uniform block layout qualifiers row_major and "
"column_major applied to non-matrix types may "
"be rejected by older compilers");
- } else if (type->is_record()) {
- /* We allow 'layout(row_major)' on structure types because it's the only
- * way to get row-major layouts on matrices contained in structures.
- */
- _mesa_glsl_warning(loc, state,
- "uniform block layout qualifiers row_major and "
- "column_major applied to structure types is not "
- "strictly conformant and may be rejected by other "
- "compilers");
}
}