summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorJon Leech <[email protected]>2020-05-15 04:54:44 -0700
committerJon Leech <[email protected]>2020-05-15 04:55:11 -0700
commit09531f27933bf04bffde9074acb302e026e8f181 (patch)
tree689fa3dec1ce6b5651a21fc2f49596672b5b4f31 /include
parent9250d5ae8f50202005233dc0512a1d460c8b4833 (diff)
downloadVulkan-Headers-09531f27933bf04bffde9074acb302e026e8f181.tar.gz
Vulkan-Headers-09531f27933bf04bffde9074acb302e026e8f181.zip
Update for Vulkan-Docs 1.2.141v1.2.141sdk-1.2.141.0sdk-1.2.141
Diffstat (limited to 'include')
-rw-r--r--include/vulkan/vulkan.hpp157
-rw-r--r--include/vulkan/vulkan_core.h4
2 files changed, 116 insertions, 45 deletions
diff --git a/include/vulkan/vulkan.hpp b/include/vulkan/vulkan.hpp
index eb7f924..68c7cc0 100644
--- a/include/vulkan/vulkan.hpp
+++ b/include/vulkan/vulkan.hpp
@@ -69,10 +69,6 @@
# if defined(__linux__) || defined(__APPLE__)
# include <dlfcn.h>
# endif
-
-# if defined(_WIN32)
-# include <windows.h>
-# endif
#endif
#if 201711 <= __cpp_impl_three_way_comparison
@@ -83,7 +79,7 @@
#endif
-static_assert( VK_HEADER_VERSION == 140 , "Wrong VK_HEADER_VERSION!" );
+static_assert( VK_HEADER_VERSION == 141 , "Wrong VK_HEADER_VERSION!" );
// 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
@@ -247,16 +243,52 @@ namespace VULKAN_HPP_NAMESPACE
, m_ptr(list.begin())
{}
- template <typename Container>
- ArrayProxy(Container const& container) VULKAN_HPP_NOEXCEPT
- : m_count(static_cast<uint32_t>(container.size()))
- , m_ptr(container.data())
+ template <size_t N>
+ ArrayProxy(std::array<T, N> const & data) VULKAN_HPP_NOEXCEPT
+ : m_count(N)
+ , m_ptr(data.data())
+ {}
+
+ template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
+ ArrayProxy(std::array<typename std::remove_const<T>::type, N> const & data) VULKAN_HPP_NOEXCEPT
+ : m_count(N)
+ , m_ptr(data.data())
+ {}
+
+ template <size_t N>
+ ArrayProxy(std::array<T, N> & data) VULKAN_HPP_NOEXCEPT
+ : m_count(N)
+ , m_ptr(data.data())
+ {}
+
+ template <size_t N, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
+ ArrayProxy(std::array<typename std::remove_const<T>::type, N> & data) VULKAN_HPP_NOEXCEPT
+ : m_count(N)
+ , m_ptr(data.data())
+ {}
+
+ template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
+ ArrayProxy(std::vector<T, Allocator> const & data) VULKAN_HPP_NOEXCEPT
+ : m_count(static_cast<uint32_t>(data.size()))
+ , m_ptr(data.data())
+ {}
+
+ template <class Allocator = std::allocator<typename std::remove_const<T>::type>, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
+ ArrayProxy(std::vector<typename std::remove_const<T>::type, Allocator> const& data) VULKAN_HPP_NOEXCEPT
+ : m_count(static_cast<uint32_t>(data.size()))
+ , m_ptr(data.data())
{}
- template <typename Container>
- ArrayProxy(Container & container) VULKAN_HPP_NOEXCEPT
- : m_count(static_cast<uint32_t>(container.size()))
- , m_ptr(container.data())
+ template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
+ ArrayProxy(std::vector<T, Allocator> & data) VULKAN_HPP_NOEXCEPT
+ : m_count(static_cast<uint32_t>(data.size()))
+ , m_ptr(data.data())
+ {}
+
+ template <class Allocator = std::allocator<typename std::remove_const<T>::type>, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
+ ArrayProxy(std::vector<typename std::remove_const<T>::type, Allocator> & data) VULKAN_HPP_NOEXCEPT
+ : m_count(static_cast<uint32_t>(data.size()))
+ , m_ptr(data.data())
{}
const T * begin() const VULKAN_HPP_NOEXCEPT
@@ -4593,6 +4625,7 @@ namespace VULKAN_HPP_NAMESPACE
eGoogleSwiftshader = VK_DRIVER_ID_GOOGLE_SWIFTSHADER,
eGgpProprietary = VK_DRIVER_ID_GGP_PROPRIETARY,
eBroadcomProprietary = VK_DRIVER_ID_BROADCOM_PROPRIETARY,
+ eMesaLlvmpipe = VK_DRIVER_ID_MESA_LLVMPIPE,
eIntelOpenSourceMesa = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR
};
using DriverIdKHR = DriverId;
@@ -4613,6 +4646,7 @@ namespace VULKAN_HPP_NAMESPACE
case DriverId::eGoogleSwiftshader : return "GoogleSwiftshader";
case DriverId::eGgpProprietary : return "GgpProprietary";
case DriverId::eBroadcomProprietary : return "BroadcomProprietary";
+ case DriverId::eMesaLlvmpipe : return "MesaLlvmpipe";
default: return "invalid";
}
}
@@ -8875,7 +8909,8 @@ namespace VULKAN_HPP_NAMESPACE
eVIV = VK_VENDOR_ID_VIV,
eVSI = VK_VENDOR_ID_VSI,
eKazan = VK_VENDOR_ID_KAZAN,
- eCodeplay = VK_VENDOR_ID_CODEPLAY
+ eCodeplay = VK_VENDOR_ID_CODEPLAY,
+ eMESA = VK_VENDOR_ID_MESA
};
VULKAN_HPP_INLINE std::string to_string( VendorId value )
@@ -8886,6 +8921,7 @@ namespace VULKAN_HPP_NAMESPACE
case VendorId::eVSI : return "VSI";
case VendorId::eKazan : return "Kazan";
case VendorId::eCodeplay : return "Codeplay";
+ case VendorId::eMESA : return "MESA";
default: return "invalid";
}
}
@@ -13422,6 +13458,11 @@ namespace VULKAN_HPP_NAMESPACE
{
return value;
}
+
+ operator T&& () && VULKAN_HPP_NOEXCEPT
+ {
+ return std::move( value );
+ }
#endif
};
@@ -83683,26 +83724,52 @@ namespace VULKAN_HPP_NAMESPACE
template <> struct isStructureChainValid<WriteDescriptorSet, WriteDescriptorSetInlineUniformBlockEXT>{ enum { value = true }; };
#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
{
public:
-#ifdef VULKAN_HPP_NO_EXCEPTIONS
- DynamicLoader() VULKAN_HPP_NOEXCEPT : m_success( false )
-#else
- DynamicLoader() : m_success( false )
-#endif
+# ifdef VULKAN_HPP_NO_EXCEPTIONS
+ DynamicLoader( std::string const & vulkanLibraryName = {} ) VULKAN_HPP_NOEXCEPT : m_success( false )
+# else
+ DynamicLoader( std::string const & vulkanLibraryName = {} ) : m_success( false )
+# endif
{
-#if defined(__linux__)
- m_library = dlopen( "libvulkan.so", RTLD_NOW | RTLD_LOCAL );
-#elif defined(__APPLE__)
- m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
-#elif defined(_WIN32)
- m_library = LoadLibrary( TEXT( "vulkan-1.dll" ) );
-#else
- VULKAN_HPP_ASSERT( false && "unsupported platform" );
-#endif
+ if ( !vulkanLibraryName.empty() )
+ {
+# if defined( __linux__ ) || defined( __APPLE__ )
+ m_library = dlopen( vulkanLibraryName.c_str(), RTLD_NOW | RTLD_LOCAL );
+# elif defined( _WIN32 )
+ m_library = detail::LoadLibraryA( vulkanLibraryName.c_str() );
+# else
+# error unsupported platform
+# endif
+ }
+ else
+ {
+# if defined( __linux__ )
+ m_library = dlopen( "libvulkan.so", RTLD_NOW | RTLD_LOCAL );
+ if ( m_library == nullptr )
+ {
+ m_library = dlopen( "libvulkan.so.1", RTLD_NOW | RTLD_LOCAL );
+ }
+# elif defined( __APPLE__ )
+ m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL );
+# elif defined( _WIN32 )
+ m_library = detail::LoadLibraryA( "vulkan-1.dll" );
+# else
+# error unsupported platform
+# endif
+ }
- m_success = m_library != 0;
+ m_success = (m_library != nullptr);
#ifndef VULKAN_HPP_NO_EXCEPTIONS
if ( !m_success )
{
@@ -83734,35 +83801,37 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( m_library )
{
-#if defined(__linux__) || defined(__APPLE__)
+# if defined( __linux__ ) || defined( __APPLE__ )
dlclose( m_library );
-#elif defined(_WIN32)
- FreeLibrary( m_library );
-#endif
+# elif defined( _WIN32 )
+ detail::FreeLibrary( m_library );
+# else
+# error unsupported platform
+# endif
}
}
template <typename T>
T getProcAddress( const char* function ) const VULKAN_HPP_NOEXCEPT
{
-#if defined(__linux__) || defined(__APPLE__)
+# if defined( __linux__ ) || defined( __APPLE__ )
return (T)dlsym( m_library, function );
-#elif defined(_WIN32)
- return (T)GetProcAddress( m_library, function );
-#endif
+# elif defined( _WIN32 )
+ return (T)detail::GetProcAddress( m_library, function );
+# else
+# error unsupported platform
+# endif
}
bool success() const VULKAN_HPP_NOEXCEPT { return m_success; }
private:
bool m_success;
-#if defined(__linux__) || defined(__APPLE__)
- void *m_library;
-#elif defined(_WIN32)
- HMODULE m_library;
-#else
-#error unsupported platform
-#endif
+# if defined( __linux__ ) || defined( __APPLE__ ) || defined( _WIN32 )
+ void * m_library;
+# else
+# error unsupported platform
+# endif
};
#endif
diff --git a/include/vulkan/vulkan_core.h b/include/vulkan/vulkan_core.h
index efd589f..db2e556 100644
--- a/include/vulkan/vulkan_core.h
+++ b/include/vulkan/vulkan_core.h
@@ -44,7 +44,7 @@ extern "C" {
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
// Version of this file
-#define VK_HEADER_VERSION 140
+#define VK_HEADER_VERSION 141
// Complete version of this file
#define VK_HEADER_VERSION_COMPLETE VK_MAKE_VERSION(1, 2, VK_HEADER_VERSION)
@@ -1431,6 +1431,7 @@ typedef enum VkVendorId {
VK_VENDOR_ID_VSI = 0x10002,
VK_VENDOR_ID_KAZAN = 0x10003,
VK_VENDOR_ID_CODEPLAY = 0x10004,
+ VK_VENDOR_ID_MESA = 0x10005,
VK_VENDOR_ID_MAX_ENUM = 0x7FFFFFFF
} VkVendorId;
typedef VkFlags VkInstanceCreateFlags;
@@ -4885,6 +4886,7 @@ typedef enum VkDriverId {
VK_DRIVER_ID_GOOGLE_SWIFTSHADER = 10,
VK_DRIVER_ID_GGP_PROPRIETARY = 11,
VK_DRIVER_ID_BROADCOM_PROPRIETARY = 12,
+ VK_DRIVER_ID_MESA_LLVMPIPE = 13,
VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY,
VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE,
VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV,