mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
zink: add a bind flag to indicate a resource is exported as a dmabuf
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
3d82b71516
commit
c425166bc9
2 changed files with 3 additions and 0 deletions
|
|
@ -987,6 +987,8 @@ resource_create(struct pipe_screen *pscreen,
|
|||
_mesa_hash_table_init(&res->surface_cache, NULL, NULL, equals_ivci);
|
||||
simple_mtx_init(&res->surface_mtx, mtx_plain);
|
||||
}
|
||||
if (res->obj->exportable)
|
||||
res->base.b.bind |= ZINK_BIND_DMABUF;
|
||||
return &res->base.b;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ struct zink_bo;
|
|||
#include <vulkan/vulkan.h>
|
||||
|
||||
#define ZINK_MAP_TEMPORARY (PIPE_MAP_DRV_PRV << 0)
|
||||
#define ZINK_BIND_DMABUF (1 << 29)
|
||||
#define ZINK_BIND_TRANSIENT (1 << 30) //transient fb attachment
|
||||
#define ZINK_BIND_VIDEO (1 << 31)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue