Link Here
|
1 |
--- include/vulkan/vulkan.hpp.orig 2020-05-14 18:48:51 UTC |
1 |
--- include/vulkan/vulkan.hpp.orig 2020-09-21 09:26:07 UTC |
2 |
+++ include/vulkan/vulkan.hpp |
2 |
+++ include/vulkan/vulkan.hpp |
3 |
@@ -65,7 +65,7 @@ |
3 |
@@ -66,7 +66,7 @@ |
4 |
#endif |
4 |
#endif |
5 |
|
5 |
|
6 |
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1 |
6 |
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1 |
7 |
-# if defined(__linux__) || defined(__APPLE__) |
7 |
-# if defined( __linux__ ) || defined( __APPLE__ ) |
8 |
+# if defined(__unix__) |
8 |
+# if defined( __unix__ ) || defined( __APPLE__ ) |
9 |
# include <dlfcn.h> |
9 |
# include <dlfcn.h> |
10 |
# endif |
10 |
# elif defined( _WIN32 ) |
11 |
|
11 |
typedef struct HINSTANCE__ * HINSTANCE; |
12 |
@@ -81153,7 +81153,7 @@ namespace VULKAN_HPP_NAMESPACE |
12 |
@@ -90062,7 +90062,7 @@ namespace VULKAN_HPP_NAMESPACE |
13 |
DynamicLoader() : m_success( false ) |
|
|
14 |
#endif |
15 |
{ |
13 |
{ |
16 |
-#if defined(__linux__) |
14 |
if ( !vulkanLibraryName.empty() ) |
17 |
+#if defined(__unix__) |
15 |
{ |
18 |
m_library = dlopen( "libvulkan.so", RTLD_NOW | RTLD_LOCAL ); |
16 |
-# if defined( __linux__ ) || defined( __APPLE__ ) |
19 |
#elif defined(__APPLE__) |
17 |
+# if defined( __unix__ ) || defined( __APPLE__ ) |
20 |
m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); |
18 |
m_library = dlopen( vulkanLibraryName.c_str(), RTLD_NOW | RTLD_LOCAL ); |
21 |
@@ -81195,7 +81195,7 @@ namespace VULKAN_HPP_NAMESPACE |
19 |
# elif defined( _WIN32 ) |
|
|
20 |
m_library = ::LoadLibraryA( vulkanLibraryName.c_str() ); |
21 |
@@ -90072,7 +90072,7 @@ namespace VULKAN_HPP_NAMESPACE |
22 |
} |
23 |
else |
24 |
{ |
25 |
-# if defined( __linux__ ) |
26 |
+# if defined( __unix__ ) |
27 |
m_library = dlopen( "libvulkan.so", RTLD_NOW | RTLD_LOCAL ); |
28 |
if ( m_library == nullptr ) |
29 |
{ |
30 |
@@ -90119,7 +90119,7 @@ namespace VULKAN_HPP_NAMESPACE |
22 |
{ |
31 |
{ |
23 |
if ( m_library ) |
32 |
if ( m_library ) |
24 |
{ |
33 |
{ |
25 |
-#if defined(__linux__) || defined(__APPLE__) |
34 |
-# if defined( __linux__ ) || defined( __APPLE__ ) |
26 |
+#if defined(__unix__) |
35 |
+# if defined( __unix__ ) || defined( __APPLE__ ) |
27 |
dlclose( m_library ); |
36 |
dlclose( m_library ); |
28 |
#elif defined(_WIN32) |
37 |
# elif defined( _WIN32 ) |
29 |
FreeLibrary( m_library ); |
38 |
::FreeLibrary( m_library ); |
30 |
@@ -81206,7 +81206,7 @@ namespace VULKAN_HPP_NAMESPACE |
39 |
@@ -90132,7 +90132,7 @@ namespace VULKAN_HPP_NAMESPACE |
31 |
template <typename T> |
40 |
template <typename T> |
32 |
T getProcAddress( const char* function ) const VULKAN_HPP_NOEXCEPT |
41 |
T getProcAddress( const char* function ) const VULKAN_HPP_NOEXCEPT |
33 |
{ |
42 |
{ |
34 |
-#if defined(__linux__) || defined(__APPLE__) |
43 |
-# if defined( __linux__ ) || defined( __APPLE__ ) |
35 |
+#if defined(__unix__) |
44 |
+# if defined( __unix__ ) || defined( __APPLE__ ) |
36 |
return (T)dlsym( m_library, function ); |
45 |
return (T)dlsym( m_library, function ); |
37 |
#elif defined(_WIN32) |
46 |
# elif defined( _WIN32 ) |
38 |
return (T)GetProcAddress( m_library, function ); |
47 |
return (T)::GetProcAddress( m_library, function ); |
39 |
@@ -81217,7 +81217,7 @@ namespace VULKAN_HPP_NAMESPACE |
48 |
@@ -90145,7 +90145,7 @@ namespace VULKAN_HPP_NAMESPACE |
40 |
|
49 |
|
41 |
private: |
50 |
private: |
42 |
bool m_success; |
51 |
bool m_success; |
43 |
-#if defined(__linux__) || defined(__APPLE__) |
52 |
-# if defined( __linux__ ) || defined( __APPLE__ ) |
44 |
+#if defined(__unix__) |
53 |
+# if defined( __unix__ ) || defined( __APPLE__ ) |
45 |
void *m_library; |
54 |
void * m_library; |
46 |
#elif defined(_WIN32) |
55 |
# elif defined( _WIN32 ) |
47 |
HMODULE m_library; |
56 |
::HINSTANCE m_library; |