}
}
-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;
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;
+}
}
}
-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;
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;
+}
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;
};
/* 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);
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,
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);
}