radeonsi: allow DMABUF exports for local buffers
Cc: 17.3 <mesa-stable@lists.freedesktop.org> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
20ccb51ffc
commit
010214b403
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue