[12/55] radeonsi: remove r600_pipe_common::blit_decompress_depth

Submitted by Marek Olšák on April 2, 2018, 4:08 a.m.

Details

Message ID 1522642128-15348-13-git-send-email-maraeo@gmail.com
State Accepted
Commit 85e75b2da5c4ef2ca02417024b154cc24d153a13
Headers show
Series "RadeonSI Mega cleanup" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Marek Olšák April 2, 2018, 4:08 a.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/gallium/drivers/radeon/r600_pipe_common.h |  7 -------
 src/gallium/drivers/radeon/r600_texture.c     | 12 ++++++------
 src/gallium/drivers/radeonsi/si_blit.c        | 13 ++++++-------
 src/gallium/drivers/radeonsi/si_pipe.h        |  6 ++++++
 4 files changed, 18 insertions(+), 20 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index 7793843..26d9511 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -484,13 +484,6 @@  struct r600_common_context {
 
 	void (*dma_clear_buffer)(struct pipe_context *ctx, struct pipe_resource *dst,
 				 uint64_t offset, uint64_t size, unsigned value);
-
-	void (*blit_decompress_depth)(struct pipe_context *ctx,
-				      struct r600_texture *texture,
-				      struct r600_texture *staging,
-				      unsigned first_level, unsigned last_level,
-				      unsigned first_layer, unsigned last_layer,
-				      unsigned first_sample, unsigned last_sample);
 };
 
 /* r600_buffer_common.c */
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 4d09de4..0a89e8a 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1746,8 +1746,8 @@  static void *r600_texture_transfer_map(struct pipe_context *ctx,
 				}
 
 				r600_copy_region_with_blit(ctx, temp, 0, 0, 0, 0, texture, level, box);
-				rctx->blit_decompress_depth(ctx, (struct r600_texture*)temp, staging_depth,
-							    0, 0, 0, box->depth, 0, 0);
+				si_blit_decompress_depth(ctx, (struct r600_texture*)temp, staging_depth,
+							 0, 0, 0, box->depth, 0, 0);
 				pipe_resource_reference(&temp, NULL);
 			}
 
@@ -1764,10 +1764,10 @@  static void *r600_texture_transfer_map(struct pipe_context *ctx,
 				return NULL;
 			}
 
-			rctx->blit_decompress_depth(ctx, rtex, staging_depth,
-						    level, level,
-						    box->z, box->z + box->depth - 1,
-						    0, 0);
+			si_blit_decompress_depth(ctx, rtex, staging_depth,
+						 level, level,
+						 box->z, box->z + box->depth - 1,
+						 0, 0);
 
 			offset = r600_texture_get_offset(rctx->screen, staging_depth,
 							 level, box,
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index 229cbba..c75fea4 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -168,12 +168,12 @@  si_blit_dbcb_copy(struct si_context *sctx,
 	return fully_copied_levels;
 }
 
-static void si_blit_decompress_depth(struct pipe_context *ctx,
-				     struct r600_texture *texture,
-				     struct r600_texture *staging,
-				     unsigned first_level, unsigned last_level,
-				     unsigned first_layer, unsigned last_layer,
-				     unsigned first_sample, unsigned last_sample)
+void si_blit_decompress_depth(struct pipe_context *ctx,
+			      struct r600_texture *texture,
+			      struct r600_texture *staging,
+			      unsigned first_level, unsigned last_level,
+			      unsigned first_layer, unsigned last_layer,
+			      unsigned first_sample, unsigned last_sample)
 {
 	const struct util_format_description *desc;
 	unsigned planes = 0;
@@ -1333,5 +1333,4 @@  void si_init_blit_functions(struct si_context *sctx)
 	sctx->b.b.blit = si_blit;
 	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;
 }
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index d621c11..62ddcce 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -659,6 +659,12 @@  void si_resource_copy_region(struct pipe_context *ctx,
 			     unsigned src_level,
 			     const struct pipe_box *src_box);
 void si_decompress_dcc(struct pipe_context *ctx, struct r600_texture *rtex);
+void si_blit_decompress_depth(struct pipe_context *ctx,
+			      struct r600_texture *texture,
+			      struct r600_texture *staging,
+			      unsigned first_level, unsigned last_level,
+			      unsigned first_layer, unsigned last_layer,
+			      unsigned first_sample, unsigned last_sample);
 
 /* si_clear.c */
 void vi_dcc_clear_level(struct si_context *sctx,