[Nouveau] [PATCH] nv50/ir: don't touch degree on physreg RIG nodes

Ilia Mirkin imirkin at alum.mit.edu
Wed Jan 6 14:30:58 PST 2016


These nodes don't go through reduction, so we shouldn't be increasing
their degrees.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91895
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org>
---

I would like to see a *bunch* of testing on this before merging it... RA-land
is far from my expertise. However it does fix the shaders in the original bug
and doesn't regress the few additional things that I tried.

 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index cd8c42c..f1ffcba 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -1129,9 +1129,11 @@ GCRA::doCoalesce(ArrayList& insns, unsigned int mask)
 void
 GCRA::RIG_Node::addInterference(RIG_Node *node)
 {
-   this->degree += relDegree[node->colors][colors];
-   node->degree += relDegree[colors][node->colors];
-
+   // don't add degree for physregs since they won't go through simplify()
+   if (this->reg < 0)
+      this->degree += relDegree[node->colors][colors];
+   if (node->reg < 0)
+      node->degree += relDegree[colors][node->colors];
    this->attach(node, Graph::Edge::CROSS);
 }
 
-- 
2.4.10



More information about the Nouveau mailing list