diff --git a/src/freedreno/drm/freedreno_drmif.h b/src/freedreno/drm/freedreno_drmif.h index 73c7b5ed84d..e0e2b5b819a 100644 --- a/src/freedreno/drm/freedreno_drmif.h +++ b/src/freedreno/drm/freedreno_drmif.h @@ -104,6 +104,8 @@ struct fd_fence { #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) diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 094e0643cc3..327bc367451 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -198,6 +198,7 @@ realloc_bo(struct fd_resource *rsc, uint32_t size) 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? */