From 3b0d995a8204a45ec9d22b82484966409064b6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Thu, 27 Jun 2024 13:32:31 +0200 Subject: [PATCH] Introduce some special handlings for structure VkLayerSettingEXT. (#1910) --- VulkanHppGenerator.cpp | 264 +++++++++++++++++++++++++++++++------- VulkanHppGenerator.hpp | 3 +- vulkan/vulkan_enums.hpp | 159 ++++++++++++++++------- vulkan/vulkan_structs.hpp | 138 ++++++++++++++++++-- vulkan/vulkansc_enums.hpp | 90 ++++++------- 5 files changed, 508 insertions(+), 146 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 997a942..a44e86f 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -102,7 +102,6 @@ namespace VULKAN_HPP_NAMESPACE ${Flags} ${enums} -${indexTypeTraits} ${objectTypeToDebugReportObjectType} } // namespace VULKAN_HPP_NAMESPACE #endif @@ -111,7 +110,6 @@ ${objectTypeToDebugReportObjectType} std::string str = replaceWithMap( vulkanEnumsHppTemplate, { { "enums", generateEnums() }, { "Flags", readSnippet( "Flags.hpp" ) }, - { "indexTypeTraits", generateIndexTypeTraits() }, { "licenseHeader", m_vulkanLicenseHeader }, { "objectTypeToDebugReportObjectType", generateObjectTypeToDebugReportObjectType() } } ); @@ -6880,16 +6878,27 @@ std::string VulkanHppGenerator::generateEnum( std::pair c enumUsing += " using " + stripPrefix( alias.first, "Vk" ) + " = " + stripPrefix( enumData.first, "Vk" ) + ";\n"; } + std::string typeTraits; + if ( enumData.first == "VkIndexType" ) + { + typeTraits = generateIndexTypeTraits( enumData ); + } + else if ( enumData.first == "VkLayerSettingTypeEXT" ) + { + typeTraits = generateLayerSettingTypeTraits(); + } + const std::string enumTemplate = R"( enum class ${enumName}${baseType} {${enumValues}}; -${enumUsing}${bitmask})"; +${typeTraits}${enumUsing}${bitmask})"; return replaceWithMap( enumTemplate, { { "baseType", baseType }, { "bitmask", bitmask }, { "enumName", stripPrefix( enumData.first, "Vk" ) }, { "enumUsing", enumUsing }, - { "enumValues", enumValues } } ); + { "enumValues", enumValues }, + { "typeTraits", typeTraits } } ); } std::string VulkanHppGenerator::generateEnums() const @@ -8118,9 +8127,54 @@ std::string VulkanHppGenerator::generateHandles() const return str; } -std::string VulkanHppGenerator::generateIndexTypeTraits() const +std::string VulkanHppGenerator::generateIndexTypeTraits( std::pair const & enumData ) const { - const std::string indexTypeTraitsTemplate = R"( + assert( enumData.first == "VkIndexType" ); + + std::string typeTraits; + for ( auto const & value : enumData.second.values ) + { + std::string cppType, valueName; + if ( value.name == "VK_INDEX_TYPE_UINT8_KHR" ) + { + valueName = "eUint8KHR"; + cppType = "uint8_t"; + } + else if ( value.name == "VK_INDEX_TYPE_UINT16" ) + { + valueName = "eUint16"; + cppType = "uint16_t"; + } + else if ( value.name == "VK_INDEX_TYPE_UINT32" ) + { + valueName = "eUint32"; + cppType = "uint32_t"; + } + else + { + checkForError( value.name == "VK_INDEX_TYPE_NONE_KHR", value.xmlLine, "unknown IndexType <" + value.name + "> encountered" ); + } + + if ( !valueName.empty() ) + { + const std::string typeTraitTemplate = R"( template <> + struct IndexTypeValue<${cppType}> + { + static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::${valueName}; + }; + + template <> + struct CppType + { + using Type = ${cppType}; + }; +)"; + + typeTraits += replaceWithMap( typeTraitTemplate, { { "cppType", cppType }, { "valueName", valueName } } ); + } + } + + const std::string typeTraitsTemplate = R"( //========================= //=== Index Type Traits === //========================= @@ -8129,48 +8183,95 @@ std::string VulkanHppGenerator::generateIndexTypeTraits() const struct IndexTypeValue {}; -${indexTypeTraits} +${typeTraits} )"; - auto indexType = m_enums.find( "VkIndexType" ); - assert( indexType != m_enums.end() ); + return replaceWithMap( typeTraitsTemplate, { { "typeTraits", typeTraits } } ); +} - std::string indexTypeTraits; - for ( auto const & value : indexType->second.values ) +std::string VulkanHppGenerator::generateLayerSettingTypeTraits() const +{ +#if !defined( NDEBUG ) + auto enumIt = m_enums.find( "VkLayerSettingTypeEXT" ); + assert( ( enumIt != m_enums.end() ) && ( enumIt->second.values.size() == 8 ) && ( enumIt->second.values[0].name == "VK_LAYER_SETTING_TYPE_BOOL32_EXT" ) && + ( enumIt->second.values[1].name == "VK_LAYER_SETTING_TYPE_INT32_EXT" ) && ( enumIt->second.values[2].name == "VK_LAYER_SETTING_TYPE_INT64_EXT" ) && + ( enumIt->second.values[3].name == "VK_LAYER_SETTING_TYPE_UINT32_EXT" ) && ( enumIt->second.values[4].name == "VK_LAYER_SETTING_TYPE_UINT64_EXT" ) && + ( enumIt->second.values[5].name == "VK_LAYER_SETTING_TYPE_FLOAT32_EXT" ) && + ( enumIt->second.values[6].name == "VK_LAYER_SETTING_TYPE_FLOAT64_EXT" ) && ( enumIt->second.values[7].name == "VK_LAYER_SETTING_TYPE_STRING_EXT" ) ); +#endif + + const std::string typeTraits = R"( + //================================= + //=== Layer Setting Type Traits === + //================================= + + template <> + struct CppType { - assert( value.name.starts_with( "VK_INDEX_TYPE_UINT" ) || value.name.starts_with( "VK_INDEX_TYPE_NONE" ) ); - if ( value.name.starts_with( "VK_INDEX_TYPE_UINT" ) ) + using Type = vk::Bool32; + }; + + template <> + struct CppType + { + using Type = int32_t; + }; + + template <> + struct CppType + { + using Type = int64_t; + }; + + template <> + struct CppType + { + using Type = uint32_t; + }; + + template <> + struct CppType + { + using Type = uint64_t; + }; + + template <> + struct CppType + { + using Type = float; + }; + + template <> + struct CppType + { + using Type = double; + }; + + template <> + struct CppType + { + using Type = char *; + }; + + template + bool isSameType( LayerSettingTypeEXT layerSettingType ) + { + switch ( layerSettingType ) { - std::string valueName = generateEnumValueName( indexType->first, value.name, false ); - assert( valueName.starts_with( "eUint" ) ); - auto beginDigit = valueName.begin() + strlen( "eUint" ); - assert( isdigit( *beginDigit ) ); - auto endDigit = std::find_if( beginDigit, valueName.end(), []( std::string::value_type c ) noexcept { return !isdigit( c ); } ); - std::string cppType = "uint" + valueName.substr( strlen( "eUint" ), endDigit - beginDigit ) + "_t"; - - // from type to enum value - const std::string typeToEnumTemplate = R"( - template <> - struct IndexTypeValue<${cppType}> - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::${valueName}; - }; -)"; - indexTypeTraits += replaceWithMap( typeToEnumTemplate, { { "cppType", cppType }, { "valueName", valueName } } ); - - // from enum value to type - const std::string enumToTypeTemplate = R"( - template <> - struct CppType - { - using Type = ${cppType}; - }; -)"; - indexTypeTraits += replaceWithMap( enumToTypeTemplate, { { "cppType", cppType }, { "valueName", valueName } } ); + case LayerSettingTypeEXT::eBool32: return std::is_same::value; + case LayerSettingTypeEXT::eInt32: return std::is_same::value; + case LayerSettingTypeEXT::eInt64: return std::is_same::value; + case LayerSettingTypeEXT::eUint32: return std::is_same::value; + case LayerSettingTypeEXT::eUint64: return std::is_same::value; + case LayerSettingTypeEXT::eFloat32: return std::is_same::value; + case LayerSettingTypeEXT::eFloat64: return std::is_same::value; + case LayerSettingTypeEXT::eString: return std::is_same::value; + default: return false; } } +)"; - return replaceWithMap( indexTypeTraitsTemplate, { { "indexTypeTraits", indexTypeTraits } } ); + return typeTraits; } std::string VulkanHppGenerator::generateLenInitializer( @@ -10865,9 +10966,51 @@ std::string VulkanHppGenerator::generateStructConstructors( std::pair const & structData ) const { - if ( std::any_of( structData.second.members.begin(), - structData.second.members.end(), - [this, &members = structData.second.members]( MemberData const & md ) { return hasLen( md, members ); } ) ) + // some structs needs some special handling! + if ( structData.first == "VkLayerSettingEXT" ) + { + assert( ( structData.second.members.size() == 5 ) && ( structData.second.members[0].name == "pLayerName" ) && + ( structData.second.members[1].name == "pSettingName" ) && ( structData.second.members[2].name == "type" ) && + ( structData.second.members[3].name == "valueCount" ) && ( structData.second.members[4].name == "pValues" ) ); + + static const std::string byTypeTemplate = + R"( LayerSettingEXT( char const * pLayerName_, char const * pSettingName_, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, vk::ArrayProxyNoTemporaries const & values_ ) + : pLayerName( pLayerName_ ) + , pSettingName( pSettingName_ ) + , type( type_ ) + , valueCount( static_cast( values_.size() ) ) + , pValues( values_.data() ) + { + VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType<${type}>(type) ); + })"; + + static const std::string constructorTemplate = R"( +#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) +// NOTE: you need to provide the type because vk::Bool32 and uint32_t are indistinguishable! +${byInt32} +${byInt64} +${byUint32} +${byUint64} +${byFloat32} +${byFloat64} +${byString} +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +)"; + + return replaceWithMap( constructorTemplate, + { + { "byInt32", replaceWithMap( byTypeTemplate, { { "type", "int32_t" } } ) }, + { "byInt64", replaceWithMap( byTypeTemplate, { { "type", "int64_t" } } ) }, + { "byUint32", replaceWithMap( byTypeTemplate, { { "type", "uint32_t" } } ) }, + { "byUint64", replaceWithMap( byTypeTemplate, { { "type", "uint64_t" } } ) }, + { "byFloat32", replaceWithMap( byTypeTemplate, { { "type", "float" } } ) }, + { "byFloat64", replaceWithMap( byTypeTemplate, { { "type", "double" } } ) }, + { "byString", replaceWithMap( byTypeTemplate, { { "type", "char *" } } ) }, + } ); + } + else if ( std::any_of( structData.second.members.begin(), + structData.second.members.end(), + [this, &members = structData.second.members]( MemberData const & md ) { return hasLen( md, members ); } ) ) { // map from len-members to all the array members using that len std::map::const_iterator, std::vector::const_iterator>> lenIts; @@ -11680,6 +11823,41 @@ std::string VulkanHppGenerator::generateStructSetter( std::string const & struct { "arraySize", member.arraySizes[0] }, { "structureName", structureName } } ); } + else if ( ( structureName == "LayerSettingEXT" ) && ( index == 4 ) ) + { + // VkLayerSettingEXT::pValues needs some special handling! + assert( member.name == "pValues" ); + static const std::string byTypeTemplate = + R"( LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT + { + valueCount = static_cast( values_.size() ); + pValues = values_.data(); + return *this; + })"; + + static const std::string setArrayTemplate = R"( +#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) +${byInt32} +${byInt64} +${byUint32} +${byUint64} +${byFloat32} +${byFloat64} +${byString} +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +)"; + + return replaceWithMap( setArrayTemplate, + { + { "byInt32", replaceWithMap( byTypeTemplate, { { "type", "int32_t" } } ) }, + { "byInt64", replaceWithMap( byTypeTemplate, { { "type", "int64_t" } } ) }, + { "byUint32", replaceWithMap( byTypeTemplate, { { "type", "uint32_t" } } ) }, + { "byUint64", replaceWithMap( byTypeTemplate, { { "type", "uint64_t" } } ) }, + { "byFloat32", replaceWithMap( byTypeTemplate, { { "type", "float" } } ) }, + { "byFloat64", replaceWithMap( byTypeTemplate, { { "type", "double" } } ) }, + { "byString", replaceWithMap( byTypeTemplate, { { "type", "char *" } } ) }, + } ); + } else { assert( ( member.lenExpressions[0] == member.lenMembers[0].first ) || ( member.lenExpressions[0] == "codeSize / 4" ) ); diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 9acafe3..90b07d4 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -756,7 +756,8 @@ private: std::string generateHandleHashStructures( std::vector const & requireData, std::string const & title ) const; std::string generateHandleHashStructures() const; std::string generateHandles() const; - std::string generateIndexTypeTraits() const; + std::string generateIndexTypeTraits( std::pair const & enumData ) const; + std::string generateLayerSettingTypeTraits() const; std::string generateLenInitializer( std::vector::const_iterator mit, std::map::const_iterator, std::vector::const_iterator>>::const_iterator litit, diff --git a/vulkan/vulkan_enums.hpp b/vulkan/vulkan_enums.hpp index 2b8c043..f04b6fb 100644 --- a/vulkan/vulkan_enums.hpp +++ b/vulkan/vulkan_enums.hpp @@ -3573,6 +3573,51 @@ namespace VULKAN_HPP_NAMESPACE eUint8EXT = VK_INDEX_TYPE_UINT8_EXT }; + //========================= + //=== Index Type Traits === + //========================= + + template + struct IndexTypeValue + { + }; + + template <> + struct IndexTypeValue + { + static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint16; + }; + + template <> + struct CppType + { + using Type = uint16_t; + }; + + template <> + struct IndexTypeValue + { + static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint32; + }; + + template <> + struct CppType + { + using Type = uint32_t; + }; + + template <> + struct IndexTypeValue + { + static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint8KHR; + }; + + template <> + struct CppType + { + using Type = uint8_t; + }; + enum class StencilFaceFlagBits : VkStencilFaceFlags { eFront = VK_STENCIL_FACE_FRONT_BIT, @@ -7091,6 +7136,75 @@ namespace VULKAN_HPP_NAMESPACE eString = VK_LAYER_SETTING_TYPE_STRING_EXT }; + //================================= + //=== Layer Setting Type Traits === + //================================= + + template <> + struct CppType + { + using Type = vk::Bool32; + }; + + template <> + struct CppType + { + using Type = int32_t; + }; + + template <> + struct CppType + { + using Type = int64_t; + }; + + template <> + struct CppType + { + using Type = uint32_t; + }; + + template <> + struct CppType + { + using Type = uint64_t; + }; + + template <> + struct CppType + { + using Type = float; + }; + + template <> + struct CppType + { + using Type = double; + }; + + template <> + struct CppType + { + using Type = char *; + }; + + template + bool isSameType( LayerSettingTypeEXT layerSettingType ) + { + switch ( layerSettingType ) + { + case LayerSettingTypeEXT::eBool32: return std::is_same::value; + case LayerSettingTypeEXT::eInt32: return std::is_same::value; + case LayerSettingTypeEXT::eInt64: return std::is_same::value; + case LayerSettingTypeEXT::eUint32: return std::is_same::value; + case LayerSettingTypeEXT::eUint64: return std::is_same::value; + case LayerSettingTypeEXT::eFloat32: return std::is_same::value; + case LayerSettingTypeEXT::eFloat64: return std::is_same::value; + case LayerSettingTypeEXT::eString: return std::is_same::value; + default: return false; + } + } + //=== VK_NV_low_latency2 === enum class LatencyMarkerNV @@ -7190,51 +7304,6 @@ namespace VULKAN_HPP_NAMESPACE }; using TimeDomainEXT = TimeDomainKHR; - //========================= - //=== Index Type Traits === - //========================= - - template - struct IndexTypeValue - { - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint16; - }; - - template <> - struct CppType - { - using Type = uint16_t; - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint32; - }; - - template <> - struct CppType - { - using Type = uint32_t; - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint8KHR; - }; - - template <> - struct CppType - { - using Type = uint8_t; - }; - //=========================================================== //=== Mapping from ObjectType to DebugReportObjectTypeEXT === //=========================================================== diff --git a/vulkan/vulkan_structs.hpp b/vulkan/vulkan_structs.hpp index 73cd6f7..9a5d282 100644 --- a/vulkan/vulkan_structs.hpp +++ b/vulkan/vulkan_structs.hpp @@ -49835,17 +49835,96 @@ namespace VULKAN_HPP_NAMESPACE LayerSettingEXT( VkLayerSettingEXT const & rhs ) VULKAN_HPP_NOEXCEPT : LayerSettingEXT( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - LayerSettingEXT( const char * pLayerName_, - const char * pSettingName_, - VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, - VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) + // NOTE: you need to provide the type because vk::Bool32 and uint32_t are indistinguishable! + LayerSettingEXT( char const * pLayerName_, + char const * pSettingName_, + VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, + vk::ArrayProxyNoTemporaries const & values_ ) : pLayerName( pLayerName_ ) , pSettingName( pSettingName_ ) , type( type_ ) - , valueCount( static_cast( values_.size() * sizeof( T ) ) ) + , valueCount( static_cast( values_.size() ) ) , pValues( values_.data() ) { + VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); + } + + LayerSettingEXT( char const * pLayerName_, + char const * pSettingName_, + VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, + vk::ArrayProxyNoTemporaries const & values_ ) + : pLayerName( pLayerName_ ) + , pSettingName( pSettingName_ ) + , type( type_ ) + , valueCount( static_cast( values_.size() ) ) + , pValues( values_.data() ) + { + VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); + } + + LayerSettingEXT( char const * pLayerName_, + char const * pSettingName_, + VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, + vk::ArrayProxyNoTemporaries const & values_ ) + : pLayerName( pLayerName_ ) + , pSettingName( pSettingName_ ) + , type( type_ ) + , valueCount( static_cast( values_.size() ) ) + , pValues( values_.data() ) + { + VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); + } + + LayerSettingEXT( char const * pLayerName_, + char const * pSettingName_, + VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, + vk::ArrayProxyNoTemporaries const & values_ ) + : pLayerName( pLayerName_ ) + , pSettingName( pSettingName_ ) + , type( type_ ) + , valueCount( static_cast( values_.size() ) ) + , pValues( values_.data() ) + { + VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); + } + + LayerSettingEXT( char const * pLayerName_, + char const * pSettingName_, + VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, + vk::ArrayProxyNoTemporaries const & values_ ) + : pLayerName( pLayerName_ ) + , pSettingName( pSettingName_ ) + , type( type_ ) + , valueCount( static_cast( values_.size() ) ) + , pValues( values_.data() ) + { + VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); + } + + LayerSettingEXT( char const * pLayerName_, + char const * pSettingName_, + VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, + vk::ArrayProxyNoTemporaries const & values_ ) + : pLayerName( pLayerName_ ) + , pSettingName( pSettingName_ ) + , type( type_ ) + , valueCount( static_cast( values_.size() ) ) + , pValues( values_.data() ) + { + VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); + } + + LayerSettingEXT( char const * pLayerName_, + char const * pSettingName_, + VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, + vk::ArrayProxyNoTemporaries const & values_ ) + : pLayerName( pLayerName_ ) + , pSettingName( pSettingName_ ) + , type( type_ ) + , valueCount( static_cast( values_.size() ) ) + , pValues( values_.data() ) + { + VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -49883,17 +49962,52 @@ namespace VULKAN_HPP_NAMESPACE return *this; } - VULKAN_HPP_CONSTEXPR_14 LayerSettingEXT & setPValues( const void * pValues_ ) VULKAN_HPP_NOEXCEPT +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { - pValues = pValues_; + valueCount = static_cast( values_.size() ); + pValues = values_.data(); return *this; } -# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) - template - LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT + LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { - valueCount = static_cast( values_.size() * sizeof( T ) ); + valueCount = static_cast( values_.size() ); + pValues = values_.data(); + return *this; + } + + LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT + { + valueCount = static_cast( values_.size() ); + pValues = values_.data(); + return *this; + } + + LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT + { + valueCount = static_cast( values_.size() ); + pValues = values_.data(); + return *this; + } + + LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT + { + valueCount = static_cast( values_.size() ); + pValues = values_.data(); + return *this; + } + + LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT + { + valueCount = static_cast( values_.size() ); + pValues = values_.data(); + return *this; + } + + LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT + { + valueCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } diff --git a/vulkan/vulkansc_enums.hpp b/vulkan/vulkansc_enums.hpp index cb62f7a..ae6b389 100644 --- a/vulkan/vulkansc_enums.hpp +++ b/vulkan/vulkansc_enums.hpp @@ -2320,6 +2320,51 @@ namespace VULKAN_HPP_NAMESPACE eUint32 = VK_INDEX_TYPE_UINT32 }; + //========================= + //=== Index Type Traits === + //========================= + + template + struct IndexTypeValue + { + }; + + template <> + struct IndexTypeValue + { + static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint16; + }; + + template <> + struct CppType + { + using Type = uint16_t; + }; + + template <> + struct IndexTypeValue + { + static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint32; + }; + + template <> + struct CppType + { + using Type = uint32_t; + }; + + template <> + struct IndexTypeValue + { + static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint8KHR; + }; + + template <> + struct CppType + { + using Type = uint8_t; + }; + enum class StencilFaceFlagBits : VkStencilFaceFlags { eFront = VK_STENCIL_FACE_FRONT_BIT, @@ -3532,51 +3577,6 @@ namespace VULKAN_HPP_NAMESPACE }; #endif /*VK_USE_PLATFORM_SCI*/ - //========================= - //=== Index Type Traits === - //========================= - - template - struct IndexTypeValue - { - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint16; - }; - - template <> - struct CppType - { - using Type = uint16_t; - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint32; - }; - - template <> - struct CppType - { - using Type = uint32_t; - }; - - template <> - struct IndexTypeValue - { - static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint8KHR; - }; - - template <> - struct CppType - { - using Type = uint8_t; - }; - //=========================================================== //=== Mapping from ObjectType to DebugReportObjectTypeEXT === //===========================================================