r600g: add assembler support for all the kcache fields.
authorDave Airlie <airlied@redhat.com>
Tue, 26 Oct 2010 02:08:00 +0000 (12:08 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 26 Oct 2010 02:08:00 +0000 (12:08 +1000)
src/gallium/drivers/r600/eg_asm.c
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_asm.h

index 52b7189e9e5280dba892b8e6bb6f683a9491cafb..c30f09c394bae1911644e033e2fc57e6663e1ba7 100644 (file)
@@ -36,8 +36,13 @@ int eg_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
        case (EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3):
        case (EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE << 3):
                bc->bytecode[id++] = S_SQ_CF_ALU_WORD0_ADDR(cf->addr >> 1) |
-                 S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache0_mode);
+                       S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache0_mode) |
+                       S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache0_bank) |
+                       S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache1_bank);
                bc->bytecode[id++] = S_SQ_CF_ALU_WORD1_CF_INST(cf->inst >> 3) |
+                       S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache1_mode) |
+                       S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache0_addr) |
+                       S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache1_addr) |
                                        S_SQ_CF_ALU_WORD1_BARRIER(1) |
                                        S_SQ_CF_ALU_WORD1_COUNT((cf->ndw / 2) - 1);
                break;
index a71d95ff1d08d04b7dc9a5a96c12c833664435b3..c22628423bd883d03232c2908c7ec39360e95ddc 100644 (file)
@@ -701,9 +701,14 @@ static int r600_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
        case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3):
        case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE << 3):
                bc->bytecode[id++] = S_SQ_CF_ALU_WORD0_ADDR(cf->addr >> 1) |
-                       S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache0_mode);
+                       S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache0_mode) |
+                       S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache0_bank) |
+                       S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache1_bank);
 
                bc->bytecode[id++] = S_SQ_CF_ALU_WORD1_CF_INST(cf->inst >> 3) |
+                       S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache1_mode) |
+                       S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache0_addr) |
+                       S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache1_addr) |
                                        S_SQ_CF_ALU_WORD1_BARRIER(1) |
                                        S_SQ_CF_ALU_WORD1_USES_WATERFALL(bc->chiprev == 0 ? cf->r6xx_uses_waterfall : 0) |
                                        S_SQ_CF_ALU_WORD1_COUNT((cf->ndw / 2) - 1);
index 97d08ee4b54e59e87080eda38bf6faef182cec42..25cda16837dc597fa70101ef9bc9aee6c93d3744 100644 (file)
@@ -132,6 +132,11 @@ struct r600_bc_cf {
        unsigned                        pop_count;
        unsigned                        cf_addr; /* control flow addr */
        unsigned                        kcache0_mode;
+       unsigned                        kcache1_mode;
+       unsigned                        kcache0_addr;
+       unsigned                        kcache1_addr;
+       unsigned                        kcache0_bank;
+       unsigned                        kcache1_bank;
        unsigned                        r6xx_uses_waterfall;
        struct list_head                alu;
        struct list_head                tex;