r600g; add uses waterfall to asm cf for r6xx.
authorDave Airlie <airlied@redhat.com>
Sun, 19 Sep 2010 07:14:57 +0000 (17:14 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 19 Sep 2010 07:20:15 +0000 (17:20 +1000)
On r6xx if an MOVA instruction is emitted we should set this bit.

src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_asm.h
src/gallium/drivers/r600/r600_shader.c

index 0d17f75da7e41ac6ad1d0c3db1dde1be5adff873..93dc14201113afc0155c4b1847ebbe5e12636027 100644 (file)
@@ -696,6 +696,7 @@ static int r600_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
 
                bc->bytecode[id++] = S_SQ_CF_ALU_WORD1_CF_INST(cf->inst >> 3) |
                                        S_SQ_CF_ALU_WORD1_BARRIER(1) |
+                                       S_SQ_CF_ALU_WORD1_USES_WATERFALL(cf->r6xx_uses_waterfall) |
                                        S_SQ_CF_ALU_WORD1_COUNT((cf->ndw / 2) - 1);
                break;
        case V_SQ_CF_WORD1_SQ_CF_INST_TEX:
index 62a46cb0e1e8e29863a003d05f65aee6b2c08392..6aadf72957b2bf3562d6ff1318e9423515fc53ab 100644 (file)
@@ -127,6 +127,7 @@ struct r600_bc_cf {
        unsigned                        pop_count;
        unsigned                        cf_addr; /* control flow addr */
        unsigned                        kcache0_mode;
+       unsigned                        r6xx_uses_waterfall;
        struct list_head                alu;
        struct list_head                tex;
        struct list_head                vtx;
index 4da6850b0a943f4a9d7670c7aa2d0b22bd131ace..eac46a7ae6057928d77a65cb0ed9d1f5cbd6d784 100644 (file)
@@ -2313,6 +2313,7 @@ static int tgsi_arl(struct r600_shader_ctx *ctx)
        r = r600_bc_add_alu_type(ctx->bc, &alu, CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU));
        if (r)
                return r;
+       ctx->bc->cf_last->r6xx_uses_waterfall = 1;
        return 0;
 }