panvk: adopt wsi_common_get_memory
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35875>
This commit is contained in:
@@ -638,7 +638,7 @@ panvk_image_bind(struct panvk_device *dev,
|
|||||||
VK_FROM_HANDLE(panvk_device_memory, mem, bind_info->memory);
|
VK_FROM_HANDLE(panvk_device_memory, mem, bind_info->memory);
|
||||||
|
|
||||||
if (!mem) {
|
if (!mem) {
|
||||||
#ifdef ANDROID
|
#if DETECT_OS_ANDROID
|
||||||
/* TODO handle VkNativeBufferANDROID when we support ANB */
|
/* TODO handle VkNativeBufferANDROID when we support ANB */
|
||||||
unreachable("VkBindImageMemoryInfo with no memory");
|
unreachable("VkBindImageMemoryInfo with no memory");
|
||||||
#else
|
#else
|
||||||
@@ -646,12 +646,9 @@ panvk_image_bind(struct panvk_device *dev,
|
|||||||
vk_find_struct_const(bind_info->pNext,
|
vk_find_struct_const(bind_info->pNext,
|
||||||
BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR);
|
BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR);
|
||||||
assert(swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE);
|
assert(swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE);
|
||||||
|
VkDeviceMemory mem_handle = wsi_common_get_memory(
|
||||||
VkImage wsi_vk_image = wsi_common_get_image(swapchain_info->swapchain,
|
swapchain_info->swapchain, swapchain_info->imageIndex);
|
||||||
swapchain_info->imageIndex);
|
mem = panvk_device_memory_from_handle(mem_handle);
|
||||||
VK_FROM_HANDLE(panvk_image, wsi_image, wsi_vk_image);
|
|
||||||
|
|
||||||
mem = wsi_image->mem;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user