Mesa (master): r600g: properly handle cayman in is_alu_vec_unit_inst()
Alex Deucher
agd5f at kemper.freedesktop.org
Sun Nov 13 23:31:38 UTC 2011
Module: Mesa
Branch: master
Commit: 579c04e42ef1bb449fe86d7224ccfe0c2d569595
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=579c04e42ef1bb449fe86d7224ccfe0c2d569595
Author: Alex Deucher <alexander.deucher at amd.com>
Date: Sun Nov 13 17:46:01 2011 -0500
r600g: properly handle cayman in is_alu_vec_unit_inst()
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
src/gallium/drivers/r600/r600_asm.c | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 0a1717c..f923c62 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -440,13 +440,21 @@ static int is_alu_mova_inst(struct r600_bytecode *bc, struct r600_bytecode_alu *
/* alu instructions that can only execute on the vector unit */
static int is_alu_vec_unit_inst(struct r600_bytecode *bc, struct r600_bytecode_alu *alu)
{
- return is_alu_reduction_inst(bc, alu) ||
- is_alu_mova_inst(bc, alu) ||
- (bc->chip_class == EVERGREEN &&
- (alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT ||
- alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR ||
- alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_XY ||
- alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_ZW));
+ switch (bc->chip_class) {
+ case R600:
+ case R700:
+ return is_alu_reduction_inst(bc, alu) ||
+ is_alu_mova_inst(bc, alu);
+ case EVERGREEN:
+ case CAYMAN:
+ default:
+ return is_alu_reduction_inst(bc, alu) ||
+ is_alu_mova_inst(bc, alu) ||
+ (alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_XY ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_ZW);
+ }
}
/* alu instructions that can only execute on the trans unit */
More information about the mesa-commit
mailing list