aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-25 20:50:31 +0100
committerMarek Olšák <[email protected]>2017-11-29 18:21:30 +0100
commit092756f23fee2ea2a98a230d020132a45a6e1e94 (patch)
tree192a305b6e9eb4503ebf7032cdc204f81246f82d
parentb191e2d79df5630d532f0801ff0cd3e58058d897 (diff)
radeonsi: remove r600_common_context::clear_buffer
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c11
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h4
-rw-r--r--src/gallium/drivers/radeonsi/si_cp_dma.c1
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c6
-rw-r--r--src/gallium/drivers/radeonsi/si_test_dma.c2
5 files changed, 4 insertions, 20 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index d7927aa3f34..f410b277c25 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -421,16 +421,6 @@ bool si_check_device_reset(struct r600_common_context *rctx)
return true;
}
-static void r600_dma_clear_buffer_fallback(struct pipe_context *ctx,
- struct pipe_resource *dst,
- uint64_t offset, uint64_t size,
- unsigned value)
-{
- struct r600_common_context *rctx = (struct r600_common_context *)ctx;
-
- rctx->clear_buffer(ctx, dst, offset, size, value, R600_COHERENCY_NONE);
-}
-
static bool r600_resource_commit(struct pipe_context *pctx,
struct pipe_resource *resource,
unsigned level, struct pipe_box *box,
@@ -484,7 +474,6 @@ bool si_common_context_init(struct r600_common_context *rctx,
rctx->b.transfer_unmap = u_transfer_unmap_vtbl;
rctx->b.texture_subdata = u_default_texture_subdata;
rctx->b.memory_barrier = r600_memory_barrier;
- rctx->dma_clear_buffer = r600_dma_clear_buffer_fallback;
rctx->b.buffer_subdata = si_buffer_subdata;
if (rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 43) {
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index a1ec0b8fb28..0982d1d1b3d 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -595,10 +595,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 (*clear_buffer)(struct pipe_context *ctx, struct pipe_resource *dst,
- uint64_t offset, uint64_t size, unsigned value,
- enum r600_coherency coher);
-
void (*blit_decompress_depth)(struct pipe_context *ctx,
struct r600_texture *texture,
struct r600_texture *staging,
diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c
index 89492d3500e..5582471c491 100644
--- a/src/gallium/drivers/radeonsi/si_cp_dma.c
+++ b/src/gallium/drivers/radeonsi/si_cp_dma.c
@@ -591,5 +591,4 @@ void cik_emit_prefetch_L2(struct si_context *sctx)
void si_init_cp_dma_functions(struct si_context *sctx)
{
sctx->b.b.clear_buffer = si_pipe_clear_buffer;
- sctx->b.clear_buffer = si_clear_buffer;
}
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index bf2867759c1..eb0283aac9a 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -322,9 +322,9 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
&sctx->null_const_buf);
/* Clear the NULL constant buffer, because loads should return zeros. */
- sctx->b.clear_buffer(&sctx->b.b, sctx->null_const_buf.buffer, 0,
- sctx->null_const_buf.buffer->width0, 0,
- R600_COHERENCY_SHADER);
+ si_clear_buffer(&sctx->b.b, sctx->null_const_buf.buffer, 0,
+ sctx->null_const_buf.buffer->width0, 0,
+ R600_COHERENCY_SHADER);
}
uint64_t max_threads_per_block;
diff --git a/src/gallium/drivers/radeonsi/si_test_dma.c b/src/gallium/drivers/radeonsi/si_test_dma.c
index beb3be50ee6..de88469b654 100644
--- a/src/gallium/drivers/radeonsi/si_test_dma.c
+++ b/src/gallium/drivers/radeonsi/si_test_dma.c
@@ -292,7 +292,7 @@ void si_test_dma(struct si_screen *sscreen)
set_random_pixels(ctx, src, &src_cpu);
/* clear dst pixels */
- sctx->b.clear_buffer(ctx, dst, 0, rdst->surface.surf_size, 0, true);
+ si_clear_buffer(ctx, dst, 0, rdst->surface.surf_size, 0, true);
memset(dst_cpu.ptr, 0, dst_cpu.layer_stride * tdst.array_size);
/* preparation */