mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 04:30:10 +01:00
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:
parent
3f273eb01b
commit
825c05a7e8
1 changed files with 6 additions and 10 deletions
|
|
@ -1792,16 +1792,12 @@ radv_BindImageMemory2(VkDevice _device, uint32_t bindInfoCount, const VkBindImag
|
|||
|
||||
/* Ignore this struct on Android, we cannot access swapchain structures there. */
|
||||
#ifdef RADV_USE_WSI_PLATFORM
|
||||
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) {
|
||||
struct radv_image *swapchain_img =
|
||||
radv_image_from_handle(wsi_common_get_image(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;
|
||||
if (!mem) {
|
||||
const VkBindImageMemorySwapchainInfoKHR *swapchain_info =
|
||||
vk_find_struct_const(pBindInfos[i].pNext, BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR);
|
||||
assert(swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE);
|
||||
mem = radv_device_memory_from_handle(
|
||||
wsi_common_get_memory(swapchain_info->swapchain, swapchain_info->imageIndex));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue