dzn: Handle VkBindImageMemorySwapchainInfoKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27224>
This commit is contained in:
@@ -60,13 +60,6 @@
|
||||
|
||||
#include <directx/d3d12sdklayers.h>
|
||||
|
||||
#if defined(VK_USE_PLATFORM_WIN32_KHR) || \
|
||||
defined(VK_USE_PLATFORM_WAYLAND_KHR) || \
|
||||
defined(VK_USE_PLATFORM_XCB_KHR) || \
|
||||
defined(VK_USE_PLATFORM_XLIB_KHR)
|
||||
#define DZN_USE_WSI_PLATFORM
|
||||
#endif
|
||||
|
||||
#define DZN_API_VERSION VK_MAKE_VERSION(1, 2, VK_HEADER_VERSION)
|
||||
|
||||
#define MAX_TIER2_MEMORY_TYPES 4
|
||||
|
@@ -820,9 +820,17 @@ dzn_BindImageMemory2(VkDevice dev,
|
||||
VK_FROM_HANDLE(dzn_device_memory, mem, bind_info->memory);
|
||||
VK_FROM_HANDLE(dzn_image, image, bind_info->image);
|
||||
|
||||
vk_foreach_struct_const(s, bind_info->pNext) {
|
||||
dzn_debug_ignored_stype(s->sType);
|
||||
#ifdef DZN_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 dzn_image *swapchain_img =
|
||||
dzn_image_from_handle(wsi_common_get_image(swapchain_info->swapchain, swapchain_info->imageIndex));
|
||||
|
||||
mem = swapchain_img->mem;
|
||||
}
|
||||
#endif
|
||||
|
||||
image->mem = mem;
|
||||
|
||||
|
@@ -75,6 +75,13 @@
|
||||
|
||||
#define dzn_stub() unreachable("Unsupported feature")
|
||||
|
||||
#if defined(VK_USE_PLATFORM_WIN32_KHR) || \
|
||||
defined(VK_USE_PLATFORM_WAYLAND_KHR) || \
|
||||
defined(VK_USE_PLATFORM_XCB_KHR) || \
|
||||
defined(VK_USE_PLATFORM_XLIB_KHR)
|
||||
#define DZN_USE_WSI_PLATFORM
|
||||
#endif
|
||||
|
||||
struct dxil_validator;
|
||||
struct util_dl_library;
|
||||
|
||||
|
Reference in New Issue
Block a user