summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-02-24 23:45:33 +0100
committerMarek Olšák <[email protected]>2016-03-09 15:02:26 +0100
commit6b187bbd9f9bb86556037b13afac0b1ff43e8293 (patch)
tree6f7d24c61193d68abb117b83aa9fccb331a53635 /src
parentecbd3aba1769b673b6c671762a68af812bbab815 (diff)
gallium/radeon: disallow reallocation of shared buffers
Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c4
1 files changed, 4 insertions, 0 deletions
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.
*/