nir: fix opt_memcpy src/dst mixup

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: f6667cb0ce ("nir: Add a memcpy optimization pass")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13079>
This commit is contained in:
Lionel Landwerlin 2021-09-28 12:17:07 +03:00 committed by Marge Bot
parent 694e14dd99
commit daa8a81d99

View file

@ -152,7 +152,7 @@ try_lower_memcpy(nir_builder *b, nir_intrinsic_instr *cpy)
nir_load_deref_with_access(b, src, nir_intrinsic_src_access(cpy));
data = nir_bitcast_vector(b, data, glsl_get_bit_size(dst->type));
assert(data->num_components == glsl_get_vector_elements(dst->type));
nir_store_deref_with_access(b, src, data, ~0 /* write mask */,
nir_store_deref_with_access(b, dst, data, ~0 /* write mask */,
nir_intrinsic_dst_access(cpy));
return true;
}