From f01968f09e4dba0dd893cd30dd52d19600efdb2c Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Tue, 17 Dec 2024 12:17:52 +0100 Subject: [PATCH] Add fix for moved class in VK 1.4.303 --- openVulkanoCpp/Vulkan/Context.hpp | 1 + openVulkanoCpp/Vulkan/Debuging/ValidationLayer.hpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/openVulkanoCpp/Vulkan/Context.hpp b/openVulkanoCpp/Vulkan/Context.hpp index d474963..18d4765 100644 --- a/openVulkanoCpp/Vulkan/Context.hpp +++ b/openVulkanoCpp/Vulkan/Context.hpp @@ -7,6 +7,7 @@ #pragma once #include +#include "Debuging/ValidationLayer.hpp" #include "DeviceManager.hpp" #include "SwapChain.hpp" #include "RenderPass.hpp" diff --git a/openVulkanoCpp/Vulkan/Debuging/ValidationLayer.hpp b/openVulkanoCpp/Vulkan/Debuging/ValidationLayer.hpp index 7167137..536efbd 100644 --- a/openVulkanoCpp/Vulkan/Debuging/ValidationLayer.hpp +++ b/openVulkanoCpp/Vulkan/Debuging/ValidationLayer.hpp @@ -11,6 +11,15 @@ #include #include +#if VK_HEADER_VERSION > 302 +// Vulkan 1.4.303 moved the dynamic dispatch loader definition, +// this is a workaround to allow building for both the old and the new verisons +namespace vk +{ + using DispatchLoaderDynamic = detail::DispatchLoaderDynamic; +} +#endif + namespace OpenVulkano::Vulkan { class Debug