From b23b94fbc9201368398823ccdc633cf1fa60127c Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 1 Sep 2022 21:45:20 +0200 Subject: [PATCH] nv50/ir: fix OP_UNION resolving when used for vector values When an OP_UNION def takes part in a vector source e.g. for a tex instruction we failed to clean up the OP_UNION instruction as rep() points towards the coalesced value instead. This fixes a regression on nv50 moving to NIR, but also potentially issues with nvc0. The main reason this is common in nv50 is, that we lower OP_SLCT to a set, predicated movs and a union. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6406 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7117 Cc: mesa-stable Signed-off-by: Karol Herbst Reviewed-by: M Henning Part-of: --- src/nouveau/codegen/nv50_ir_peephole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nouveau/codegen/nv50_ir_peephole.cpp b/src/nouveau/codegen/nv50_ir_peephole.cpp index 4e2b3e6..9088e61 100644 --- a/src/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/nouveau/codegen/nv50_ir_peephole.cpp @@ -53,7 +53,7 @@ Instruction::isNop() const if (!getDef(0)->equals(getSrc(0))) return false; if (op == OP_UNION) - if (!def(0).rep()->equals(getSrc(1))) + if (!getDef(0)->equals(getSrc(1))) return false; return true; } -- 2.7.4