[Mesa-dev] [PATCH 04/18] radeonsi: remove useless variable si_context::pm4_dirty_cdwords

Marek Olšák maraeo at gmail.com
Tue Dec 9 03:39:52 PST 2014


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/radeonsi/si_hw_context.c | 4 +---
 src/gallium/drivers/radeonsi/si_pipe.h       | 4 ----
 src/gallium/drivers/radeonsi/si_state_draw.c | 4 ----
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
index e030c75..2bf1209 100644
--- a/src/gallium/drivers/radeonsi/si_hw_context.c
+++ b/src/gallium/drivers/radeonsi/si_hw_context.c
@@ -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 |
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 5867e73..0c33655 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -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;
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 4ed3847..e1b5f65 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -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
-- 
2.1.0



More information about the mesa-dev mailing list