zink: add a bind flag to indicate a resource is exported as a dmabuf
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
This commit is contained in:
committed by
Marge Bot
parent
8c1d9c7b74
commit
5513597305
@@ -992,6 +992,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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user