radeonsi: fix an assertion failure: assert(!res->b.is_shared)
authorMarek Olšák <marek.olsak@amd.com>
Fri, 2 Aug 2019 23:07:58 +0000 (19:07 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 19 Aug 2019 21:23:38 +0000 (17:23 -0400)
This only appears to happen on Raven2.

Possible way to reproduce:

resource_get_handle(WINSYS_HANDLE_TYPE_KMS) --> sets is_shared = true
resource_get_handle(WINSYS_HANDLE_TYPE_DMABUF) --> fail

Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/radeonsi/si_texture.c

index 904a39b6fed7deb2dd70264c28c3e1232279a1c4..be614e66440a2c865ebe605e0694406a8e0ecd64 100644 (file)
@@ -919,8 +919,7 @@ static bool si_texture_get_handle(struct pipe_screen* screen,
                if (sscreen->ws->buffer_is_suballocated(res->buf) ||
                    tex->surface.tile_swizzle ||
                    (tex->buffer.flags & RADEON_FLAG_NO_INTERPROCESS_SHARING &&
-                    sscreen->info.has_local_buffers &&
-                    whandle->type != WINSYS_HANDLE_TYPE_KMS)) {
+                    sscreen->info.has_local_buffers)) {
                        assert(!res->b.is_shared);
                        si_reallocate_texture_inplace(sctx, tex,
                                                        PIPE_BIND_SHARED, false);