panvk: wire up swapchain image creation

This is also needed to properly support VK_KHR_swapchain, so we should
implement it.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32216>
This commit is contained in:
Erik Faye-Lund 2024-11-20 10:07:41 +01:00 committed by Marge Bot
parent f77fe432c1
commit 3305f772fa

View file

@ -279,6 +279,17 @@ panvk_CreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkImage *pImage)
{
VK_FROM_HANDLE(panvk_device, dev, device);
struct panvk_physical_device *phys_dev =
to_panvk_physical_device(dev->vk.physical);
const VkImageSwapchainCreateInfoKHR *swapchain_info =
vk_find_struct_const(pCreateInfo->pNext, IMAGE_SWAPCHAIN_CREATE_INFO_KHR);
if (swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE) {
return wsi_common_create_swapchain_image(&phys_dev->wsi_device,
pCreateInfo,
swapchain_info->swapchain,
pImage);
}
struct panvk_image *image =
vk_image_create(&dev->vk, pCreateInfo, pAllocator, sizeof(*image));