mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 08:50:25 +01:00
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:
parent
f77fe432c1
commit
3305f772fa
1 changed files with 11 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue