Module: Mesa
Branch: master
Commit: c5edfcc410bdf3dbe4f37418de8f0009746c9578
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5edfcc410bdf3dbe4f37418de8f0009746c9578

Author: Dave Airlie <[email protected]>
Date:   Sun Sep 19 17:14:57 2010 +1000

r600g; add uses waterfall to asm cf for r6xx.

On r6xx if an MOVA instruction is emitted we should set this bit.

---

 src/gallium/drivers/r600/r600_asm.c    |    1 +
 src/gallium/drivers/r600/r600_asm.h    |    1 +
 src/gallium/drivers/r600/r600_shader.c |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_asm.c 
b/src/gallium/drivers/r600/r600_asm.c
index 0d17f75..93dc142 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -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:
diff --git a/src/gallium/drivers/r600/r600_asm.h 
b/src/gallium/drivers/r600/r600_asm.h
index 62a46cb..6aadf72 100644
--- a/src/gallium/drivers/r600/r600_asm.h
+++ b/src/gallium/drivers/r600/r600_asm.h
@@ -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;
diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index 4da6850..eac46a7 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -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;
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to