From d30f2646eccb8b5cae895ddc7b3461c11c97701e Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:13:40 +0200 Subject: [PATCH] Use vk::detail::DynamicLoader instead of vk::DynamicLoader (#710) * Use vk::detail::DynamicLoader instead of vk::DynamicLoader * Update renderer_vk.cpp --- src/core/renderer_vk/renderer_vk.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/renderer_vk/renderer_vk.cpp b/src/core/renderer_vk/renderer_vk.cpp index d05a070f..14bde2c8 100644 --- a/src/core/renderer_vk/renderer_vk.cpp +++ b/src/core/renderer_vk/renderer_vk.cpp @@ -885,10 +885,17 @@ void RendererVK::display() { } } +// DynamicLoader is in a different namespace in different versions of Vulkan-Hpp +#if VK_HEADER_VERSION >= 301 +using VulkanDynamicLoader = vk::detail::DynamicLoader +#else +using VulkanDynamicLoader = vk::DynamicLoader; +#endif + void RendererVK::initGraphicsContext(SDL_Window* window) { targetWindow = window; // Resolve all instance function pointers - static vk::DynamicLoader dl; + static VulkanDynamicLoader dl; VULKAN_HPP_DEFAULT_DISPATCHER.init(dl.getProcAddress("vkGetInstanceProcAddr")); // Create Instance @@ -1588,4 +1595,4 @@ void RendererVK::deinitGraphicsContext() { // TODO: Make it so that depth and colour buffers get written back to 3DS memory printf("RendererVK::DeinitGraphicsContext called\n"); -} \ No newline at end of file +}