From 54c3d4bd24eee4fcf595a859e17e04aed7cabf1d Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 6 May 2020 23:20:49 +0200 Subject: [PATCH] r600: Add support for loading index register from other than chan X Signed-off-by: Gert Wollny Reviewed-by: Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/r600/eg_asm.c | 2 +- src/gallium/drivers/r600/r600_asm.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/eg_asm.c b/src/gallium/drivers/r600/eg_asm.c index acf3fd37416..9468e4b014f 100644 --- a/src/gallium/drivers/r600/eg_asm.c +++ b/src/gallium/drivers/r600/eg_asm.c @@ -189,7 +189,7 @@ int egcm_load_index_reg(struct r600_bytecode *bc, unsigned id, bool inside_alu_c memset(&alu, 0, sizeof(alu)); alu.op = ALU_OP1_MOVA_INT; alu.src[0].sel = bc->index_reg[id]; - alu.src[0].chan = 0; + alu.src[0].chan = bc->index_reg_chan[id]; if (bc->chip_class == CAYMAN) alu.dst.sel = id == 0 ? CM_V_SQ_MOVA_DST_CF_IDX0 : CM_V_SQ_MOVA_DST_CF_IDX1; diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h index f132b720421..390b15422f6 100644 --- a/src/gallium/drivers/r600/r600_asm.h +++ b/src/gallium/drivers/r600/r600_asm.h @@ -278,6 +278,7 @@ struct r600_bytecode { unsigned r6xx_nop_after_rel_dst; bool index_loaded[2]; unsigned index_reg[2]; /* indexing register CF_INDEX_[01] */ + unsigned index_reg_chan[2]; /* indexing register chanel CF_INDEX_[01] */ unsigned debug_id; struct r600_isa* isa; struct r600_bytecode_output pending_outputs[5]; -- 2.30.2