mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-09 20:09:49 -04:00
Reduce number of included headers
This commit is contained in:
parent
fa62e680f6
commit
056abda3e2
@ -400,9 +400,13 @@ std::string VulkanHppGenerator::generateEnumsToString() const
|
|||||||
|
|
||||||
VULKAN_HPP_INLINE std::string toHexString( uint32_t value )
|
VULKAN_HPP_INLINE std::string toHexString( uint32_t value )
|
||||||
{
|
{
|
||||||
|
#if ( ( 20 <= VULKAN_HPP_CPP_VERSION ) && __has_include( <format> ) )
|
||||||
|
return std::format( "{:x}", value );
|
||||||
|
#else
|
||||||
std::stringstream stream;
|
std::stringstream stream;
|
||||||
stream << std::hex << value;
|
stream << std::hex << value;
|
||||||
return stream.str();
|
return stream.str();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
${enumsToString}
|
${enumsToString}
|
||||||
@ -13377,7 +13381,6 @@ std::string toString( tinyxml2::XMLError error )
|
|||||||
int main( int argc, char ** argv )
|
int main( int argc, char ** argv )
|
||||||
{
|
{
|
||||||
static const std::string classArrayProxy = R"(
|
static const std::string classArrayProxy = R"(
|
||||||
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class ArrayProxy
|
class ArrayProxy
|
||||||
{
|
{
|
||||||
@ -13664,7 +13667,6 @@ int main( int argc, char ** argv )
|
|||||||
uint32_t m_count;
|
uint32_t m_count;
|
||||||
T * m_ptr;
|
T * m_ptr;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
)";
|
)";
|
||||||
|
|
||||||
static const std::string classArrayWrapper = R"(
|
static const std::string classArrayWrapper = R"(
|
||||||
@ -14592,8 +14594,7 @@ int main( int argc, char ** argv )
|
|||||||
uniqueToRaw( std::vector<UniqueType> const & handles )
|
uniqueToRaw( std::vector<UniqueType> const & handles )
|
||||||
{
|
{
|
||||||
std::vector<typename UniqueType::element_type> newBuffer( handles.size() );
|
std::vector<typename UniqueType::element_type> newBuffer( handles.size() );
|
||||||
std::transform(
|
std::transform( handles.begin(), handles.end(), newBuffer.begin(), []( UniqueType const & handle ) { return handle.get(); } );
|
||||||
handles.begin(), handles.end(), newBuffer.begin(), []( UniqueType const & handle ) { return handle.get(); } );
|
|
||||||
return newBuffer;
|
return newBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15010,22 +15011,11 @@ int main( int argc, char ** argv )
|
|||||||
# error "vulkan.hpp needs at least c++ standard version 11"
|
# error "vulkan.hpp needs at least c++ standard version 11"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <array> // ArrayWrapperND
|
||||||
#include <array>
|
#include <string> // std::string
|
||||||
#include <cstddef>
|
|
||||||
#include <cstdint>
|
|
||||||
#include <cstring>
|
|
||||||
#include <functional>
|
|
||||||
#include <initializer_list>
|
|
||||||
#include <sstream>
|
|
||||||
#include <string>
|
|
||||||
#include <system_error>
|
|
||||||
#include <tuple>
|
|
||||||
#include <type_traits>
|
|
||||||
#include <utility>
|
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
#if 17 <= VULKAN_HPP_CPP_VERSION
|
#if 17 <= VULKAN_HPP_CPP_VERSION
|
||||||
# include <string_view>
|
# include <string_view> // std::string_view
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||||
@ -15033,8 +15023,16 @@ int main( int argc, char ** argv )
|
|||||||
# define VULKAN_HPP_NO_SMART_HANDLE
|
# define VULKAN_HPP_NO_SMART_HANDLE
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# include <memory>
|
# include <tuple> // std::tie
|
||||||
# include <vector>
|
# include <vector> // std::vector
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined( VULKAN_HPP_NO_EXCEPTIONS )
|
||||||
|
# include <system_error> // std::is_error_code_enum
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
||||||
|
# include <algorithm> // std::transform
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined( VULKAN_HPP_NO_CONSTRUCTORS )
|
#if defined( VULKAN_HPP_NO_CONSTRUCTORS )
|
||||||
@ -15366,6 +15364,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
#ifndef VULKAN_STRUCTS_HPP
|
#ifndef VULKAN_STRUCTS_HPP
|
||||||
# define VULKAN_STRUCTS_HPP
|
# define VULKAN_STRUCTS_HPP
|
||||||
|
|
||||||
|
#include <cstring> // strcmp
|
||||||
|
|
||||||
namespace VULKAN_HPP_NAMESPACE
|
namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
)";
|
)";
|
||||||
@ -15408,12 +15408,13 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
"# define VULKAN_HPP_TYPESAFE_CONVERSION\n"
|
"# define VULKAN_HPP_TYPESAFE_CONVERSION\n"
|
||||||
"# endif\n"
|
"# endif\n"
|
||||||
"#endif\n";
|
"#endif\n";
|
||||||
str += defines + "\n" + "namespace VULKAN_HPP_NAMESPACE\n" + "{" + classArrayProxy + classArrayWrapper + classFlags + classOptional + classStructureChain +
|
str += defines + "\n" + "namespace VULKAN_HPP_NAMESPACE\n" + "{" + classArrayWrapper + classFlags + "#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )\n" +
|
||||||
classUniqueHandle;
|
classArrayProxy + classOptional + classStructureChain + classUniqueHandle + "#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE\n";
|
||||||
str += dispatchLoaderBase;
|
str += dispatchLoaderBase;
|
||||||
str += generator.generateDispatchLoaderStatic();
|
str += generator.generateDispatchLoaderStatic();
|
||||||
str += dispatchLoaderDefault;
|
str += dispatchLoaderDefault;
|
||||||
str += classObjectDestroy + classObjectFree + classObjectRelease + classPoolFree + "\n";
|
str += "#if !defined( VULKAN_HPP_NO_SMART_HANDLE )\n" + classObjectDestroy + classObjectFree + classObjectRelease + classPoolFree + "\n" +
|
||||||
|
"#endif // !VULKAN_HPP_NO_SMART_HANDLE\n";
|
||||||
str += generator.generateBaseTypes();
|
str += generator.generateBaseTypes();
|
||||||
str += R"(} // namespace VULKAN_HPP_NAMESPACE
|
str += R"(} // namespace VULKAN_HPP_NAMESPACE
|
||||||
|
|
||||||
@ -15450,7 +15451,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
namespace VULKAN_HPP_NAMESPACE
|
namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
)";
|
)";
|
||||||
str += generator.generateStructExtendsStructs();
|
str += "#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )\n" + generator.generateStructExtendsStructs() + "#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE\n";
|
||||||
str += dynamicLoader;
|
str += dynamicLoader;
|
||||||
str += generator.generateDispatchLoaderDynamic();
|
str += generator.generateDispatchLoaderDynamic();
|
||||||
str +=
|
str +=
|
||||||
@ -15501,6 +15502,12 @@ namespace std
|
|||||||
|
|
||||||
#include <vulkan/vulkan_enums.hpp>
|
#include <vulkan/vulkan_enums.hpp>
|
||||||
|
|
||||||
|
#if ( ( 20 <= VULKAN_HPP_CPP_VERSION ) && __has_include( <format> ) )
|
||||||
|
# include <format> // std::format
|
||||||
|
#else
|
||||||
|
# include <sstream> // std::stringstream
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace VULKAN_HPP_NAMESPACE
|
namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
)";
|
)";
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <memory> // std::unique_ptr
|
||||||
|
|
||||||
namespace vk
|
namespace vk
|
||||||
{
|
{
|
||||||
|
@ -26,22 +26,11 @@
|
|||||||
# error "vulkan.hpp needs at least c++ standard version 11"
|
# error "vulkan.hpp needs at least c++ standard version 11"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <array> // ArrayWrapperND
|
||||||
#include <array>
|
#include <string> // std::string
|
||||||
#include <cstddef>
|
|
||||||
#include <cstdint>
|
|
||||||
#include <cstring>
|
|
||||||
#include <functional>
|
|
||||||
#include <initializer_list>
|
|
||||||
#include <sstream>
|
|
||||||
#include <string>
|
|
||||||
#include <system_error>
|
|
||||||
#include <tuple>
|
|
||||||
#include <type_traits>
|
|
||||||
#include <utility>
|
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
#if 17 <= VULKAN_HPP_CPP_VERSION
|
#if 17 <= VULKAN_HPP_CPP_VERSION
|
||||||
# include <string_view>
|
# include <string_view> // std::string_view
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||||
@ -49,8 +38,16 @@
|
|||||||
# define VULKAN_HPP_NO_SMART_HANDLE
|
# define VULKAN_HPP_NO_SMART_HANDLE
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# include <memory>
|
# include <tuple> // std::tie
|
||||||
# include <vector>
|
# include <vector> // std::vector
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined( VULKAN_HPP_NO_EXCEPTIONS )
|
||||||
|
# include <system_error> // std::is_error_code_enum
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
||||||
|
# include <algorithm> // std::transform
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined( VULKAN_HPP_NO_CONSTRUCTORS )
|
#if defined( VULKAN_HPP_NO_CONSTRUCTORS )
|
||||||
@ -241,318 +238,6 @@ static_assert( VK_HEADER_VERSION == 222, "Wrong VK_HEADER_VERSION!" );
|
|||||||
|
|
||||||
namespace VULKAN_HPP_NAMESPACE
|
namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
|
||||||
template <typename T>
|
|
||||||
class ArrayProxy
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
VULKAN_HPP_CONSTEXPR ArrayProxy() VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( 0 )
|
|
||||||
, m_ptr( nullptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
VULKAN_HPP_CONSTEXPR ArrayProxy( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( 0 )
|
|
||||||
, m_ptr( nullptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayProxy( T & value ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( 1 )
|
|
||||||
, m_ptr( &value )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxy( typename std::remove_const<T>::type & value ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( 1 )
|
|
||||||
, m_ptr( &value )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayProxy( uint32_t count, T * ptr ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( count )
|
|
||||||
, m_ptr( ptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxy( uint32_t count, typename std::remove_const<T>::type * ptr ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( count )
|
|
||||||
, m_ptr( ptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <std::size_t C>
|
|
||||||
ArrayProxy( T ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( C )
|
|
||||||
, m_ptr( ptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <std::size_t C, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxy( typename std::remove_const<T>::type ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( C )
|
|
||||||
, m_ptr( ptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
# if __GNUC__ >= 9
|
|
||||||
# pragma GCC diagnostic push
|
|
||||||
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
|
|
||||||
# endif
|
|
||||||
|
|
||||||
ArrayProxy( std::initializer_list<T> const & list ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( list.size() ) )
|
|
||||||
, m_ptr( list.begin() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxy( std::initializer_list<typename std::remove_const<T>::type> const & list ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( list.size() ) )
|
|
||||||
, m_ptr( list.begin() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayProxy( std::initializer_list<T> & list ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( list.size() ) )
|
|
||||||
, m_ptr( list.begin() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxy( std::initializer_list<typename std::remove_const<T>::type> & list ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( list.size() ) )
|
|
||||||
, m_ptr( list.begin() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
# if __GNUC__ >= 9
|
|
||||||
# pragma GCC diagnostic pop
|
|
||||||
# endif
|
|
||||||
|
|
||||||
// Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly
|
|
||||||
// convertible to size_t. The const version can capture temporaries, with lifetime ending at end of statement.
|
|
||||||
template <typename V,
|
|
||||||
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
|
|
||||||
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
|
|
||||||
ArrayProxy( V const & v ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( v.size() ) )
|
|
||||||
, m_ptr( v.data() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename V,
|
|
||||||
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
|
|
||||||
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
|
|
||||||
ArrayProxy( V & v ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( v.size() ) )
|
|
||||||
, m_ptr( v.data() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const T * begin() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return m_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const T * end() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return m_ptr + m_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
const T & front() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
VULKAN_HPP_ASSERT( m_count && m_ptr );
|
|
||||||
return *m_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const T & back() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
VULKAN_HPP_ASSERT( m_count && m_ptr );
|
|
||||||
return *( m_ptr + m_count - 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool empty() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return ( m_count == 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t size() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return m_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
T * data() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return m_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
uint32_t m_count;
|
|
||||||
T * m_ptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
class ArrayProxyNoTemporaries
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
VULKAN_HPP_CONSTEXPR ArrayProxyNoTemporaries() VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( 0 )
|
|
||||||
, m_ptr( nullptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
VULKAN_HPP_CONSTEXPR ArrayProxyNoTemporaries( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( 0 )
|
|
||||||
, m_ptr( nullptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayProxyNoTemporaries( T & value ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( 1 )
|
|
||||||
, m_ptr( &value )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename V>
|
|
||||||
ArrayProxyNoTemporaries( V && value ) = delete;
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( typename std::remove_const<T>::type & value ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( 1 )
|
|
||||||
, m_ptr( &value )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( typename std::remove_const<T>::type && value ) = delete;
|
|
||||||
|
|
||||||
ArrayProxyNoTemporaries( uint32_t count, T * ptr ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( count )
|
|
||||||
, m_ptr( ptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( uint32_t count, typename std::remove_const<T>::type * ptr ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( count )
|
|
||||||
, m_ptr( ptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <std::size_t C>
|
|
||||||
ArrayProxyNoTemporaries( T ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( C )
|
|
||||||
, m_ptr( ptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <std::size_t C>
|
|
||||||
ArrayProxyNoTemporaries( T( &&ptr )[C] ) = delete;
|
|
||||||
|
|
||||||
template <std::size_t C, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( typename std::remove_const<T>::type ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( C )
|
|
||||||
, m_ptr( ptr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <std::size_t C, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( typename std::remove_const<T>::type( &&ptr )[C] ) = delete;
|
|
||||||
|
|
||||||
ArrayProxyNoTemporaries( std::initializer_list<T> const & list ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( list.size() ) )
|
|
||||||
, m_ptr( list.begin() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayProxyNoTemporaries( std::initializer_list<T> const && list ) = delete;
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> const & list ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( list.size() ) )
|
|
||||||
, m_ptr( list.begin() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> const && list ) = delete;
|
|
||||||
|
|
||||||
ArrayProxyNoTemporaries( std::initializer_list<T> & list ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( list.size() ) )
|
|
||||||
, m_ptr( list.begin() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayProxyNoTemporaries( std::initializer_list<T> && list ) = delete;
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> & list ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( list.size() ) )
|
|
||||||
, m_ptr( list.begin() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
|
||||||
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete;
|
|
||||||
|
|
||||||
// Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly
|
|
||||||
// convertible to size_t.
|
|
||||||
template <typename V,
|
|
||||||
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
|
|
||||||
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
|
|
||||||
ArrayProxyNoTemporaries( V & v ) VULKAN_HPP_NOEXCEPT
|
|
||||||
: m_count( static_cast<uint32_t>( v.size() ) )
|
|
||||||
, m_ptr( v.data() )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const T * begin() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return m_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const T * end() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return m_ptr + m_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
const T & front() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
VULKAN_HPP_ASSERT( m_count && m_ptr );
|
|
||||||
return *m_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const T & back() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
VULKAN_HPP_ASSERT( m_count && m_ptr );
|
|
||||||
return *( m_ptr + m_count - 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool empty() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return ( m_count == 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t size() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return m_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
T * data() const VULKAN_HPP_NOEXCEPT
|
|
||||||
{
|
|
||||||
return m_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
uint32_t m_count;
|
|
||||||
T * m_ptr;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename T, size_t N>
|
template <typename T, size_t N>
|
||||||
class ArrayWrapper1D : public std::array<T, N>
|
class ArrayWrapper1D : public std::array<T, N>
|
||||||
{
|
{
|
||||||
@ -871,6 +556,317 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
{
|
{
|
||||||
return flags.operator^( bit );
|
return flags.operator^( bit );
|
||||||
}
|
}
|
||||||
|
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
class ArrayProxy
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
VULKAN_HPP_CONSTEXPR ArrayProxy() VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( 0 )
|
||||||
|
, m_ptr( nullptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
VULKAN_HPP_CONSTEXPR ArrayProxy( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( 0 )
|
||||||
|
, m_ptr( nullptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayProxy( T & value ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( 1 )
|
||||||
|
, m_ptr( &value )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxy( typename std::remove_const<T>::type & value ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( 1 )
|
||||||
|
, m_ptr( &value )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayProxy( uint32_t count, T * ptr ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( count )
|
||||||
|
, m_ptr( ptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxy( uint32_t count, typename std::remove_const<T>::type * ptr ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( count )
|
||||||
|
, m_ptr( ptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <std::size_t C>
|
||||||
|
ArrayProxy( T ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( C )
|
||||||
|
, m_ptr( ptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <std::size_t C, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxy( typename std::remove_const<T>::type ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( C )
|
||||||
|
, m_ptr( ptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
# if __GNUC__ >= 9
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
|
||||||
|
# endif
|
||||||
|
|
||||||
|
ArrayProxy( std::initializer_list<T> const & list ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( list.size() ) )
|
||||||
|
, m_ptr( list.begin() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxy( std::initializer_list<typename std::remove_const<T>::type> const & list ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( list.size() ) )
|
||||||
|
, m_ptr( list.begin() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayProxy( std::initializer_list<T> & list ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( list.size() ) )
|
||||||
|
, m_ptr( list.begin() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxy( std::initializer_list<typename std::remove_const<T>::type> & list ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( list.size() ) )
|
||||||
|
, m_ptr( list.begin() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
# if __GNUC__ >= 9
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
# endif
|
||||||
|
|
||||||
|
// Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly
|
||||||
|
// convertible to size_t. The const version can capture temporaries, with lifetime ending at end of statement.
|
||||||
|
template <typename V,
|
||||||
|
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
|
||||||
|
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
|
||||||
|
ArrayProxy( V const & v ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( v.size() ) )
|
||||||
|
, m_ptr( v.data() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename V,
|
||||||
|
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
|
||||||
|
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
|
||||||
|
ArrayProxy( V & v ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( v.size() ) )
|
||||||
|
, m_ptr( v.data() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
const T * begin() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return m_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T * end() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return m_ptr + m_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & front() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
VULKAN_HPP_ASSERT( m_count && m_ptr );
|
||||||
|
return *m_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & back() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
VULKAN_HPP_ASSERT( m_count && m_ptr );
|
||||||
|
return *( m_ptr + m_count - 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool empty() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return ( m_count == 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t size() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return m_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
T * data() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return m_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
uint32_t m_count;
|
||||||
|
T * m_ptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
class ArrayProxyNoTemporaries
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
VULKAN_HPP_CONSTEXPR ArrayProxyNoTemporaries() VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( 0 )
|
||||||
|
, m_ptr( nullptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
VULKAN_HPP_CONSTEXPR ArrayProxyNoTemporaries( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( 0 )
|
||||||
|
, m_ptr( nullptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayProxyNoTemporaries( T & value ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( 1 )
|
||||||
|
, m_ptr( &value )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename V>
|
||||||
|
ArrayProxyNoTemporaries( V && value ) = delete;
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( typename std::remove_const<T>::type & value ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( 1 )
|
||||||
|
, m_ptr( &value )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( typename std::remove_const<T>::type && value ) = delete;
|
||||||
|
|
||||||
|
ArrayProxyNoTemporaries( uint32_t count, T * ptr ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( count )
|
||||||
|
, m_ptr( ptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( uint32_t count, typename std::remove_const<T>::type * ptr ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( count )
|
||||||
|
, m_ptr( ptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <std::size_t C>
|
||||||
|
ArrayProxyNoTemporaries( T ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( C )
|
||||||
|
, m_ptr( ptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <std::size_t C>
|
||||||
|
ArrayProxyNoTemporaries( T( &&ptr )[C] ) = delete;
|
||||||
|
|
||||||
|
template <std::size_t C, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( typename std::remove_const<T>::type ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( C )
|
||||||
|
, m_ptr( ptr )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <std::size_t C, typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( typename std::remove_const<T>::type( &&ptr )[C] ) = delete;
|
||||||
|
|
||||||
|
ArrayProxyNoTemporaries( std::initializer_list<T> const & list ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( list.size() ) )
|
||||||
|
, m_ptr( list.begin() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayProxyNoTemporaries( std::initializer_list<T> const && list ) = delete;
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> const & list ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( list.size() ) )
|
||||||
|
, m_ptr( list.begin() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> const && list ) = delete;
|
||||||
|
|
||||||
|
ArrayProxyNoTemporaries( std::initializer_list<T> & list ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( list.size() ) )
|
||||||
|
, m_ptr( list.begin() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayProxyNoTemporaries( std::initializer_list<T> && list ) = delete;
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> & list ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( list.size() ) )
|
||||||
|
, m_ptr( list.begin() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename B = T, typename std::enable_if<std::is_const<B>::value, int>::type = 0>
|
||||||
|
ArrayProxyNoTemporaries( std::initializer_list<typename std::remove_const<T>::type> && list ) = delete;
|
||||||
|
|
||||||
|
// Any type with a .data() return type implicitly convertible to T*, and a // .size() return type implicitly
|
||||||
|
// convertible to size_t.
|
||||||
|
template <typename V,
|
||||||
|
typename std::enable_if<std::is_convertible<decltype( std::declval<V>().data() ), T *>::value &&
|
||||||
|
std::is_convertible<decltype( std::declval<V>().size() ), std::size_t>::value>::type * = nullptr>
|
||||||
|
ArrayProxyNoTemporaries( V & v ) VULKAN_HPP_NOEXCEPT
|
||||||
|
: m_count( static_cast<uint32_t>( v.size() ) )
|
||||||
|
, m_ptr( v.data() )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
const T * begin() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return m_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T * end() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return m_ptr + m_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & front() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
VULKAN_HPP_ASSERT( m_count && m_ptr );
|
||||||
|
return *m_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T & back() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
VULKAN_HPP_ASSERT( m_count && m_ptr );
|
||||||
|
return *( m_ptr + m_count - 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool empty() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return ( m_count == 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t size() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return m_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
T * data() const VULKAN_HPP_NOEXCEPT
|
||||||
|
{
|
||||||
|
return m_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
uint32_t m_count;
|
||||||
|
T * m_ptr;
|
||||||
|
};
|
||||||
|
|
||||||
template <typename RefType>
|
template <typename RefType>
|
||||||
class Optional
|
class Optional
|
||||||
@ -1266,6 +1262,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
lhs.swap( rhs );
|
lhs.swap( rhs );
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
|
|
||||||
class DispatchLoaderBase
|
class DispatchLoaderBase
|
||||||
{
|
{
|
||||||
@ -5409,6 +5406,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr
|
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr
|
||||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER
|
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
||||||
|
|
||||||
struct AllocationCallbacks;
|
struct AllocationCallbacks;
|
||||||
|
|
||||||
@ -5587,6 +5585,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
Dispatch const * m_dispatch = nullptr;
|
Dispatch const * m_dispatch = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // !VULKAN_HPP_NO_SMART_HANDLE
|
||||||
|
|
||||||
//==================
|
//==================
|
||||||
//=== BASE TYPEs ===
|
//=== BASE TYPEs ===
|
||||||
//==================
|
//==================
|
||||||
@ -6196,6 +6196,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
|
|
||||||
namespace VULKAN_HPP_NAMESPACE
|
namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
|
#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||||
|
|
||||||
//=======================
|
//=======================
|
||||||
//=== STRUCTS EXTENDS ===
|
//=== STRUCTS EXTENDS ===
|
||||||
//=======================
|
//=======================
|
||||||
@ -11252,6 +11254,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
|
|
||||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL
|
||||||
class DynamicLoader
|
class DynamicLoader
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#ifndef VULKAN_STRUCTS_HPP
|
#ifndef VULKAN_STRUCTS_HPP
|
||||||
#define VULKAN_STRUCTS_HPP
|
#define VULKAN_STRUCTS_HPP
|
||||||
|
|
||||||
|
#include <cstring> // strcmp
|
||||||
|
|
||||||
namespace VULKAN_HPP_NAMESPACE
|
namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
//===============
|
//===============
|
||||||
|
@ -10,6 +10,12 @@
|
|||||||
|
|
||||||
#include <vulkan/vulkan_enums.hpp>
|
#include <vulkan/vulkan_enums.hpp>
|
||||||
|
|
||||||
|
#if ( ( 20 <= VULKAN_HPP_CPP_VERSION ) && __has_include( <format> ) )
|
||||||
|
# include <format> // std::format
|
||||||
|
#else
|
||||||
|
# include <sstream> // std::stringstream
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace VULKAN_HPP_NAMESPACE
|
namespace VULKAN_HPP_NAMESPACE
|
||||||
{
|
{
|
||||||
//==========================
|
//==========================
|
||||||
@ -2989,9 +2995,13 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
|
|
||||||
VULKAN_HPP_INLINE std::string toHexString( uint32_t value )
|
VULKAN_HPP_INLINE std::string toHexString( uint32_t value )
|
||||||
{
|
{
|
||||||
|
#if ( ( 20 <= VULKAN_HPP_CPP_VERSION ) && __has_include( <format> ) )
|
||||||
|
return std::format( "{:x}", value );
|
||||||
|
#else
|
||||||
std::stringstream stream;
|
std::stringstream stream;
|
||||||
stream << std::hex << value;
|
stream << std::hex << value;
|
||||||
return stream.str();
|
return stream.str();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//=== VK_VERSION_1_0 ===
|
//=== VK_VERSION_1_0 ===
|
||||||
|
Loading…
x
Reference in New Issue
Block a user