summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/r600/sb/sb_ir.cpp4
-rw-r--r--src/gallium/drivers/r600/sb/sb_ir.h2
-rw-r--r--src/gallium/drivers/r600/sb/sb_ssa_builder.cpp5
3 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_ir.cpp b/src/gallium/drivers/r600/sb/sb_ir.cpp
index 382fceed08c..5226893de75 100644
--- a/src/gallium/drivers/r600/sb/sb_ir.cpp
+++ b/src/gallium/drivers/r600/sb/sb_ir.cpp
@@ -51,7 +51,7 @@ bool alu_packed_node::accept(vpass& p, bool enter) {
return p.visit(*this, enter);
}
-void alu_packed_node::init_args() {
+void alu_packed_node::init_args(bool repl) {
alu_node *p = static_cast<alu_node*>(first);
assert(p->is_valid());
while (p) {
@@ -60,8 +60,6 @@ void alu_packed_node::init_args() {
p = static_cast<alu_node*>(p->next);
}
- // if it's packed then it's always multislot, no need to check slot flags
- bool repl = (op_ptr()->flags & AF_REPL);
value *replicated_value = NULL;
for (vvec::iterator I = dst.begin(), E = dst.end(); I != E; ++I) {
diff --git a/src/gallium/drivers/r600/sb/sb_ir.h b/src/gallium/drivers/r600/sb/sb_ir.h
index d55f4de67b8..c838f62b567 100644
--- a/src/gallium/drivers/r600/sb/sb_ir.h
+++ b/src/gallium/drivers/r600/sb/sb_ir.h
@@ -1014,7 +1014,7 @@ public:
return static_cast<alu_node*>(first)->bc.op_ptr;
}
unsigned op() { return static_cast<alu_node*>(first)->bc.op; }
- void init_args();
+ void init_args(bool repl);
virtual bool is_valid() { return subtype == NST_ALU_PACKED_INST; }
virtual bool accept(vpass &p, bool enter);
diff --git a/src/gallium/drivers/r600/sb/sb_ssa_builder.cpp b/src/gallium/drivers/r600/sb/sb_ssa_builder.cpp
index 87eafaee247..3ad628bb68c 100644
--- a/src/gallium/drivers/r600/sb/sb_ssa_builder.cpp
+++ b/src/gallium/drivers/r600/sb/sb_ssa_builder.cpp
@@ -218,7 +218,10 @@ bool ssa_rename::visit(alu_packed_node& n, bool enter) {
I->accept(*this, false);
}
- n.init_args();
+ bool repl = (n.op_ptr()->flags & AF_REPL) ||
+ (ctx.is_cayman() && (n.first->alu_op_slot_flags() & AF_S));
+
+ n.init_args(repl);
}
return false;
}