radeonsi: add a cs parameter into si_cp_copy_data
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -722,7 +722,7 @@ static void si_setup_tgsi_user_data(struct si_context *sctx,
|
||||
if (info->indirect) {
|
||||
if (program->uses_grid_size) {
|
||||
for (unsigned i = 0; i < 3; ++i) {
|
||||
si_cp_copy_data(sctx,
|
||||
si_cp_copy_data(sctx, sctx->gfx_cs,
|
||||
COPY_DATA_REG, NULL, (grid_size_reg >> 2) + i,
|
||||
COPY_DATA_SRC_MEM, si_resource(info->indirect),
|
||||
info->indirect_offset + 4 * i);
|
||||
|
||||
@@ -607,18 +607,17 @@ void si_cp_write_data(struct si_context *sctx, struct si_resource *buf,
|
||||
radeon_emit_array(cs, (const uint32_t*)data, size/4);
|
||||
}
|
||||
|
||||
void si_cp_copy_data(struct si_context *sctx,
|
||||
void si_cp_copy_data(struct si_context *sctx, struct radeon_cmdbuf *cs,
|
||||
unsigned dst_sel, struct si_resource *dst, unsigned dst_offset,
|
||||
unsigned src_sel, struct si_resource *src, unsigned src_offset)
|
||||
{
|
||||
struct radeon_cmdbuf *cs = sctx->gfx_cs;
|
||||
|
||||
/* cs can point to the compute IB, which has the buffer list in gfx_cs. */
|
||||
if (dst) {
|
||||
radeon_add_to_buffer_list(sctx, cs, dst,
|
||||
radeon_add_to_buffer_list(sctx, sctx->gfx_cs, dst,
|
||||
RADEON_USAGE_WRITE, RADEON_PRIO_CP_DMA);
|
||||
}
|
||||
if (src) {
|
||||
radeon_add_to_buffer_list(sctx, cs, src,
|
||||
radeon_add_to_buffer_list(sctx, sctx->gfx_cs, src,
|
||||
RADEON_USAGE_READ, RADEON_PRIO_CP_DMA);
|
||||
}
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ static void si_pc_emit_start(struct si_context *sctx,
|
||||
{
|
||||
struct radeon_cmdbuf *cs = sctx->gfx_cs;
|
||||
|
||||
si_cp_copy_data(sctx,
|
||||
si_cp_copy_data(sctx, sctx->gfx_cs,
|
||||
COPY_DATA_DST_MEM, buffer, va - buffer->gpu_address,
|
||||
COPY_DATA_IMM, NULL, 1);
|
||||
|
||||
|
||||
@@ -1240,7 +1240,7 @@ void si_test_gds(struct si_context *sctx);
|
||||
void si_cp_write_data(struct si_context *sctx, struct si_resource *buf,
|
||||
unsigned offset, unsigned size, unsigned dst_sel,
|
||||
unsigned engine, const void *data);
|
||||
void si_cp_copy_data(struct si_context *sctx,
|
||||
void si_cp_copy_data(struct si_context *sctx, struct radeon_cmdbuf *cs,
|
||||
unsigned dst_sel, struct si_resource *dst, unsigned dst_offset,
|
||||
unsigned src_sel, struct si_resource *src, unsigned src_offset);
|
||||
|
||||
|
||||
@@ -681,7 +681,7 @@ static void si_emit_draw_packets(struct si_context *sctx,
|
||||
|
||||
radeon_set_context_reg(cs, R_028B30_VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE,
|
||||
t->stride_in_dw);
|
||||
si_cp_copy_data(sctx,
|
||||
si_cp_copy_data(sctx, sctx->gfx_cs,
|
||||
COPY_DATA_REG, NULL,
|
||||
R_028B2C_VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE >> 2,
|
||||
COPY_DATA_SRC_MEM, t->buf_filled_size,
|
||||
|
||||
Reference in New Issue
Block a user