r600g: move VGT_STRMOUT_DRAW_OPAQUE_OFFSET initialization into invariant state
authorMarek Olšák <maraeo@gmail.com>
Wed, 18 Jul 2012 04:18:42 +0000 (06:18 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 18 Jul 2012 04:25:37 +0000 (06:25 +0200)
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/r600/r600_state_common.c

index 54438afc7798e283cf85115bd7c24ce51e9a61a7..9313cb41a8a89dc388857ab1c46d0108b1deac58 100644 (file)
@@ -2107,6 +2107,7 @@ static void cayman_init_atom_start_cs(struct r600_context *rctx)
 
        r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
        r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0);
+       r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
 
        eg_store_loop_const(cb, R_03A200_SQ_LOOP_CONST_0, 0x01000FFF);
        eg_store_loop_const(cb, R_03A200_SQ_LOOP_CONST_0 + (32 * 4), 0x01000FFF);
@@ -2592,6 +2593,7 @@ void evergreen_init_atom_start_cs(struct r600_context *rctx)
 
        r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
        r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0);
+       r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
 
        eg_store_loop_const(cb, R_03A200_SQ_LOOP_CONST_0, 0x01000FFF);
        eg_store_loop_const(cb, R_03A200_SQ_LOOP_CONST_0 + (32 * 4), 0x01000FFF);
index ab4a3cf574fb9214a509e56fee7b357227a7700f..50a7bec7936a2bfeb508c7010579aba6868d240a 100644 (file)
@@ -2258,6 +2258,7 @@ void r600_init_atom_start_cs(struct r600_context *rctx)
        if (rctx->chip_class == R700 && rctx->screen->has_streamout)
                r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
        r600_store_context_reg(cb, R_028800_DB_DEPTH_CONTROL, 0);
+       r600_store_context_reg(cb, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
 
        r600_store_loop_const(cb, R_03E200_SQ_LOOP_CONST_0, 0x1000FFF);
        r600_store_loop_const(cb, R_03E200_SQ_LOOP_CONST_0 + (32 * 4), 0x1000FFF);
index d3d09839b1edfc660c4eadebd708653f77fd03c2..05152caf2a7bc4714cd831b765bd91499cd70578 100644 (file)
@@ -1111,7 +1111,6 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo)
                        struct r600_so_target *t = (struct r600_so_target*)info.count_from_stream_output;
                        uint64_t va = r600_resource_va(&rctx->screen->screen, (void*)t->filled_size);
 
-                       r600_write_context_reg(cs, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
                        r600_write_context_reg(cs, R_028B30_VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE, t->stride_in_dw);
 
                        cs->buf[cs->cdw++] = PKT3(PKT3_COPY_DW, 4, 0);