diff options
author | Marek Olšák <[email protected]> | 2016-04-28 17:51:43 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-05-10 17:20:09 +0200 |
commit | fb89f066983eb3799bb05e2570dbbf66639f4818 (patch) | |
tree | 46ee6434dd083ff56391898a17b694d667687f3f /src/gallium/drivers/radeon | |
parent | 60946c0d60610b03bc297df17ec7a3cca1e5f6e8 (diff) |
radeonsi: consolidate radeon_add_to_buffer_list calls for DMA
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index bc7f5f53e5d..6cbc92bb5f4 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -166,6 +166,20 @@ void r600_need_dma_space(struct r600_common_context *ctx, unsigned num_dw, ctx->dma.flush(ctx, RADEON_FLUSH_ASYNC, NULL); assert((num_dw + ctx->dma.cs->cdw) <= ctx->dma.cs->max_dw); } + + /* If GPUVM is not supported, the CS checker needs 2 entries + * in the buffer list per packet, which has to be done manually. + */ + if (ctx->screen->info.has_virtual_memory) { + if (dst) + radeon_add_to_buffer_list(ctx, &ctx->dma, dst, + RADEON_USAGE_WRITE, + RADEON_PRIO_SDMA_BUFFER); + if (src) + radeon_add_to_buffer_list(ctx, &ctx->dma, src, + RADEON_USAGE_READ, + RADEON_PRIO_SDMA_BUFFER); + } } /* This is required to prevent read-after-write hazards. */ |