From 3c4644afb0820db974aa0dfe6dc51da830aeff7b Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Sun, 6 Feb 2022 17:23:27 +0100 Subject: [PATCH] r600: ignore dest sel for non-write targets when counting registers Since the value is not written, there is no need to allocate a register for it, so don't take it into account. Signed-off-by: Gert Wollny Acked-by: Emma Anholt Part-of: --- src/gallium/drivers/r600/r600_asm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index a2690f23015..bce21abf178 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -1302,7 +1302,7 @@ int r600_bytecode_add_alu_type(struct r600_bytecode *bc, r600_bytecode_special_constants(nalu->src[i].value, &nalu->src[i].sel); } - if (nalu->dst.sel >= bc->ngpr) { + if (nalu->dst.write && nalu->dst.sel >= bc->ngpr) { bc->ngpr = nalu->dst.sel + 1; } list_addtail(&nalu->list, &bc->cf_last->alu);