From: Marek Olšák Date: Wed, 24 Feb 2016 22:45:33 +0000 (+0100) Subject: gallium/radeon: disallow reallocation of shared buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b187bbd9f9bb86556037b13afac0b1ff43e8293;p=mesa.git gallium/radeon: disallow reallocation of shared 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 70c8eb2695e..33ba0fbca9b 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -213,6 +213,10 @@ static bool r600_invalidate_buffer(struct r600_common_context *rctx, struct r600_resource *rbuffer) { + /* Shared buffers can't be reallocated. */ + if (rbuffer->is_shared) + return false; + /* In AMD_pinned_memory, the user pointer association only gets * broken when the buffer is explicitly re-allocated. */