mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 02:10:17 +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> (cherry picked from commit3305f772fa)
This commit is contained in:
parent
e92d808c35
commit
3ef5b47152
2 changed files with 12 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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