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>
(cherry picked from commit 3305f772fa)
This commit is contained in:
Erik Faye-Lund 2024-11-20 10:07:41 +01:00 committed by Dylan Baker
parent e92d808c35
commit 3ef5b47152
2 changed files with 12 additions and 1 deletions

View file

@ -1074,7 +1074,7 @@
"description": "panvk: wire up swapchain image creation",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "d970fe2e9d6a8e9997a0ce212146d62013b3b455",
"notes": null

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));