From: Gert Wollny Date: Wed, 6 May 2020 21:58:25 +0000 (+0200) Subject: r600/sfn: Make 3vec loads skip possible moves X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=607d7fb587b4c479d4af3b5e2abd8c588bffce53;p=mesa.git r600/sfn: Make 3vec loads skip possible moves Signed-off-by: Gert Wollny Reviewed-by: Reviewed-by: Dave Airlie Part-of: --- diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_compute.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_compute.cpp index 2351a7fc50b..2d458ad838c 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shader_compute.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_shader_compute.cpp @@ -79,12 +79,8 @@ bool ComputeShaderFromNir::emit_intrinsic_instruction_override(nir_intrinsic_ins bool ComputeShaderFromNir::emit_load_3vec(nir_intrinsic_instr* instr, const std::array& src) { - AluInstruction *ir = nullptr; - for (int i = 0; i < 3; ++i) { - ir = new AluInstruction(op1_mov, from_nir(instr->dest, i), src[i], {alu_write}); - emit_instruction(ir); - } - ir->set_flag(alu_last_instr); + for (int i = 0; i < 3; ++i) + load_preloaded_value(instr->dest, i, src[i], i == 2); return true; }