Vulkan: Fix MemoryServiceZirconHandle CreateImage
vkCreateImage when bound to imported memory, must also have a VkExternalImageCreateInfo struct in its pNext chain that has VK_EXTERNAL_MEMORY_HANDLE_TYPE_TEMP_ZIRCON_VMO_BIT_FUCHSIA as a handleType. This was discovered when tests started failing after a roll of the Vulkan validation layers. Bug: none Change-Id: Ic7fc95f963062c8740e714a490adf6a020fed220 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25100 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
cb2938a1af
commit
b92a363a1a
|
@ -131,7 +131,14 @@ namespace dawn_native { namespace vulkan { namespace external_memory {
|
|||
|
||||
ResultOrError<VkImage> Service::CreateImage(const ExternalImageDescriptor* descriptor,
|
||||
const VkImageCreateInfo& baseCreateInfo) {
|
||||
VkExternalMemoryImageCreateInfo externalMemoryImageCreateInfo;
|
||||
externalMemoryImageCreateInfo.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO;
|
||||
externalMemoryImageCreateInfo.pNext = nullptr;
|
||||
externalMemoryImageCreateInfo.handleTypes =
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_TEMP_ZIRCON_VMO_BIT_FUCHSIA;
|
||||
|
||||
VkImageCreateInfo createInfo = baseCreateInfo;
|
||||
createInfo.pNext = &externalMemoryImageCreateInfo;
|
||||
createInfo.flags = VK_IMAGE_CREATE_ALIAS_BIT_KHR;
|
||||
createInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
|
||||
createInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
|
|
Loading…
Reference in New Issue