diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 0e38ebfce43..5f2b3342983 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -367,6 +367,12 @@ check_ici(struct zink_screen *screen, VkImageCreateInfo *ici, uint64_t modifier) image_props = props2.imageFormatProperties; if (screen->info.have_EXT_host_image_copy && ici->usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT) optimalDeviceAccess = hic.optimalDeviceAccess; +#if defined(MVK_VERSION) + // MoltenVK cannot allocate a depth buffer with VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT + // As hic.identicalMemoryLayout is set, it is not needed? + if (screen->info.have_EXT_host_image_copy && ici->usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT && hic.identicalMemoryLayout) + optimalDeviceAccess = false; +#endif } else ret = VKSCR(GetPhysicalDeviceImageFormatProperties)(screen->pdev, ici->format, ici->imageType, ici->tiling, ici->usage, ici->flags, &image_props);