r600g: remove some unneded barriers
authorChristian König <deathsimple@vodafone.de>
Wed, 22 Dec 2010 19:50:16 +0000 (20:50 +0100)
committerChristian König <deathsimple@vodafone.de>
Wed, 22 Dec 2010 19:50:16 +0000 (20:50 +0100)
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_shader.c

index 1cd0f4cdcfdecf3927bf30eb89575ed8dab0c7d0..491086eea87d914995ec222da715961c2ad56571 100644 (file)
@@ -1485,21 +1485,21 @@ void r600_cf_vtx(struct r600_vertex_element *ve, u32 *bytecode, unsigned count)
        if (count > 8) {
                bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
                bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
-                                               S_SQ_CF_WORD1_BARRIER(1) |
+                                               S_SQ_CF_WORD1_BARRIER(0) |
                                                S_SQ_CF_WORD1_COUNT(8 - 1);
                bytecode[i++] = S_SQ_CF_WORD0_ADDR(40 >> 1);
                bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
-                                               S_SQ_CF_WORD1_BARRIER(1) |
+                                               S_SQ_CF_WORD1_BARRIER(0) |
                                                S_SQ_CF_WORD1_COUNT(count - 8 - 1);
        } else {
                bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
                bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
-                                               S_SQ_CF_WORD1_BARRIER(1) |
+                                               S_SQ_CF_WORD1_BARRIER(0) |
                                                S_SQ_CF_WORD1_COUNT(count - 1);
        }
        bytecode[i++] = S_SQ_CF_WORD0_ADDR(0);
        bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_RETURN) |
-                       S_SQ_CF_WORD1_BARRIER(1);
+                       S_SQ_CF_WORD1_BARRIER(0);
 
        rstate = &ve->rstate;
        rstate->id = R600_PIPE_STATE_FETCH_SHADER;
@@ -1521,21 +1521,21 @@ void r600_cf_vtx_tc(struct r600_vertex_element *ve, u32 *bytecode, unsigned coun
        if (count > 8) {
                bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
                bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC) |
-                                               S_SQ_CF_WORD1_BARRIER(1) |
+                                               S_SQ_CF_WORD1_BARRIER(0) |
                                                S_SQ_CF_WORD1_COUNT(8 - 1);
                bytecode[i++] = S_SQ_CF_WORD0_ADDR(40 >> 1);
                bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC) |
-                                               S_SQ_CF_WORD1_BARRIER(1) |
+                                               S_SQ_CF_WORD1_BARRIER(0) |
                                                S_SQ_CF_WORD1_COUNT((count - 8) - 1);
        } else {
                bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
                bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC) |
-                                               S_SQ_CF_WORD1_BARRIER(1) |
+                                               S_SQ_CF_WORD1_BARRIER(0) |
                                                S_SQ_CF_WORD1_COUNT(count - 1);
        }
        bytecode[i++] = S_SQ_CF_WORD0_ADDR(0);
        bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_RETURN) |
-                       S_SQ_CF_WORD1_BARRIER(1);
+                       S_SQ_CF_WORD1_BARRIER(0);
 
        rstate = &ve->rstate;
        rstate->id = R600_PIPE_STATE_FETCH_SHADER;
index f2e74c9cee227ea92310f639cda55f29b5539986..80972b04ab0062d7c798e2a85a81ca4df32e1650 100644 (file)
@@ -603,7 +603,7 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
                output[i].swizzle_y = 1;
                output[i].swizzle_z = 2;
                output[i].swizzle_w = 3;
-               output[i].barrier = 1;
+               output[i].barrier = i == 0;
                output[i].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PARAM;
                output[i].array_base = i - pos0;
                output[i].inst = BC_INST(ctx.bc, V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT);