From 6b187bbd9f9bb86556037b13afac0b1ff43e8293 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 24 Feb 2016 23:45:33 +0100 Subject: [PATCH] gallium/radeon: disallow reallocation of shared buffers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_buffer_common.c | 4 ++++ 1 file changed, 4 insertions(+) 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. */ -- 2.30.2