Check value of VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL instead of existence (#1856)

* Check value of VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL instead of existence

* Also change vulkansc.cppm
This commit is contained in:
Sharadh Rajaraman 2024-04-29 07:59:01 +01:00 committed by GitHub
parent 1de6e89eb2
commit 79307b6253
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View File

@ -5668,8 +5668,11 @@ std::string VulkanHppGenerator::generateCppModuleUsings() const
auto const [enterDisableEnhanced, leaveDisableEnhanced] = generateProtection( "VULKAN_HPP_DISABLE_ENHANCED_MODE", false );
usings += "\n" + enterDisableEnhanced + replaceWithMap( usingTemplate, { { "className", "StructExtends" } } ) + leaveDisableEnhanced + "\n";
auto const [enterDynamicLoader, leaveDynamicLoader] = generateProtection( "VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL" );
usings += "\n" + enterDynamicLoader + replaceWithMap( usingTemplate, { { "className", "DynamicLoader" } } ) + leaveDynamicLoader + "\n";
auto const dynamicLoaderUsing = std::string{R"(#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
using VULKAN_HPP_NAMESPACE::DynamicLoader;
#endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/
)"};
usings += dynamicLoaderUsing;
usings += generateCppModuleFormatTraitsUsings();
usings += generateCppModuleExtensionInspectionUsings();

View File

@ -4675,7 +4675,7 @@ export namespace VULKAN_HPP_NAMESPACE
using VULKAN_HPP_NAMESPACE::StructExtends;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if defined( VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL )
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
using VULKAN_HPP_NAMESPACE::DynamicLoader;
#endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/

View File

@ -1703,7 +1703,7 @@ export namespace VULKAN_HPP_NAMESPACE
using VULKAN_HPP_NAMESPACE::StructExtends;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#if defined( VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL )
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
using VULKAN_HPP_NAMESPACE::DynamicLoader;
#endif /*VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL*/