summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVincent Lejeune <[email protected]>2012-08-01 22:52:54 +0200
committerTom Stellard <[email protected]>2012-08-15 21:07:13 +0000
commit72f7632c6bbbfc062ac7d90290e99f71272f6059 (patch)
treed9d9e172af69f1b3ef33e442cc692fe598dc402c /src
parent56227f875bdff6ef4fd53b09ba267c786ae9dac2 (diff)
r600g: Fix instruction group merge when there are predicated insts.
Signed-off-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/r600_asm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 0f2882403e9..f01de41e129 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -1048,8 +1048,26 @@ static int merge_inst_groups(struct r600_bytecode *bc, struct r600_bytecode_alu
return r;
for (i = 0; i < max_slots; ++i) {
+ if (prev[i]) {
+ if (prev[i]->pred_sel)
+ return 0;
+ if (is_alu_once_inst(bc, prev[i]))
+ return 0;
+ }
+ if (slots[i]) {
+ if (slots[i]->pred_sel)
+ return 0;
+ if (is_alu_once_inst(bc, slots[i]))
+ return 0;
+ }
+ }
+
+ for (i = 0; i < max_slots; ++i) {
struct r600_bytecode_alu *alu;
+ if (num_once_inst > 0)
+ return 0;
+
/* check number of literals */
if (prev[i]) {
if (r600_bytecode_alu_nliterals(bc, prev[i], literal, &nliteral))