summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-11-30 16:43:09 -0800
committerJordan Justen <[email protected]>2015-12-09 23:50:38 -0800
commitf22ab2e8b3dbd7dfdada0d353da1c6ef898f1494 (patch)
treebf04d805e3fdd88f0d44c8401a5fc75d7d4e5fb3 /src
parent66eaef7737b317cc74381afcfa2335b5e0200b54 (diff)
glsl: Don't assert on shared variable matrices with 'inherited' layout
We use column-major for shared variable matrices. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/lower_buffer_access.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glsl/lower_buffer_access.cpp b/src/glsl/lower_buffer_access.cpp
index 7e9d516d74a..f8c8d140ea8 100644
--- a/src/glsl/lower_buffer_access.cpp
+++ b/src/glsl/lower_buffer_access.cpp
@@ -278,9 +278,16 @@ lower_buffer_access::is_dereferenced_thing_row_major(const ir_rvalue *deref)
glsl_matrix_layout(var_deref->var->data.matrix_layout);
switch (matrix_layout) {
- case GLSL_MATRIX_LAYOUT_INHERITED:
- assert(!matrix);
+ case GLSL_MATRIX_LAYOUT_INHERITED: {
+ /* For interface block matrix variables we handle inherited
+ * layouts at HIR generation time, but we don't do that for shared
+ * variables, which are always column-major
+ */
+ ir_variable *var = deref->variable_referenced();
+ assert((var->is_in_buffer_block() && !matrix) ||
+ var->data.mode == ir_var_shader_shared);
return false;
+ }
case GLSL_MATRIX_LAYOUT_COLUMN_MAJOR:
return false;
case GLSL_MATRIX_LAYOUT_ROW_MAJOR: