[Mesa-dev] [PATCH 11/55] radeonsi: remove r600_pipe_common::decompress_dcc

Marek Olšák maraeo at gmail.com
Mon Apr 2 04:08:04 UTC 2018


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

---
 src/gallium/drivers/radeon/r600_pipe_common.h | 3 ---
 src/gallium/drivers/radeon/r600_texture.c     | 4 ++--
 src/gallium/drivers/radeonsi/si_blit.c        | 4 +---
 src/gallium/drivers/radeonsi/si_descriptors.c | 4 ++--
 src/gallium/drivers/radeonsi/si_pipe.h        | 1 +
 src/gallium/drivers/radeonsi/si_state.c       | 2 +-
 6 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index 2e2b80b..7793843 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -491,9 +491,6 @@ struct r600_common_context {
 				      unsigned first_level, unsigned last_level,
 				      unsigned first_layer, unsigned last_layer,
 				      unsigned first_sample, unsigned last_sample);
-
-	void (*decompress_dcc)(struct pipe_context *ctx,
-			       struct r600_texture *rtex);
 };
 
 /* r600_buffer_common.c */
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index fa12497..4d09de4 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -480,7 +480,7 @@ bool si_texture_disable_dcc(struct r600_common_context *rctx,
 		mtx_lock(&sscreen->aux_context_lock);
 
 	/* Decompress DCC. */
-	rctx->decompress_dcc(&rctx->b, rtex);
+	si_decompress_dcc(&rctx->b, rtex);
 	rctx->b.flush(&rctx->b, NULL, 0);
 
 	if (&rctx->b == sscreen->aux_context)
@@ -1973,7 +1973,7 @@ void vi_disable_dcc_if_incompatible_format(struct r600_common_context *rctx,
 
 	if (vi_dcc_formats_are_incompatible(tex, level, view_format))
 		if (!si_texture_disable_dcc(rctx, (struct r600_texture*)tex))
-			rctx->decompress_dcc(&rctx->b, rtex);
+			si_decompress_dcc(&rctx->b, rtex);
 }
 
 struct pipe_surface *si_create_surface_custom(struct pipe_context *pipe,
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index c34d677..229cbba 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -1317,8 +1317,7 @@ static void si_flush_resource(struct pipe_context *ctx,
 	}
 }
 
-static void si_decompress_dcc(struct pipe_context *ctx,
-			      struct r600_texture *rtex)
+void si_decompress_dcc(struct pipe_context *ctx, struct r600_texture *rtex)
 {
 	if (!rtex->dcc_offset)
 		return;
@@ -1335,5 +1334,4 @@ void si_init_blit_functions(struct si_context *sctx)
 	sctx->b.b.flush_resource = si_flush_resource;
 	sctx->b.b.generate_mipmap = si_generate_mipmap;
 	sctx->b.blit_decompress_depth = si_blit_decompress_depth;
-	sctx->b.decompress_dcc = si_decompress_dcc;
 }
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index a9c1b7f..d0295db 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -444,7 +444,7 @@ static void si_set_sampler_view_desc(struct si_context *sctx,
 	if (unlikely(!is_buffer && sview->dcc_incompatible)) {
 		if (vi_dcc_enabled(rtex, view->u.tex.first_level))
 			if (!si_texture_disable_dcc(&sctx->b, rtex))
-				sctx->b.decompress_dcc(&sctx->b.b, rtex);
+				si_decompress_dcc(&sctx->b.b, rtex);
 
 		sview->dcc_incompatible = false;
 	}
@@ -731,7 +731,7 @@ static void si_set_shader_image_desc(struct si_context *ctx,
 			 * has been decompressed already.
 			 */
 			if (!si_texture_disable_dcc(&ctx->b, tex))
-				ctx->b.decompress_dcc(&ctx->b.b, tex);
+				si_decompress_dcc(&ctx->b.b, tex);
 		}
 
 		if (ctx->b.chip_class >= GFX9) {
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 793bb5d..d621c11 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -658,6 +658,7 @@ void si_resource_copy_region(struct pipe_context *ctx,
 			     struct pipe_resource *src,
 			     unsigned src_level,
 			     const struct pipe_box *src_box);
+void si_decompress_dcc(struct pipe_context *ctx, struct r600_texture *rtex);
 
 /* si_clear.c */
 void vi_dcc_clear_level(struct si_context *sctx,
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index ee4f96d..0d89fe5 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2761,7 +2761,7 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
 
 		if (vi_dcc_enabled(rtex, surf->base.u.tex.level))
 			if (!si_texture_disable_dcc(&sctx->b, rtex))
-				sctx->b.decompress_dcc(ctx, rtex);
+				si_decompress_dcc(ctx, rtex);
 
 		surf->dcc_incompatible = false;
 	}
-- 
2.7.4



More information about the mesa-dev mailing list