With the virtio backend we will need to pass an extra flag when
allocating buffers that will be shared cross-device (such as with
virtio-wl for passing between host and guest)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14900>
#define FD_BO_CACHED_COHERENT BITSET_BIT(3)
/* Hint that the bo will not be mmap'd: */
#define FD_BO_NOMAP BITSET_BIT(4)
+/* Hint that the bo will be exported/shared: */
+#define FD_BO_SHARED BITSET_BIT(5)
/* bo access flags: (keep aligned to MSM_PREP_x) */
#define FD_BO_PREP_READ BITSET_BIT(0)
uint32_t flags =
COND(rsc->layout.tile_mode, FD_BO_NOMAP) |
COND(prsc->usage & PIPE_USAGE_STAGING, FD_BO_CACHED_COHERENT) |
+ COND(prsc->bind & PIPE_BIND_SHARED, FD_BO_SHARED) |
COND(prsc->bind & PIPE_BIND_SCANOUT, FD_BO_SCANOUT);
/* TODO other flags? */