From: Marek Olšák Date: Wed, 24 Feb 2016 16:36:52 +0000 (+0100) Subject: gallium/radeon: buffer valid range tracking only works with unshared buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afdaffcbdb35e326e06d458c01a31a4e262ace24;p=mesa.git gallium/radeon: buffer valid range tracking only works with unshared buffers Reviewed-by: Michel Dänzer Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 439a3cb30c0..fb3a80e7d03 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -294,6 +294,7 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx, * in which case it can be mapped unsynchronized. */ if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) && usage & PIPE_TRANSFER_WRITE && + !rbuffer->is_shared && !util_ranges_intersect(&rbuffer->valid_buffer_range, box->x, box->x + box->width)) { usage |= PIPE_TRANSFER_UNSYNCHRONIZED; }