|
1
|
+From b23b94fbc9201368398823ccdc633cf1fa60127c Mon Sep 17 00:00:00 2001
|
|
2
|
+From: Karol Herbst <kherbst@redhat.com>
|
|
3
|
+Date: Thu, 1 Sep 2022 21:45:20 +0200
|
|
4
|
+Subject: [PATCH] nv50/ir: fix OP_UNION resolving when used for vector values
|
|
5
|
+
|
|
6
|
+When an OP_UNION def takes part in a vector source e.g. for a tex
|
|
7
|
+instruction we failed to clean up the OP_UNION instruction as rep() points
|
|
8
|
+towards the coalesced value instead.
|
|
9
|
+
|
|
10
|
+This fixes a regression on nv50 moving to NIR, but also potentially issues
|
|
11
|
+with nvc0.
|
|
12
|
+
|
|
13
|
+The main reason this is common in nv50 is, that we lower OP_SLCT to a set,
|
|
14
|
+predicated movs and a union.
|
|
15
|
+
|
|
16
|
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6406
|
|
17
|
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7117
|
|
18
|
+Cc: mesa-stable
|
|
19
|
+Signed-off-by: Karol Herbst <kherbst@redhat.com>
|
|
20
|
+Reviewed-by: M Henning <drawoc@darkrefraction.com>
|
|
21
|
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18377>
|
|
22
|
+---
|
|
23
|
+ src/nouveau/codegen/nv50_ir_peephole.cpp | 2 +-
|
|
24
|
+ 1 file changed, 1 insertion(+), 1 deletion(-)
|
|
25
|
+
|
|
26
|
+diff --git a/src/nouveau/codegen/nv50_ir_peephole.cpp b/src/nouveau/codegen/nv50_ir_peephole.cpp
|
|
27
|
+index 4e2b3e6f52c..9088e614f7e 100644
|
|
28
|
+--- a/src/nouveau/codegen/nv50_ir_peephole.cpp
|
|
29
|
++++ b/src/nouveau/codegen/nv50_ir_peephole.cpp
|
|
30
|
+@@ -53,7 +53,7 @@ Instruction::isNop() const
|
|
31
|
+ if (!getDef(0)->equals(getSrc(0)))
|
|
32
|
+ return false;
|
|
33
|
+ if (op == OP_UNION)
|
|
34
|
+- if (!def(0).rep()->equals(getSrc(1)))
|
|
35
|
++ if (!getDef(0)->equals(getSrc(1)))
|
|
36
|
+ return false;
|
|
37
|
+ return true;
|
|
38
|
+ }
|
|
39
|
+--
|
|
40
|
+2.37.2
|
|
41
|
+ |