[Mesa-dev] [PATCH 7/6] radeonsi: don't call r600_can_dma_copy_buffer for DISCARD_RANGE
Nicolai Hähnle
nhaehnle at gmail.com
Thu Nov 9 12:48:53 UTC 2017
On 09.11.2017 04:21, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> we don't use dma_data in this codepath.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
> ---
> src/gallium/drivers/radeon/r600_buffer_common.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
> index cdcd37b..2e0f71a 100644
> --- a/src/gallium/drivers/radeon/r600_buffer_common.c
> +++ b/src/gallium/drivers/radeon/r600_buffer_common.c
> @@ -426,22 +426,21 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
> /* At this point, the buffer is always idle. */
> usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
> } else {
> /* Fall back to a temporary buffer. */
> usage |= PIPE_TRANSFER_DISCARD_RANGE;
> }
> }
>
> if ((usage & PIPE_TRANSFER_DISCARD_RANGE) &&
> ((!(usage & (PIPE_TRANSFER_UNSYNCHRONIZED |
> - PIPE_TRANSFER_PERSISTENT)) &&
> - r600_can_dma_copy_buffer(rctx, box->x, 0, box->width)) ||
> + PIPE_TRANSFER_PERSISTENT))) ||
> (rbuffer->flags & RADEON_FLAG_SPARSE))) {
> assert(usage & PIPE_TRANSFER_WRITE);
>
> /* Check if mapping this buffer would cause waiting for the GPU.
> */
> if (rbuffer->flags & RADEON_FLAG_SPARSE ||
> force_discard_range ||
> si_rings_is_buffer_referenced(rctx, rbuffer->buf, RADEON_USAGE_READWRITE) ||
> !rctx->ws->buffer_wait(rbuffer->buf, 0, RADEON_USAGE_READWRITE)) {
> /* Do a wait-free write-only transfer using a temporary buffer. */
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list