diff options
author | Marek Olšák <[email protected]> | 2016-04-22 22:03:24 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-05-10 17:20:09 +0200 |
commit | 498a40cae8023a8461e7cfe95cb837a0aa459337 (patch) | |
tree | 6606e6dd71e33ed35c7ff0eddd627dc4b710fd64 /src/gallium/drivers/radeonsi | |
parent | 3af28e558fb9cf71edd83e8cc9c3ddc33373cc93 (diff) |
radeonsi: only expose *_init_*dma_functions from (S)DMA files
just normalizing the interfaces
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/cik_sdma.c | 19 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_dma.c | 19 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 16 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 6 |
5 files changed, 31 insertions, 34 deletions
diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c index 7f7db91803d..a8caf04909f 100644 --- a/src/gallium/drivers/radeonsi/cik_sdma.c +++ b/src/gallium/drivers/radeonsi/cik_sdma.c @@ -193,13 +193,13 @@ static void cik_sdma_copy_tile(struct si_context *ctx, } } -void cik_sdma_copy(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dstx, unsigned dsty, unsigned dstz, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box) +static void cik_sdma_copy(struct pipe_context *ctx, + struct pipe_resource *dst, + unsigned dst_level, + unsigned dstx, unsigned dsty, unsigned dstz, + struct pipe_resource *src, + unsigned src_level, + const struct pipe_box *src_box) { struct si_context *sctx = (struct si_context *)ctx; struct r600_texture *rsrc = (struct r600_texture*)src; @@ -324,3 +324,8 @@ fallback: si_resource_copy_region(ctx, dst, dst_level, dstx, dsty, dstz, src, src_level, src_box); } + +void cik_init_sdma_functions(struct si_context *sctx) +{ + sctx->b.dma_copy = cik_sdma_copy; +} diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c index 84961d5a13c..033eb7b1479 100644 --- a/src/gallium/drivers/radeonsi/si_dma.c +++ b/src/gallium/drivers/radeonsi/si_dma.c @@ -190,13 +190,13 @@ static void si_dma_copy_tile(struct si_context *ctx, } } -void si_dma_copy(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dstx, unsigned dsty, unsigned dstz, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box) +static void si_dma_copy(struct pipe_context *ctx, + struct pipe_resource *dst, + unsigned dst_level, + unsigned dstx, unsigned dsty, unsigned dstz, + struct pipe_resource *src, + unsigned src_level, + const struct pipe_box *src_box) { struct si_context *sctx = (struct si_context *)ctx; struct r600_texture *rsrc = (struct r600_texture*)src; @@ -293,3 +293,8 @@ fallback: si_resource_copy_region(ctx, dst, dst_level, dstx, dsty, dstz, src, src_level, src_box); } + +void si_init_dma_functions(struct si_context *sctx) +{ + sctx->b.dma_copy = si_dma_copy; +} diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 1a69f43c8c2..f2692dc9058 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -192,6 +192,11 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, si_init_state_functions(sctx); si_init_shader_functions(sctx); + if (sctx->b.chip_class >= CIK) + cik_init_sdma_functions(sctx); + else + si_init_dma_functions(sctx); + if (sscreen->b.debug_flags & DBG_FORCE_DMA) sctx->b.b.resource_copy_region = sctx->b.dma_copy; diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index d31e9a93ef9..33d3d259e2a 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -325,13 +325,7 @@ struct si_context { }; /* cik_sdma.c */ -void cik_sdma_copy(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dstx, unsigned dsty, unsigned dstz, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box); +void cik_init_sdma_functions(struct si_context *sctx); /* si_blit.c */ void si_init_blit_functions(struct si_context *sctx); @@ -357,13 +351,7 @@ void si_check_vm_faults(struct si_context *sctx); bool si_replace_shader(unsigned num, struct radeon_shader_binary *binary); /* si_dma.c */ -void si_dma_copy(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dstx, unsigned dsty, unsigned dstz, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box); +void si_init_dma_functions(struct si_context *sctx); /* si_hw_context.c */ void si_context_gfx_flush(void *context, unsigned flags, diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index c4af77e149c..8eb2b3dd6b0 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3387,12 +3387,6 @@ void si_init_state_functions(struct si_context *sctx) sctx->b.b.draw_vbo = si_draw_vbo; - if (sctx->b.chip_class >= CIK) { - sctx->b.dma_copy = cik_sdma_copy; - } else { - sctx->b.dma_copy = si_dma_copy; - } - si_init_config(sctx); } |