radv: adopt wsi_common_get_memory
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35875>
This commit is contained in:
@@ -1792,16 +1792,12 @@ radv_BindImageMemory2(VkDevice _device, uint32_t bindInfoCount, const VkBindImag
|
|||||||
|
|
||||||
/* Ignore this struct on Android, we cannot access swapchain structures there. */
|
/* Ignore this struct on Android, we cannot access swapchain structures there. */
|
||||||
#ifdef RADV_USE_WSI_PLATFORM
|
#ifdef RADV_USE_WSI_PLATFORM
|
||||||
const VkBindImageMemorySwapchainInfoKHR *swapchain_info =
|
if (!mem) {
|
||||||
vk_find_struct_const(pBindInfos[i].pNext, BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR);
|
const VkBindImageMemorySwapchainInfoKHR *swapchain_info =
|
||||||
|
vk_find_struct_const(pBindInfos[i].pNext, BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR);
|
||||||
if (swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE) {
|
assert(swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE);
|
||||||
struct radv_image *swapchain_img =
|
mem = radv_device_memory_from_handle(
|
||||||
radv_image_from_handle(wsi_common_get_image(swapchain_info->swapchain, swapchain_info->imageIndex));
|
wsi_common_get_memory(swapchain_info->swapchain, swapchain_info->imageIndex));
|
||||||
|
|
||||||
radv_bind_image_memory(device, image, 0, swapchain_img->bindings[0].bo, swapchain_img->bindings[0].addr,
|
|
||||||
swapchain_img->bindings[0].range);
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user