mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
radeonsi: only expose *_init_*dma_functions from (S)DMA files
just normalizing the interfaces Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
3af28e558f
commit
498a40cae8
5 changed files with 31 additions and 34 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue