From 099b81396eb4518cc4de0393ceff1028c5bee2bd Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Tue, 15 Nov 2011 21:39:22 +0100 Subject: [PATCH] nv50/ir: Allow inserting isolated nodes to a graph. --- src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp index 2c64a140f51..b1287001c37 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp @@ -43,13 +43,11 @@ Graph::~Graph() void Graph::insert(Node *node) { - if (!root) { + if (!root) root = node; - size = 1; - node->graph = this; - } else { - root->attach(node, Edge::TREE); - } + + node->graph = this; + size++; } void Graph::Edge::unlink() -- 2.30.2