radeonsi: remove useless variable si_context::pm4_dirty_cdwords
authorMarek Olšák <marek.olsak@amd.com>
Sun, 7 Dec 2014 14:58:46 +0000 (15:58 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 10 Dec 2014 20:59:37 +0000 (21:59 +0100)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_hw_context.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_state_draw.c

index e030c753d6cfc278efb403efca0b8ef78232c7eb..2bf1209ae26d289af5e154e0bbc7df8be1042132 100644 (file)
@@ -43,7 +43,7 @@ void si_need_cs_space(struct si_context *ctx, unsigned num_dw,
                }
 
                /* The number of dwords all the dirty states would take. */
-               num_dw += ctx->pm4_dirty_cdwords;
+               num_dw += si_pm4_dirty_dw(ctx);
 
                /* The upper-bound of how much a draw command would take. */
                num_dw += SI_MAX_DRAW_CS_DWORDS;
@@ -131,8 +131,6 @@ void si_context_gfx_flush(void *context, unsigned flags,
 
 void si_begin_new_cs(struct si_context *ctx)
 {
-       ctx->pm4_dirty_cdwords = 0;
-
        /* Flush read caches at the beginning of CS. */
        ctx->b.flags |= R600_CONTEXT_INV_TEX_CACHE |
                        R600_CONTEXT_INV_CONST_CACHE |
index 5867e738f6c8b7d32f3bf48c583c9e279157b386..0c33655920ec8ee14f16721fba07dcdd0b369f20 100644 (file)
@@ -137,10 +137,6 @@ struct si_context {
 
        unsigned default_ps_gprs, default_vs_gprs;
 
-       /* Below are variables from the old r600_context.
-        */
-       unsigned                pm4_dirty_cdwords;
-
        /* Vertex and index buffers. */
        bool                    vertex_buffers_dirty;
        struct pipe_index_buffer index_buffer;
index 4ed3847ae8d06e0d723c0135e401af7af0015de0..e1b5f65ed4f512871a366ae12e9898068124aff2 100644 (file)
@@ -1016,8 +1016,6 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
        if (!si_update_draw_info_state(sctx, info, &ib))
                return;
 
-       sctx->pm4_dirty_cdwords += si_pm4_dirty_dw(sctx);
-
        /* Check flush flags. */
        if (sctx->b.flags)
                sctx->atoms.s.cache_flush->dirty = true;
@@ -1033,8 +1031,6 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
        }
 
        si_pm4_emit_dirty(sctx);
-       sctx->pm4_dirty_cdwords = 0;
-
        si_emit_draw_packets(sctx, info, &ib);
 
 #if SI_TRACE_CS