radeonsi: remove r600_common_context::clear_buffer
authorMarek Olšák <marek.olsak@amd.com>
Sat, 25 Nov 2017 19:50:31 +0000 (20:50 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 29 Nov 2017 17:21:30 +0000 (18:21 +0100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeonsi/si_cp_dma.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_test_dma.c

index d7927aa3f3473cbedc331f354c78362d92864c77..f410b277c25d22fedb7beeb37a8b7e304a10b472 100644 (file)
@@ -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) {
index a1ec0b8fb28cb32c4c2bfd8d4ddcd1f83e3d49cd..0982d1d1b3d51f801ba6d2fda76f2c80c7b2eb27 100644 (file)
@@ -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,
index 89492d3500e1f4d44bc34c6487632ec0e3d5f825..5582471c4919f14e6d4eea28c8f38f7477fb4fe4 100644 (file)
@@ -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;
 }
index bf2867759c17cf3be6c22070269ff4f67a2b6e52..eb0283aac9a9cf01421056fe80bb802bfe14b1ec 100644 (file)
@@ -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;
index beb3be50ee657fc6d8cd56463c25da64e6b72af2..de88469b654ddcb3d992c9f629b630e1c802561d 100644 (file)
@@ -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 */