summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/sb/sb_gcm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r600/sb/sb_gcm.cpp')
-rw-r--r--src/gallium/drivers/r600/sb/sb_gcm.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_gcm.cpp b/src/gallium/drivers/r600/sb/sb_gcm.cpp
index 236b2ea0031..9c75389ada0 100644
--- a/src/gallium/drivers/r600/sb/sb_gcm.cpp
+++ b/src/gallium/drivers/r600/sb/sb_gcm.cpp
@@ -199,10 +199,9 @@ void gcm::td_release_val(value *v) {
sblog << "\n";
);
- use_info *u = v->uses;
- while (u) {
+ for (uselist::iterator I = v->uses.begin(), E = v->uses.end(); I != E; ++I) {
+ use_info *u = *I;
if (u->op->parent != &pending) {
- u = u->next;
continue;
}
@@ -212,6 +211,7 @@ void gcm::td_release_val(value *v) {
sblog << "\n";
);
+ assert(uses[u->op] > 0);
if (--uses[u->op] == 0) {
GCM_DUMP(
sblog << "td released : ";
@@ -222,7 +222,6 @@ void gcm::td_release_val(value *v) {
pending.remove_node(u->op);
ready.push_back(u->op);
}
- u = u->next;
}
}