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:
Mike Blumenkrantz
2022-04-29 10:59:31 -04:00
committed by Marge Bot
parent 8c1d9c7b74
commit 5513597305
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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;
}
+1
View File
@@ -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)