Commit 87e12e4c authored by Jesse Natalie's avatar Jesse Natalie Committed by Erik Faye-Lund
Browse files

Revert "nir: Propagate alignment info when lowering var copies"

This reverts commit 1d1105ed.
parent 1f0f3583
......@@ -58,9 +58,7 @@ emit_deref_copy_load_store(nir_builder *b,
nir_deref_instr *src_deref,
nir_deref_instr **src_deref_arr,
enum gl_access_qualifier dst_access,
enum gl_access_qualifier src_access,
unsigned dst_align_mul, unsigned dst_align_offset,
unsigned src_align_mul, unsigned src_align_offset)
enum gl_access_qualifier src_access)
{
if (dst_deref_arr || src_deref_arr) {
assert(dst_deref_arr && src_deref_arr);
......@@ -83,20 +81,16 @@ emit_deref_copy_load_store(nir_builder *b,
nir_build_deref_array_imm(b, dst_deref, i),
dst_deref_arr + 1,
nir_build_deref_array_imm(b, src_deref, i),
src_deref_arr + 1, dst_access, src_access,
dst_align_mul, dst_align_offset,
src_align_mul, src_align_offset);
src_deref_arr + 1, dst_access, src_access);
}
} else {
assert(glsl_get_bare_type(dst_deref->type) ==
glsl_get_bare_type(src_deref->type));
assert(glsl_type_is_vector_or_scalar(dst_deref->type));
nir_ssa_def *load =
nir_load_deref_with_access_and_align(b, src_deref, src_access,
src_align_mul, src_align_offset);
nir_store_deref_with_access_and_align(b, dst_deref, load, ~0, src_access,
dst_align_mul, dst_align_offset);
nir_store_deref_with_access(b, dst_deref,
nir_load_deref_with_access(b, src_deref, src_access),
~0, src_access);
}
}
......@@ -118,11 +112,7 @@ nir_lower_deref_copy_instr(nir_builder *b, nir_intrinsic_instr *copy)
emit_deref_copy_load_store(b, dst_path.path[0], &dst_path.path[1],
src_path.path[0], &src_path.path[1],
nir_intrinsic_dst_access(copy),
nir_intrinsic_src_access(copy),
nir_intrinsic_dst_align_mul(copy),
nir_intrinsic_dst_align_offset(copy),
nir_intrinsic_src_align_mul(copy),
nir_intrinsic_src_align_offset(copy));
nir_intrinsic_src_access(copy));
nir_deref_path_finish(&dst_path);
nir_deref_path_finish(&src_path);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment