Introducde getDispatchLoaderStatic() to prevent dangling pointers in debug builds

This commit is contained in:
asuessenbach
2021-09-08 09:53:25 +02:00
parent 6a8e344bb0
commit 13bdb2ff69
7 changed files with 131 additions and 15 deletions

View File

@@ -5634,7 +5634,12 @@ namespace VULKAN_HPP_NAMESPACE
}
extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
# else
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic()
static ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic & getDispatchLoaderStatic()
{
static ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic dls;
return dls;
}
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::getDispatchLoaderStatic()
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
# endif
#endif