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 <gert.wollny@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15714>
This commit is contained in:
Gert Wollny 2022-02-06 17:23:27 +01:00 committed by Marge Bot
parent 67d145d9ab
commit 3c4644afb0

View file

@ -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);