mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #652 from asuessenbach/ConformanceModeOn
Turn Conformance Mode on for Visual Studio builds
This commit is contained in:
commit
78ab921b06
@ -48,7 +48,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_compile_options(/W4)
|
add_compile_options(/W4 /permissive-)
|
||||||
else(MSVC)
|
else(MSVC)
|
||||||
add_compile_options(-Wall)
|
add_compile_options(-Wall)
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
@ -767,7 +767,7 @@ std::string trimStars( std::string const & input )
|
|||||||
{
|
{
|
||||||
result.insert( pos + 1, 1, ' ' );
|
result.insert( pos + 1, 1, ' ' );
|
||||||
}
|
}
|
||||||
pos = result.find( '*', pos+1 );
|
pos = result.find( '*', pos + 1 );
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1427,15 +1427,6 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic( std::string & str )
|
|||||||
{
|
{
|
||||||
str += R"(
|
str += R"(
|
||||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
||||||
# if defined( _WIN32 )
|
|
||||||
namespace detail
|
|
||||||
{
|
|
||||||
extern "C" __declspec( dllimport ) void * __stdcall LoadLibraryA( char const * lpLibFileName );
|
|
||||||
extern "C" __declspec( dllimport ) int __stdcall FreeLibrary( void * hLibModule );
|
|
||||||
extern "C" __declspec( dllimport ) void * __stdcall GetProcAddress( void * hModule, char const * lpProcName );
|
|
||||||
} // namespace detail
|
|
||||||
# endif
|
|
||||||
|
|
||||||
class DynamicLoader
|
class DynamicLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -1450,7 +1441,7 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic( std::string & str )
|
|||||||
# if defined( __linux__ ) || defined( __APPLE__ )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
m_library = dlopen( vulkanLibraryName.c_str(), RTLD_NOW | RTLD_LOCAL );
|
m_library = dlopen( vulkanLibraryName.c_str(), RTLD_NOW | RTLD_LOCAL );
|
||||||
# elif defined( _WIN32 )
|
# elif defined( _WIN32 )
|
||||||
m_library = detail::LoadLibraryA( vulkanLibraryName.c_str() );
|
m_library = ::LoadLibraryA( vulkanLibraryName.c_str() );
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -1466,7 +1457,7 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic( std::string & str )
|
|||||||
# elif defined( __APPLE__ )
|
# elif defined( __APPLE__ )
|
||||||
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
|
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
|
||||||
# elif defined( _WIN32 )
|
# elif defined( _WIN32 )
|
||||||
m_library = detail::LoadLibraryA( "vulkan-1.dll" );
|
m_library = ::LoadLibraryA( "vulkan-1.dll" );
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -1507,7 +1498,7 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic( std::string & str )
|
|||||||
# if defined( __linux__ ) || defined( __APPLE__ )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
dlclose( m_library );
|
dlclose( m_library );
|
||||||
# elif defined( _WIN32 )
|
# elif defined( _WIN32 )
|
||||||
detail::FreeLibrary( m_library );
|
::FreeLibrary( m_library );
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -1520,7 +1511,7 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic( std::string & str )
|
|||||||
# if defined( __linux__ ) || defined( __APPLE__ )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
return (T)dlsym( m_library, function );
|
return (T)dlsym( m_library, function );
|
||||||
# elif defined( _WIN32 )
|
# elif defined( _WIN32 )
|
||||||
return (T)detail::GetProcAddress( m_library, function );
|
return (T)::GetProcAddress( m_library, function );
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -1530,8 +1521,10 @@ void VulkanHppGenerator::appendDispatchLoaderDynamic( std::string & str )
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_success;
|
bool m_success;
|
||||||
# if defined( __linux__ ) || defined( __APPLE__ ) || defined( _WIN32 )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
void * m_library;
|
void * m_library;
|
||||||
|
# elif defined( _WIN32 )
|
||||||
|
::HINSTANCE m_library;
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -7976,8 +7969,18 @@ int main( int argc, char ** argv )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
||||||
# if defined(__linux__) || defined(__APPLE__)
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
|
# elif defined( _WIN32 )
|
||||||
|
typedef struct HINSTANCE__ * HINSTANCE;
|
||||||
|
# if defined( _WIN64 )
|
||||||
|
typedef int64_t( __stdcall * FARPROC )();
|
||||||
|
# else
|
||||||
|
typedef int( __stdcall * FARPROC )();
|
||||||
|
# endif
|
||||||
|
extern "C" __declspec( dllimport ) HINSTANCE __stdcall LoadLibraryA( char const * lpLibFileName );
|
||||||
|
extern "C" __declspec( dllimport ) int __stdcall FreeLibrary( HINSTANCE hLibModule );
|
||||||
|
extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE hModule, const char * lpProcName );
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -64,6 +64,16 @@
|
|||||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
||||||
# if defined( __linux__ ) || defined( __APPLE__ )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
|
# elif defined( _WIN32 )
|
||||||
|
typedef struct HINSTANCE__ * HINSTANCE;
|
||||||
|
# if defined( _WIN64 )
|
||||||
|
typedef int64_t( __stdcall * FARPROC )();
|
||||||
|
# else
|
||||||
|
typedef int( __stdcall * FARPROC )();
|
||||||
|
# endif
|
||||||
|
extern "C" __declspec( dllimport ) HINSTANCE __stdcall LoadLibraryA( char const * lpLibFileName );
|
||||||
|
extern "C" __declspec( dllimport ) int __stdcall FreeLibrary( HINSTANCE hLibModule );
|
||||||
|
extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE hModule, const char * lpProcName );
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -87230,7 +87240,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
# else
|
# else
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_INLINE Result Device::deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation,
|
VULKAN_HPP_INLINE Result Device::deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
Result result =
|
Result result =
|
||||||
static_cast<Result>( d.vkDeferredOperationJoinKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) ) );
|
static_cast<Result>( d.vkDeferredOperationJoinKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) ) );
|
||||||
@ -89104,7 +89114,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
# else
|
# else
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_INLINE Result Device::getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation,
|
VULKAN_HPP_INLINE Result Device::getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>(
|
Result result = static_cast<Result>(
|
||||||
d.vkGetDeferredOperationResultKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) ) );
|
d.vkGetDeferredOperationResultKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) ) );
|
||||||
@ -98933,15 +98943,6 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
||||||
# if defined( _WIN32 )
|
|
||||||
namespace detail
|
|
||||||
{
|
|
||||||
extern "C" __declspec( dllimport ) void * __stdcall LoadLibraryA( char const * lpLibFileName );
|
|
||||||
extern "C" __declspec( dllimport ) int __stdcall FreeLibrary( void * hLibModule );
|
|
||||||
extern "C" __declspec( dllimport ) void * __stdcall GetProcAddress( void * hModule, char const * lpProcName );
|
|
||||||
} // namespace detail
|
|
||||||
# endif
|
|
||||||
|
|
||||||
class DynamicLoader
|
class DynamicLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -98956,7 +98957,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
# if defined( __linux__ ) || defined( __APPLE__ )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
m_library = dlopen( vulkanLibraryName.c_str(), RTLD_NOW | RTLD_LOCAL );
|
m_library = dlopen( vulkanLibraryName.c_str(), RTLD_NOW | RTLD_LOCAL );
|
||||||
# elif defined( _WIN32 )
|
# elif defined( _WIN32 )
|
||||||
m_library = detail::LoadLibraryA( vulkanLibraryName.c_str() );
|
m_library = ::LoadLibraryA( vulkanLibraryName.c_str() );
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -98972,7 +98973,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
# elif defined( __APPLE__ )
|
# elif defined( __APPLE__ )
|
||||||
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
|
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
|
||||||
# elif defined( _WIN32 )
|
# elif defined( _WIN32 )
|
||||||
m_library = detail::LoadLibraryA( "vulkan-1.dll" );
|
m_library = ::LoadLibraryA( "vulkan-1.dll" );
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -99014,7 +99015,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
# if defined( __linux__ ) || defined( __APPLE__ )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
dlclose( m_library );
|
dlclose( m_library );
|
||||||
# elif defined( _WIN32 )
|
# elif defined( _WIN32 )
|
||||||
detail::FreeLibrary( m_library );
|
::FreeLibrary( m_library );
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -99027,7 +99028,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
# if defined( __linux__ ) || defined( __APPLE__ )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
return (T)dlsym( m_library, function );
|
return (T)dlsym( m_library, function );
|
||||||
# elif defined( _WIN32 )
|
# elif defined( _WIN32 )
|
||||||
return (T)detail::GetProcAddress( m_library, function );
|
return ( T )::GetProcAddress( m_library, function );
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
@ -99040,8 +99041,10 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_success;
|
bool m_success;
|
||||||
# if defined( __linux__ ) || defined( __APPLE__ ) || defined( _WIN32 )
|
# if defined( __linux__ ) || defined( __APPLE__ )
|
||||||
void * m_library;
|
void * m_library;
|
||||||
|
# elif defined( _WIN32 )
|
||||||
|
::HINSTANCE m_library;
|
||||||
# else
|
# else
|
||||||
# error unsupported platform
|
# error unsupported platform
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
Reference in New Issue
Block a user