summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Girlin <vadimgirlin@gmail.com>2013-05-02 07:53:00 +0400
committerVadim Girlin <vadimgirlin@gmail.com>2013-05-03 16:53:42 +0400
commitc49b6d7f27319c423ab06ab62be46ee9628f5986 (patch)
tree3292edd010ad46a5bf1ab7da7f1df73f46ffe428
parente16ef1f454905252f9986bd2714fd6ae37a5aa75 (diff)
r600g/sb: fix handling of interference sets in post_scheduler
post_scheduler clears interference set for reallocatable values when the value becomes live first time, and then updates it to take into account modified order of operations, but this was not handled properly if the value appears first time as a source in copy operation. Fixes issues with webgl demo: http://madebyevan.com/webgl-water/ Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
-rw-r--r--src/gallium/drivers/r600/sb/sb_sched.cpp12
-rw-r--r--src/gallium/drivers/r600/sb/sb_sched.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_sched.cpp b/src/gallium/drivers/r600/sb/sb_sched.cpp
index 7e9eaccfcd3..d7c17952a4a 100644
--- a/src/gallium/drivers/r600/sb/sb_sched.cpp
+++ b/src/gallium/drivers/r600/sb/sb_sched.cpp
@@ -874,7 +874,7 @@ void post_scheduler::update_local_interferences() {
}
}
-void post_scheduler::update_live_src_vec(vvec &vv, val_set &born, bool src) {
+void post_scheduler::update_live_src_vec(vvec &vv, val_set *born, bool src) {
for (vvec::iterator I = vv.begin(), E = vv.end(); I != E; ++I) {
value *v = *I;
@@ -892,7 +892,8 @@ void post_scheduler::update_live_src_vec(vvec &vv, val_set &born, bool src) {
cleared_interf.add_val(v);
}
}
- born.add_val(v);
+ if (born)
+ born->add_val(v);
}
} else if (v->is_rel()) {
if (!v->rel->is_any_gpr())
@@ -924,7 +925,7 @@ void post_scheduler::update_live_dst_vec(vvec &vv) {
}
}
-void post_scheduler::update_live(node *n, val_set &born) {
+void post_scheduler::update_live(node *n, val_set *born) {
update_live_dst_vec(n->dst);
update_live_src_vec(n->src, born, true);
update_live_src_vec(n->dst, born, false);
@@ -948,7 +949,7 @@ void post_scheduler::process_group() {
if (!n)
continue;
- update_live(n, vals_born);
+ update_live(n, &vals_born);
}
PSC_DUMP(
@@ -1550,8 +1551,7 @@ bool post_scheduler::check_copy(node *n) {
if (s->is_prealloc() && !map_src_val(s))
return true;
- live.remove_val(d);
- live.add_val(s);
+ update_live(n, NULL);
release_src_values(n);
n->remove();
diff --git a/src/gallium/drivers/r600/sb/sb_sched.h b/src/gallium/drivers/r600/sb/sb_sched.h
index e74046c9c5a..a74484f50b3 100644
--- a/src/gallium/drivers/r600/sb/sb_sched.h
+++ b/src/gallium/drivers/r600/sb/sb_sched.h
@@ -297,9 +297,9 @@ public:
bool recolor_local(value *v);
void update_local_interferences();
- void update_live_src_vec(vvec &vv, val_set &born, bool src);
+ void update_live_src_vec(vvec &vv, val_set *born, bool src);
void update_live_dst_vec(vvec &vv);
- void update_live(node *n, val_set &born);
+ void update_live(node *n, val_set *born);
void process_group();
void set_color_local_val(value *v, sel_chan color);