[Mesa-dev] [PATCH] r600g: Check for reduction instructions when merging instruction groups
Tom Stellard
tstellar at gmail.com
Wed Oct 5 07:57:53 PDT 2011
Reduction instructions can't share an instruction group with other
instructions, so we need to check for them when trying to merge
instruction groups.
---
src/gallium/drivers/r600/r600_asm.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index af0351b..0ba0a47 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -964,8 +964,14 @@ static int merge_inst_groups(struct r600_bytecode *bc, struct r600_bytecode_alu
return 0;
have_mova = 1;
}
+ /* check for reduction instructions in the previous group*/
+ if (is_alu_reduction_inst(bc, prev[i]))
+ return 0;
num_once_inst += is_alu_once_inst(bc, prev[i]);
}
+ /* check for reduction instructions in this group */
+ if (slots[i] && is_alu_reduction_inst(bc, slots[i]))
+ return 0;
if (slots[i] && r600_bytecode_alu_nliterals(bc, slots[i], literal, &nliteral))
return 0;
--
1.7.6.4
More information about the mesa-dev
mailing list