summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_shared_reference.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2017-11-01 16:34:32 -0700
committerIan Romanick <[email protected]>2017-11-08 18:37:29 -0800
commit1a2beae1b35bb0d87233993d752414899719cd08 (patch)
tree60ed16479bcbadc927650b54dc1a978de56ec798 /src/compiler/glsl/lower_shared_reference.cpp
parent24e78d99db177412da0285d5c6ed3c867d6a8adb (diff)
glsl: Use link_calculate_matrix_stride in lower_buffer_access and friends
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
Diffstat (limited to 'src/compiler/glsl/lower_shared_reference.cpp')
-rw-r--r--src/compiler/glsl/lower_shared_reference.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/glsl/lower_shared_reference.cpp b/src/compiler/glsl/lower_shared_reference.cpp
index 86afc5de924..5de269fde82 100644
--- a/src/compiler/glsl/lower_shared_reference.cpp
+++ b/src/compiler/glsl/lower_shared_reference.cpp
@@ -137,13 +137,13 @@ lower_shared_reference_visitor::handle_rvalue(ir_rvalue **rvalue)
ir_rvalue *offset = NULL;
unsigned const_offset = get_shared_offset(var);
bool row_major;
- int matrix_columns;
+ const glsl_type *matrix_type;
assert(var->get_interface_type() == NULL);
const enum glsl_interface_packing packing = GLSL_INTERFACE_PACKING_STD430;
setup_buffer_access(mem_ctx, deref,
&offset, &const_offset,
- &row_major, &matrix_columns, NULL, packing);
+ &row_major, &matrix_type, NULL, packing);
/* Now that we've calculated the offset to the start of the
* dereference, walk over the type and emit loads into a temporary.
@@ -163,7 +163,7 @@ lower_shared_reference_visitor::handle_rvalue(ir_rvalue **rvalue)
deref = new(mem_ctx) ir_dereference_variable(load_var);
emit_access(mem_ctx, false, deref, load_offset, const_offset, row_major,
- matrix_columns, packing, 0);
+ matrix_type, packing, 0);
*rvalue = deref;
@@ -205,13 +205,13 @@ lower_shared_reference_visitor::handle_assignment(ir_assignment *ir)
ir_rvalue *offset = NULL;
unsigned const_offset = get_shared_offset(var);
bool row_major;
- int matrix_columns;
+ const glsl_type *matrix_type;
assert(var->get_interface_type() == NULL);
const enum glsl_interface_packing packing = GLSL_INTERFACE_PACKING_STD430;
setup_buffer_access(mem_ctx, deref,
&offset, &const_offset,
- &row_major, &matrix_columns, NULL, packing);
+ &row_major, &matrix_type, NULL, packing);
deref = new(mem_ctx) ir_dereference_variable(store_var);
@@ -223,7 +223,7 @@ lower_shared_reference_visitor::handle_assignment(ir_assignment *ir)
/* Now we have to write the value assigned to the temporary back to memory */
emit_access(mem_ctx, true, deref, store_offset, const_offset, row_major,
- matrix_columns, packing, ir->write_mask);
+ matrix_type, packing, ir->write_mask);
progress = true;
}
@@ -364,18 +364,18 @@ lower_shared_reference_visitor::lower_shared_atomic_intrinsic(ir_call *ir)
ir_rvalue *offset = NULL;
unsigned const_offset = get_shared_offset(var);
bool row_major;
- int matrix_columns;
+ const glsl_type *matrix_type;
assert(var->get_interface_type() == NULL);
const enum glsl_interface_packing packing = GLSL_INTERFACE_PACKING_STD430;
buffer_access_type = shared_atomic_access;
setup_buffer_access(mem_ctx, deref,
&offset, &const_offset,
- &row_major, &matrix_columns, NULL, packing);
+ &row_major, &matrix_type, NULL, packing);
assert(offset);
assert(!row_major);
- assert(matrix_columns == 1);
+ assert(matrix_type == NULL);
ir_rvalue *deref_offset =
add(offset, new(mem_ctx) ir_constant(const_offset));