aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-05-06 23:58:25 +0200
committerMarge Bot <[email protected]>2020-05-19 07:52:13 +0000
commit607d7fb587b4c479d4af3b5e2abd8c588bffce53 (patch)
tree8a65c4b3db77ab0b1ff1530ad17a6e7de401c468 /src/gallium/drivers/r600
parentac2c3fb010c00716444e3d7b4381b29afbc92cd4 (diff)
r600/sfn: Make 3vec loads skip possible moves
Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_shader_compute.cpp8
1 files 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<PValue,3>& 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;
}