Merge pull request #648 from mtavenrath/shared_default

Add defines to put the storage for a DispatchLoaderDynamic in a DLL.
This commit is contained in:
Andreas Süßenbach
2020-06-30 08:58:37 +02:00
committed by GitHub
7 changed files with 191 additions and 7 deletions

View File

@@ -4605,15 +4605,25 @@ namespace VULKAN_HPP_NAMESPACE
# endif
#endif
#if defined( _WIN32 ) && defined( VULKAN_HPP_STORAGE_SHARED )
# ifdef VULKAN_HPP_STORAGE_SHARED_EXPORT
# define VULKAN_HPP_STORAGE_API __declspec( dllexport )
# else
# define VULKAN_HPP_STORAGE_API __declspec( dllimport )
# endif
#else
# define VULKAN_HPP_STORAGE_API
#endif
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
namespace VULKAN_HPP_NAMESPACE \
{ \
DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
namespace VULKAN_HPP_NAMESPACE \
{ \
VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
}
extern DispatchLoaderDynamic defaultDispatchLoaderDynamic;
extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
# else
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic()
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE