mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 08:40:39 +01:00
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>
(cherry picked from commit 010214b403)
[Emil Velikov: s/sscreen/rscreen/]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/radeon/r600_texture.c
This commit is contained in:
parent
b6fd93f8dc
commit
d92f520e1f
1 changed files with 4 additions and 1 deletions
|
|
@ -662,8 +662,11 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen,
|
|||
slice_size = rtex->surface.u.legacy.level[0].slice_size;
|
||||
}
|
||||
} else {
|
||||
/* Buffer exports are for the OpenCL interop. */
|
||||
/* Move a suballocated buffer into a non-suballocated allocation. */
|
||||
if (rscreen->ws->buffer_is_suballocated(res->buf)) {
|
||||
if (rscreen->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…
Add table
Reference in a new issue