zink: add a VkExternalMemoryImageCreateInfo for PIPE_BIND_SHARED images
required by spec Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8273>
This commit is contained in:
committed by
Marge Bot
parent
7f1ad0538f
commit
b415211ce9
@@ -171,6 +171,7 @@ resource_create(struct pipe_screen *pscreen,
|
||||
res->format = zink_get_format(screen, templ->format);
|
||||
|
||||
VkImageCreateInfo ici = {};
|
||||
VkExternalMemoryImageCreateInfo emici = {};
|
||||
ici.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
|
||||
ici.flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
|
||||
|
||||
@@ -221,6 +222,12 @@ resource_create(struct pipe_screen *pscreen,
|
||||
ici.tiling = VK_IMAGE_TILING_LINEAR;
|
||||
}
|
||||
|
||||
if (templ->bind & PIPE_BIND_SHARED) {
|
||||
emici.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO;
|
||||
emici.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT;
|
||||
ici.pNext = &emici;
|
||||
}
|
||||
|
||||
if (templ->usage == PIPE_USAGE_STAGING)
|
||||
ici.tiling = VK_IMAGE_TILING_LINEAR;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user