From: Gert Wollny Date: Wed, 6 May 2020 21:38:40 +0000 (+0200) Subject: r600/sfn: skip copying LOD if the target register is is the same X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=13bb0a97012bb017c5d754d0c55ed0d1d513b264;p=mesa.git r600/sfn: skip copying LOD if the target register is is the same Signed-off-by: Gert Wollny Reviewed-by: Reviewed-by: Dave Airlie Part-of: --- diff --git a/src/gallium/drivers/r600/sfn/sfn_emittexinstruction.cpp b/src/gallium/drivers/r600/sfn/sfn_emittexinstruction.cpp index b3c3b06b450..1059db8e4f1 100644 --- a/src/gallium/drivers/r600/sfn/sfn_emittexinstruction.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_emittexinstruction.cpp @@ -481,7 +481,8 @@ bool EmitTexInstruction::emit_tex_txf(nir_tex_instr* instr, TexInputs& src) auto dst = make_dest(*instr); - emit_instruction(new AluInstruction(op1_mov, src.coord.reg_i(3), src.lod, {alu_write, alu_last_instr})); + if (*src.coord.reg_i(3) != *src.lod) + emit_instruction(new AluInstruction(op1_mov, src.coord.reg_i(3), src.lod, {alu_write, alu_last_instr})); auto sampler = get_samplerr_id(instr->sampler_index, src.sampler_deref); assert(!sampler.indirect);