From 607d7fb587b4c479d4af3b5e2abd8c588bffce53 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 6 May 2020 23:58:25 +0200 Subject: [PATCH] r600/sfn: Make 3vec loads skip possible moves Signed-off-by: Gert Wollny Reviewed-by: Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/r600/sfn/sfn_shader_compute.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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; } -- 2.30.2