[Mesa-dev] [PATCH] gallium/radeon: don't use temporary buffers for persistent mappings
Michel Dänzer
michel at daenzer.net
Mon Mar 7 08:53:28 UTC 2016
On 02.03.2016 06:26, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> Cc: 11.1 11.2 <mesa-stable at lists.freedesktop.org>
> ---
> src/gallium/drivers/radeon/r600_buffer_common.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
> index b384baa..81409ce 100644
> --- a/src/gallium/drivers/radeon/r600_buffer_common.c
> +++ b/src/gallium/drivers/radeon/r600_buffer_common.c
> @@ -314,7 +314,8 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
> }
> }
> else if ((usage & PIPE_TRANSFER_DISCARD_RANGE) &&
> - !(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
> + !(usage & (PIPE_TRANSFER_UNSYNCHRONIZED |
> + PIPE_TRANSFER_PERSISTENT)) &&
> !(rscreen->debug_flags & DBG_NO_DISCARD_RANGE) &&
> r600_can_dma_copy_buffer(rctx, box->x, 0, box->width)) {
> assert(usage & PIPE_TRANSFER_WRITE);
> @@ -341,7 +342,8 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
> }
> /* Using a staging buffer in GTT for larger reads is much faster. */
> else if ((usage & PIPE_TRANSFER_READ) &&
> - !(usage & PIPE_TRANSFER_WRITE) &&
> + !(usage & (PIPE_TRANSFER_WRITE |
> + PIPE_TRANSFER_PERSISTENT)) &&
> rbuffer->domains == RADEON_DOMAIN_VRAM &&
> r600_can_dma_copy_buffer(rctx, 0, box->x, box->width)) {
> struct r600_resource *staging;
>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list