From d474cc935e7fa165665444e5347112879144c2a4 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Thu, 5 Jan 2023 13:54:36 +0100 Subject: [PATCH] ir3: Force flat.b sources to be equal From cc29b940 according to Jonathan Marek using 2 immediates in a cat2 instruction is only "correct" if they are both equal. They were not equal after reassigning of packed inlocks. flat.b seemed to work fine even with imm values being different, but better not to risk. Signed-off-by: Danylo Piliaiev Part-of: --- src/freedreno/ir3/ir3_compiler_nir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 45cd864..86baf08 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -4101,6 +4101,8 @@ pack_inlocs(struct ir3_context *ctx) unsigned j = inloc % 4; instr->srcs[0]->iim_val = so->inputs[i].inloc + j; + if (instr->opc == OPC_FLAT_B) + instr->srcs[1]->iim_val = instr->srcs[0]->iim_val; } else if (instr->opc == OPC_META_TEX_PREFETCH) { unsigned i = instr->prefetch.input_offset / 4; unsigned j = instr->prefetch.input_offset % 4; -- 2.7.4