From 072e95e07ad940d95c78291c6422172346b74c50 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Tue, 17 Dec 2019 16:03:07 -0500 Subject: [PATCH] freedreno/ir3: update prefetch input_offset when packing inlocs If the input location changes then prefetch input_offset needs to change. Signed-off-by: Jonathan Marek Reviewed-by: Eric Anholt Tested-by: Marge Bot Part-of: --- src/freedreno/ir3/ir3_compiler_nir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index bc4cdae0e93..82149c98e60 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -2878,6 +2878,10 @@ pack_inlocs(struct ir3_context *ctx) unsigned j = inloc % 4; instr->regs[1]->iim_val = so->inputs[i].inloc + j; + } else if (instr->opc == OPC_META_TEX_PREFETCH) { + unsigned i = instr->prefetch.input_offset / 4; + unsigned j = instr->prefetch.input_offset % 4; + instr->prefetch.input_offset = so->inputs[i].inloc + j; } } } -- 2.30.2