glsl: Use link_calculate_matrix_stride in lower_buffer_access and friends
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user