diff options
Diffstat (limited to 'src/gallium/drivers/r600/sb/sb_peephole.cpp')
-rw-r--r-- | src/gallium/drivers/r600/sb/sb_peephole.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_peephole.cpp b/src/gallium/drivers/r600/sb/sb_peephole.cpp index d4b97557d4e..49a6965b1f3 100644 --- a/src/gallium/drivers/r600/sb/sb_peephole.cpp +++ b/src/gallium/drivers/r600/sb/sb_peephole.cpp @@ -52,7 +52,19 @@ void peephole::run_on(container_node* c) { if (n->is_container()) run_on(static_cast<container_node*>(n)); else { - + if (n->is_fetch_inst() && (n->fetch_op_flags() & FF_GDS)) { + fetch_node *f = static_cast<fetch_node*>(n); + bool has_dst = false; + + for(vvec::iterator I = f->dst.begin(), E = f->dst.end(); I != E; ++I) { + value *v = *I; + if (v) + has_dst = true; + } + if (!has_dst) + if (f->bc.op >= FETCH_OP_GDS_ADD_RET && f->bc.op <= FETCH_OP_GDS_USHORT_READ_RET) + f->bc.set_op(f->bc.op - FETCH_OP_GDS_ADD_RET + FETCH_OP_GDS_ADD); + } if (n->is_alu_inst()) { alu_node *a = static_cast<alu_node*>(n); |