summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-30 22:49:10 +0100
committerMarek Olšák <[email protected]>2017-12-06 15:19:02 +0100
commit010214b403de1b5e25a549372ba6192b89e05d06 (patch)
treebc7edebdde3d5966bcba9fb8ae2ec400848a0e17
parent20ccb51ffcc46a68ab0eb82a43ed55a1e1952850 (diff)
radeonsi: allow DMABUF exports for local buffers
Cc: 17.3 <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 2aa47b55d59..cb69398e6af 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -746,8 +746,11 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen,
slice_size = (uint64_t)rtex->surface.u.legacy.level[0].slice_size_dw * 4;
}
} else {
+ /* Buffer exports are for the OpenCL interop. */
/* Move a suballocated buffer into a non-suballocated allocation. */
- if (sscreen->ws->buffer_is_suballocated(res->buf)) {
+ if (sscreen->ws->buffer_is_suballocated(res->buf) ||
+ /* A DMABUF export always fails if the BO is local. */
+ rtex->resource.flags & RADEON_FLAG_NO_INTERPROCESS_SHARING) {
assert(!res->b.is_shared);
/* Allocate a new buffer with PIPE_BIND_SHARED. */