diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index cbeba1ea94a..8522d7e84e2 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -2013,7 +2013,7 @@ tc_invalidate_buffer(struct threaded_context *tc, /* Shared, pinned, and sparse buffers can't be reallocated. */ if (tbuf->is_shared || tbuf->is_user_ptr || - tbuf->b.flags & PIPE_RESOURCE_FLAG_SPARSE) + tbuf->b.flags & (PIPE_RESOURCE_FLAG_SPARSE | PIPE_RESOURCE_FLAG_UNMAPPABLE)) return false; /* Allocate a new one. */ @@ -2085,7 +2085,7 @@ tc_improve_map_buffer_flags(struct threaded_context *tc, * (fully invalidated). That may just be a radeonsi limitation, but * the threaded context must obey it with radeonsi. */ - if (tres->b.flags & PIPE_RESOURCE_FLAG_SPARSE) { + if (tres->b.flags & (PIPE_RESOURCE_FLAG_SPARSE | PIPE_RESOURCE_FLAG_UNMAPPABLE)) { /* We can use DISCARD_RANGE instead of full discard. This is the only * fast path for sparse buffers that doesn't need thread synchronization. */ diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 952033ffb9b..793b0a71385 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -530,7 +530,8 @@ enum pipe_flush_flags #define PIPE_RESOURCE_FLAG_ENCRYPTED (1 << 5) #define PIPE_RESOURCE_FLAG_DONT_OVER_ALLOCATE (1 << 6) #define PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY (1 << 7) /* for small visible VRAM */ -#define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 8) /* driver/winsys private */ +#define PIPE_RESOURCE_FLAG_UNMAPPABLE (1 << 8) /* implies staging transfers due to VK interop */ +#define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 9) /* driver/winsys private */ #define PIPE_RESOURCE_FLAG_FRONTEND_PRIV (1 << 24) /* gallium frontend private */ /**