From a55e3eb2a0fc5b86222b8d5ad42fb6b083aabae8 Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Wed, 5 Oct 2022 09:28:37 +0200 Subject: [PATCH] Cleanup on protection handling + some other minor cleanup --- VulkanHppGenerator.cpp | 206 ++++++++++++++++++---------------------- VulkanHppGenerator.hpp | 9 +- vulkan/vulkan_enums.hpp | 56 +++++------ 3 files changed, 126 insertions(+), 145 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index a7d5f78..2d92561 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -20,18 +20,16 @@ #include #include -void checkAttributes( int line, - std::map const & attributes, - std::map> const & required, - std::map> const & optional ); -void checkElements( int line, - std::vector const & elements, - std::map const & required, - std::set const & optional = {} ); -void checkForError( bool condition, int line, std::string const & message ); -void checkForWarning( bool condition, int line, std::string const & message ); -template -std::vector findAll( InputIt first, InputIt last, UnaryPredicate p ); +void checkAttributes( int line, + std::map const & attributes, + std::map> const & required, + std::map> const & optional ); +void checkElements( int line, + std::vector const & elements, + std::map const & required, + std::set const & optional = {} ); +void checkForError( bool condition, int line, std::string const & message ); +void checkForWarning( bool condition, int line, std::string const & message ); std::string findTag( std::set const & tags, std::string const & name, std::string const & postfix = "" ); std::string generateCArraySizes( std::vector const & sizes ); std::pair generateEnumSuffixes( std::string const & name, bool bitmask, std::set const & tags ); @@ -608,7 +606,7 @@ std::string VulkanHppGenerator::addTitleAndProtection( std::string const & title std::string str; if ( !strIf.empty() ) { - auto [enter, leave] = generateProtection( title, std::string() ); + auto [enter, leave] = generateProtection( getProtectFromTitle( title ) ); str = "\n" + enter + " //=== " + title + " ===\n" + strIf; if ( !enter.empty() && !strElse.empty() ) { @@ -667,7 +665,7 @@ void VulkanHppGenerator::appendDispatchLoaderDynamicCommands( std::vectorsecond.values ) { - auto [enter, leave] = generateProtection( value.extension, value.protect ); + auto [enter, leave] = generateProtection( getProtect( value ) ); std::string valueName = generateEnumValueName( bitmaskBitsIt->first, value.name, true, m_tags ); allFlags += ( ( previousEnter != enter ) ? ( "\n" + previousLeave + enter ) : "\n" ) + " " + ( encounteredFlag ? "| " : " " ) + bitmaskIt->second.type + "( " + enumName + "::" + valueName + " )"; @@ -2297,7 +2295,7 @@ ${toStringChecks} std::string previousEnter, previousLeave; for ( auto const & value : bitmaskBitsIt->second.values ) { - auto [enter, leave] = generateProtection( value.extension, value.protect ); + auto [enter, leave] = generateProtection( getProtect( value ) ); std::string valueName = generateEnumValueName( bitmaskBitsIt->first, value.name, true, m_tags ); if ( value.singleBit ) { @@ -4934,7 +4932,7 @@ std::string VulkanHppGenerator::generateDispatchLoaderStaticCommands( std::vecto return addTitleAndProtection( title, str ); } -std::string VulkanHppGenerator::generateEnum( std::pair const & enumData ) const +std::string VulkanHppGenerator::generateEnum( std::pair const & enumData, std::string const & surroundingProtect ) const { std::string bitmask; if ( enumData.second.isBitmask ) @@ -4949,7 +4947,15 @@ std::string VulkanHppGenerator::generateEnum( std::pair c std::map valueToNameMap; for ( auto const & value : enumData.second.values ) { - auto [enter, leave] = generateProtection( value.extension, value.protect ); + // determine the values protect, if any + std::string valueProtect = getProtect( value ); + + // if the value's protect differs from the surrounding protect, generate protection code + std::string enter, leave; + if ( !valueProtect.empty() && ( valueProtect != surroundingProtect ) ) + { + tie( enter, leave ) = generateProtection( valueProtect ); + } if ( previousEnter != enter ) { enumValues += previousLeave + enter; @@ -4989,7 +4995,7 @@ std::string VulkanHppGenerator::generateEnum( std::pair c enumData.second.values.begin(), enumData.second.values.end(), [&aliasIt]( EnumValueData const & evd ) { return aliasIt->second.name == evd.name; } ); } assert( enumIt != enumData.second.values.end() ); - assert( enumIt->extension.empty() || generateProtection( enumIt->extension, enumIt->protect ).first.empty() ); + assert( enumIt->extension.empty() || generateProtection( getProtectFromTitle( enumIt->extension ) ).first.empty() ); #endif enumValues += " " + aliasName + " = " + alias.first + ",\n"; @@ -5061,6 +5067,7 @@ ${enums} std::string VulkanHppGenerator::generateEnums( std::vector const & requireData, std::set & listedEnums, std::string const & title ) const { + std::string surroundingProtect = getProtectFromTitle( title ); std::string str; for ( auto const & require : requireData ) { @@ -5070,9 +5077,8 @@ std::string if ( ( enumIt != m_enums.end() ) && ( listedEnums.find( type ) == listedEnums.end() ) ) { listedEnums.insert( type ); - str += "\n"; - str += generateEnum( *enumIt ); + str += generateEnum( *enumIt, surroundingProtect ); } } } @@ -5180,7 +5186,7 @@ std::string VulkanHppGenerator::generateEnumToString( std::pairfirst, valueIt->name, false, m_tags ); } - auto [enter, leave] = generateProtection( handleData.first, !handleData.second.alias.empty() ); + auto [enter, leave] = generateProtection( handleData.second.alias.empty() ? getProtectFromType( handleData.first ) : "" ); assert( !handleData.second.objTypeEnum.empty() ); enumIt = m_enums.find( "VkObjectType" ); @@ -5789,7 +5795,7 @@ std::string VulkanHppGenerator::generateHandleCommandDeclarations( std::set commandNames = selectCommandsByHandle( extIt.second->second.requireData, commands, listedCommands ); if ( !commandNames.empty() ) { - auto [enter, leave] = generateProtection( extIt.second->first, std::string() ); + auto [enter, leave] = generateProtection( getProtectFromTitle( extIt.second->first ) ); str += "\n" + enter + " //=== " + extIt.second->first + " ===\n"; for ( auto const & command : commandNames ) { @@ -6114,44 +6120,9 @@ std::string VulkanHppGenerator::generateObjectDeleter( std::string const & comma return objectDeleter + "<" + parentName + ", Dispatch>( " + ( ( parentName == "NoParent" ) ? "" : "*this, " ) + allocator + "d )"; } -std::pair VulkanHppGenerator::generateProtection( std::string const & referencedIn, std::string const & protect ) const +std::pair VulkanHppGenerator::generateProtection( std::string const & protect ) const { - if ( !referencedIn.empty() ) - { - if ( m_features.find( referencedIn ) == m_features.end() ) - { - auto extensionIt = m_extensions.find( referencedIn ); - assert( extensionIt != m_extensions.end() ); - if ( !extensionIt->second.platform.empty() ) - { - auto platformIt = m_platforms.find( extensionIt->second.platform ); - assert( platformIt != m_platforms.end() ); - if ( !platformIt->second.protect.empty() ) - { - return std::make_pair( "#if defined( " + platformIt->second.protect + " )\n", "#endif /*" + platformIt->second.protect + "*/\n" ); - } - } - } - } - else if ( !protect.empty() ) - { - return std::make_pair( "#if defined( " + protect + " )\n", "#endif /*" + protect + "*/\n" ); - } - return std::make_pair( "", "" ); -} - -std::pair VulkanHppGenerator::generateProtection( std::string const & type, bool isAliased ) const -{ - if ( isAliased ) - { - return std::make_pair( "", "" ); - } - else - { - auto typeIt = m_types.find( type ); - assert( typeIt != m_types.end() ); - return generateProtection( typeIt->second.referencedIn, std::string() ); - } + return protect.empty() ? std::make_pair( "", "" ) : std::make_pair( "#if defined( " + protect + " )\n", "#endif /*" + protect + "*/\n" ); } std::string VulkanHppGenerator::generateRAIICommandDefinitions() const @@ -6289,7 +6260,7 @@ std::string VulkanHppGenerator::generateRAIIHandle( std::pairfirst != m_types.find( handle.first )->second.referencedIn ) { - std::tie( enter, leave ) = generateProtection( extIt.second->first, std::string() ); + std::tie( enter, leave ) = generateProtection( getProtectFromTitle( extIt.second->first ) ); } functionDeclarations += "\n" + enter + " //=== " + extIt.second->first + " ===\n"; for ( auto const & command : firstLevelCommands ) @@ -7309,7 +7280,7 @@ std::pair std::pair VulkanHppGenerator::generateRAIIHandleConstructors( std::pair const & handle ) const { - auto [enter, leave] = generateProtection( handle.first, !handle.second.alias.empty() ); + auto [enter, leave] = generateProtection( handle.second.alias.empty() ? getProtectFromType( handle.first ) : "" ); std::string singularConstructors, arrayConstructors; for ( auto constructorIt : handle.second.constructorIts ) @@ -7317,7 +7288,7 @@ std::pair VulkanHppGenerator::generateRAIIHandleConstr // there is a non-const parameter with handle type : the to-be-constructed handle // check for additional enter/leave guards for the constructors - auto [constructorEnter, constructorLeave] = generateProtection( constructorIt->second.referencedIn, std::string() ); + auto [constructorEnter, constructorLeave] = generateProtection( getProtectFromTitle( constructorIt->second.referencedIn ) ); if ( constructorEnter == enter ) { constructorEnter.clear(); @@ -8240,7 +8211,6 @@ std::tuplesecond.params.begin(), handle.second.destructorIt->second.params.end(), @@ -8317,7 +8287,7 @@ std::tuplefirst, value.name, false, m_tags ); str += replaceWithMap( templateString, { { "className", stripPrefix( valueName, "eError" ) + "Error" }, @@ -9234,22 +9204,22 @@ std::string VulkanHppGenerator::generateStructConstructors( std::pair const & structData ) const { - auto memberIts = findAll( structData.second.members.begin(), - structData.second.members.end(), - []( MemberData const & md ) { - return !md.len.empty() && !( md.len[0] == "null-terminated" ) && - ( ( altLens.find( md.len[0] ) == altLens.end() ) || ( md.len[0] == "codeSize / 4" ) ); - } ); - if ( !memberIts.empty() ) + auto hasLen = []( MemberData const & md ) + { return !md.len.empty() && !( md.len[0] == "null-terminated" ) && ( ( altLens.find( md.len[0] ) == altLens.end() ) || ( md.len[0] == "codeSize / 4" ) ); }; + + if ( std::find_if( structData.second.members.begin(), structData.second.members.end(), hasLen ) != structData.second.members.end() ) { // map from len-members to all the array members using that len std::map::const_iterator, std::vector::const_iterator>> lenIts; - for ( auto const & mit : memberIts ) + for ( auto mit = structData.second.members.begin(); mit != structData.second.members.end(); ++mit ) { - std::string lenName = ( mit->len.front() == "codeSize / 4" ) ? "codeSize" : mit->len.front(); - auto lenIt = findStructMemberIt( lenName, structData.second.members ); - assert( lenIt != mit ); - lenIts[lenIt].push_back( mit ); + if ( hasLen( *mit ) ) + { + std::string lenName = ( mit->len.front() == "codeSize / 4" ) ? "codeSize" : mit->len.front(); + auto lenIt = findStructMemberIt( lenName, structData.second.members ); + assert( lenIt != mit ); + lenIts[lenIt].push_back( mit ); + } } std::string arguments, initializers; @@ -9275,7 +9245,7 @@ std::string VulkanHppGenerator::generateStructConstructorsEnhanced( std::pairname + "( " + generateLenInitializer( mit, litit, structData.second.mutualExclusiveLens ) + " )"; sizeChecks += generateSizeCheck( litit->second, stripPrefix( structData.first, "Vk" ), structData.second.mutualExclusiveLens ); } - else if ( std::find( memberIts.begin(), memberIts.end(), mit ) != memberIts.end() ) + else if ( hasLen( *mit ) ) { assert( mit->name.starts_with( "p" ) ); std::string argumentName = startLowerCase( stripPrefix( mit->name, "p" ) ) + "_"; @@ -9409,7 +9379,8 @@ ${hashSum} }; ${leave})"; - auto [enter, leave] = generateProtection( structure.first, m_structureAliasesInverse.find( structure.first ) != m_structureAliasesInverse.end() ); + auto [enter, leave] = + generateProtection( m_structureAliasesInverse.find( structure.first ) == m_structureAliasesInverse.end() ? getProtectFromType( structure.first ) : "" ); std::string structureType = stripPrefix( structure.first, "Vk" ); std::string structureName = startLowerCase( structureType ); @@ -9535,7 +9506,8 @@ ${structs} std::string VulkanHppGenerator::generateStructure( std::pair const & structure ) const { - auto [enter, leave] = generateProtection( structure.first, m_structureAliasesInverse.find( structure.first ) != m_structureAliasesInverse.end() ); + auto [enter, leave] = + generateProtection( m_structureAliasesInverse.find( structure.first ) == m_structureAliasesInverse.end() ? getProtectFromType( structure.first ) : "" ); std::string str = "\n" + enter; @@ -9693,7 +9665,7 @@ std::string VulkanHppGenerator::generateStructExtendsStructs( std::vectorsecond.structExtends ) @@ -9710,8 +9682,8 @@ std::string VulkanHppGenerator::generateStructExtendsStructs( std::vectorfirst, m_structureAliasesInverse.find( itExtend->first ) != m_structureAliasesInverse.end() ); + auto [subEnter, subLeave] = generateProtection( + m_structureAliasesInverse.find( itExtend->first ) == m_structureAliasesInverse.end() ? getProtectFromType( itExtend->first ) : "" ); if ( enter != subEnter ) { @@ -10058,7 +10030,7 @@ std::string VulkanHppGenerator::generateThrowResultException() const { if ( value.name.starts_with( "VK_ERROR" ) ) { - auto [enter, leave] = generateProtection( value.extension, value.protect ); + auto [enter, leave] = generateProtection( getProtect( value ) ); std::string valueName = generateEnumValueName( enumIt->first, value.name, false, m_tags ); cases += enter + " case Result::" + valueName + ": throw " + stripPrefix( valueName, "eError" ) + "Error( message );\n" + leave; } @@ -10130,7 +10102,8 @@ std::string VulkanHppGenerator::generateTypenameCheck( std::vector const std::string VulkanHppGenerator::generateUnion( std::pair const & structure ) const { - auto [enter, leave] = generateProtection( structure.first, m_structureAliasesInverse.find( structure.first ) != m_structureAliasesInverse.end() ); + auto [enter, leave] = + generateProtection( m_structureAliasesInverse.find( structure.first ) == m_structureAliasesInverse.end() ? getProtectFromType( structure.first ) : "" ); std::string unionName = stripPrefix( structure.first, "Vk" ); bool firstMember = true; @@ -10261,7 +10234,7 @@ std::string VulkanHppGenerator::generateUniqueTypes( std::string const & parentT std::string type = stripPrefix( childType, "Vk" ); - auto [enter, leave] = generateProtection( handleIt->first, !handleIt->second.alias.empty() ); + auto [enter, leave] = generateProtection( handleIt->second.alias.empty() ? getProtectFromType( handleIt->first ) : "" ); std::string aliasHandle; if ( !handleIt->second.alias.empty() ) @@ -10451,6 +10424,35 @@ std::pair VulkanHppGenerator::getPoolTypeAndName( std: return std::make_pair( memberIt->type.type, memberIt->name ); } +std::string VulkanHppGenerator::getProtect( EnumValueData const & evd ) const +{ + assert( evd.protect.empty() || ( evd.protect == getProtectFromTitle( evd.extension ) ) ); + return evd.protect.empty() ? getProtectFromTitle( evd.extension ) : evd.protect; +} + +std::string VulkanHppGenerator::getProtectFromPlatform( std::string const & platform ) const +{ + auto platformIt = m_platforms.find( platform ); + return ( platformIt != m_platforms.end() ) ? platformIt->second.protect : ""; +} + +std::string VulkanHppGenerator::getProtectFromTitle( std::string const & title ) const +{ + if ( m_features.find( title ) == m_features.end() ) + { + auto extensionIt = m_extensions.find( title ); + return ( extensionIt != m_extensions.end() ) ? getProtectFromPlatform( extensionIt->second.platform ) : ""; + } + return ""; +} + +std::string VulkanHppGenerator::getProtectFromType( std::string const & type ) const +{ + auto typeIt = m_types.find( type ); + assert( typeIt != m_types.end() ); + return getProtectFromTitle( typeIt->second.referencedIn ); +} + std::string VulkanHppGenerator::getVectorSize( std::vector const & params, std::map const & vectorParams, size_t returnParam, @@ -10984,8 +10986,7 @@ void VulkanHppGenerator::readEnumsEnum( tinyxml2::XMLElement const * element, st } else { - checkAttributes( - line, attributes, { { "name", {} } }, { { "bitpos", {} }, { "comment", {} }, { "protect", { "VK_ENABLE_BETA_EXTENSIONS" } }, { "value", {} } } ); + checkAttributes( line, attributes, { { "name", {} } }, { { "bitpos", {} }, { "comment", {} }, { "value", {} } } ); checkElements( line, getChildElements( element ), {} ); std::string alias, bitpos, name, protect, value; @@ -10999,10 +11000,6 @@ void VulkanHppGenerator::readEnumsEnum( tinyxml2::XMLElement const * element, st { name = attribute.second; } - else if ( attribute.first == "protect" ) - { - protect = attribute.second; - } else if ( attribute.first == "value" ) { value = attribute.second; @@ -11921,7 +11918,7 @@ void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element, { "value", {} } } ); checkElements( line, getChildElements( element ), {} ); - std::string bitpos, name, extends, extnumber, offset, protect, value; + std::string bitpos, name, extends, offset, protect, value; for ( auto const & attribute : attributes ) { if ( attribute.first == "bitpos" ) @@ -13236,21 +13233,6 @@ void checkForWarning( bool condition, int line, std::string const & message ) } } -template -std::vector findAll( InputIt first, InputIt last, UnaryPredicate p ) -{ - std::vector result; - while ( first != last ) - { - if ( p( *first ) ) - { - result.push_back( first ); - } - ++first; - } - return result; -} - std::string findTag( std::set const & tags, std::string const & name, std::string const & postfix ) { auto tagIt = std::find_if( tags.begin(), tags.end(), [&name, &postfix]( std::string const & t ) { return name.ends_with( t + postfix ); } ); diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 734c608..8222b81 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -685,7 +685,7 @@ private: std::string generateDispatchLoaderStaticCommands( std::vector const & requireData, std::set & listedCommands, std::string const & title ) const; - std::string generateEnum( std::pair const & enumData ) const; + std::string generateEnum( std::pair const & enumData, std::string const & surroundingProtect ) const; std::string generateEnums() const; std::string generateEnums( std::vector const & requireData, std::set & listedEnums, std::string const & title ) const; std::string generateEnumsToString() const; @@ -718,8 +718,7 @@ private: bool vectorSizeCheck, bool raii ) const; std::string generateObjectDeleter( std::string const & commandName, CommandData const & commandData, size_t initialSkipCount, size_t returnParam ) const; - std::pair generateProtection( std::string const & referencedIn, std::string const & protect ) const; - std::pair generateProtection( std::string const & type, bool isAliased ) const; + std::pair generateProtection( std::string const & protect ) const; std::string generateRAIICommandDefinitions() const; std::string generateRAIICommandDefinitions( std::vector const & requireData, std::set & listedCommands, std::string const & title ) const; @@ -929,6 +928,10 @@ private: std::pair getParentTypeAndName( std::pair const & handle ) const; std::string getPlatform( std::string const & title ) const; std::pair getPoolTypeAndName( std::string const & type ) const; + std::string getProtect( EnumValueData const & evd ) const; + std::string getProtectFromPlatform( std::string const & platform ) const; + std::string getProtectFromTitle( std::string const & title ) const; + std::string getProtectFromType( std::string const & type ) const; std::string getVectorSize( std::vector const & params, std::map const & vectorParamIndices, size_t returnParam, diff --git a/vulkan/vulkan_enums.hpp b/vulkan/vulkan_enums.hpp index 99eef8d..fae22aa 100644 --- a/vulkan/vulkan_enums.hpp +++ b/vulkan/vulkan_enums.hpp @@ -3155,13 +3155,11 @@ namespace VULKAN_HPP_NAMESPACE enum class VideoCodecOperationFlagBitsKHR : VkVideoCodecOperationFlagsKHR { - eNone = VK_VIDEO_CODEC_OPERATION_NONE_KHR, -# if defined( VK_ENABLE_BETA_EXTENSIONS ) + eNone = VK_VIDEO_CODEC_OPERATION_NONE_KHR, eEncodeH264EXT = VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT, eEncodeH265EXT = VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT, eDecodeH264EXT = VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT, eDecodeH265EXT = VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ }; enum class VideoChromaSubsamplingFlagBitsKHR : VkVideoChromaSubsamplingFlagsKHR @@ -3194,11 +3192,9 @@ namespace VULKAN_HPP_NAMESPACE enum class VideoCodingControlFlagBitsKHR : VkVideoCodingControlFlagsKHR { - eReset = VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR, -# if defined( VK_ENABLE_BETA_EXTENSIONS ) + eReset = VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR, eEncodeRateControl = VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, eEncodeRateControlLayer = VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ }; enum class QueryResultStatusKHR @@ -4581,15 +4577,15 @@ namespace VULKAN_HPP_NAMESPACE VkFlags( ImageUsageFlagBits::eDepthStencilAttachment ) | VkFlags( ImageUsageFlagBits::eTransientAttachment ) | VkFlags( ImageUsageFlagBits::eInputAttachment ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( ImageUsageFlagBits::eVideoDecodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoDecodeSrcKHR ) | + | VkFlags( ImageUsageFlagBits::eVideoDecodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoDecodeSrcKHR ) | VkFlags( ImageUsageFlagBits::eVideoDecodeDpbKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( ImageUsageFlagBits::eFragmentDensityMapEXT ) | VkFlags( ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR ) + | VkFlags( ImageUsageFlagBits::eFragmentDensityMapEXT ) | VkFlags( ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( ImageUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoEncodeSrcKHR ) | + | VkFlags( ImageUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( ImageUsageFlagBits::eVideoEncodeSrcKHR ) | VkFlags( ImageUsageFlagBits::eVideoEncodeDpbKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( ImageUsageFlagBits::eAttachmentFeedbackLoopEXT ) | VkFlags( ImageUsageFlagBits::eInvocationMaskHUAWEI ) | + | VkFlags( ImageUsageFlagBits::eAttachmentFeedbackLoopEXT ) | VkFlags( ImageUsageFlagBits::eInvocationMaskHUAWEI ) | VkFlags( ImageUsageFlagBits::eSampleWeightQCOM ) | VkFlags( ImageUsageFlagBits::eSampleBlockMatchQCOM ) }; }; @@ -4721,9 +4717,9 @@ namespace VULKAN_HPP_NAMESPACE allFlags = VkFlags( QueueFlagBits::eGraphics ) | VkFlags( QueueFlagBits::eCompute ) | VkFlags( QueueFlagBits::eTransfer ) | VkFlags( QueueFlagBits::eSparseBinding ) | VkFlags( QueueFlagBits::eProtected ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( QueueFlagBits::eVideoDecodeKHR ) | VkFlags( QueueFlagBits::eVideoEncodeKHR ) + | VkFlags( QueueFlagBits::eVideoDecodeKHR ) | VkFlags( QueueFlagBits::eVideoEncodeKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( QueueFlagBits::eOpticalFlowNV ) + | VkFlags( QueueFlagBits::eOpticalFlowNV ) }; }; @@ -5073,7 +5069,7 @@ namespace VULKAN_HPP_NAMESPACE allFlags = VkFlags( QueryResultFlagBits::e64 ) | VkFlags( QueryResultFlagBits::eWait ) | VkFlags( QueryResultFlagBits::eWithAvailability ) | VkFlags( QueryResultFlagBits::ePartial ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( QueryResultFlagBits::eWithStatusKHR ) + | VkFlags( QueryResultFlagBits::eWithStatusKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ }; }; @@ -5144,15 +5140,15 @@ namespace VULKAN_HPP_NAMESPACE VkFlags( BufferUsageFlagBits::eIndexBuffer ) | VkFlags( BufferUsageFlagBits::eVertexBuffer ) | VkFlags( BufferUsageFlagBits::eIndirectBuffer ) | VkFlags( BufferUsageFlagBits::eShaderDeviceAddress ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( BufferUsageFlagBits::eVideoDecodeSrcKHR ) | VkFlags( BufferUsageFlagBits::eVideoDecodeDstKHR ) + | VkFlags( BufferUsageFlagBits::eVideoDecodeSrcKHR ) | VkFlags( BufferUsageFlagBits::eVideoDecodeDstKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( BufferUsageFlagBits::eTransformFeedbackBufferEXT ) | VkFlags( BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT ) | + | VkFlags( BufferUsageFlagBits::eTransformFeedbackBufferEXT ) | VkFlags( BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT ) | VkFlags( BufferUsageFlagBits::eConditionalRenderingEXT ) | VkFlags( BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR ) | VkFlags( BufferUsageFlagBits::eAccelerationStructureStorageKHR ) | VkFlags( BufferUsageFlagBits::eShaderBindingTableKHR ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( BufferUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( BufferUsageFlagBits::eVideoEncodeSrcKHR ) + | VkFlags( BufferUsageFlagBits::eVideoEncodeDstKHR ) | VkFlags( BufferUsageFlagBits::eVideoEncodeSrcKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags( BufferUsageFlagBits::eMicromapBuildInputReadOnlyEXT ) | VkFlags( BufferUsageFlagBits::eMicromapStorageEXT ) + | VkFlags( BufferUsageFlagBits::eMicromapBuildInputReadOnlyEXT ) | VkFlags( BufferUsageFlagBits::eMicromapStorageEXT ) }; }; @@ -6174,13 +6170,13 @@ namespace VULKAN_HPP_NAMESPACE VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D12Heap ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eD3D12Resource ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eDmaBufEXT ) #if defined( VK_USE_PLATFORM_ANDROID_KHR ) - | VkFlags( ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID ) + | VkFlags( ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID ) #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT ) + | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT ) | VkFlags( ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT ) #if defined( VK_USE_PLATFORM_FUCHSIA ) - | VkFlags( ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA ) + | VkFlags( ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA ) #endif /*VK_USE_PLATFORM_FUCHSIA*/ - | VkFlags( ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV ) + | VkFlags( ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV ) }; }; @@ -6396,7 +6392,7 @@ namespace VULKAN_HPP_NAMESPACE VkFlags( ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt ) | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence ) | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eSyncFd ) #if defined( VK_USE_PLATFORM_FUCHSIA ) - | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA ) + | VkFlags( ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA ) #endif /*VK_USE_PLATFORM_FUCHSIA*/ }; }; @@ -6663,9 +6659,9 @@ namespace VULKAN_HPP_NAMESPACE VkFlags64( PipelineStageFlagBits2::eClear ) | VkFlags64( PipelineStageFlagBits2::eIndexInput ) | VkFlags64( PipelineStageFlagBits2::eVertexAttributeInput ) | VkFlags64( PipelineStageFlagBits2::ePreRasterizationShaders ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags64( PipelineStageFlagBits2::eVideoDecodeKHR ) | VkFlags64( PipelineStageFlagBits2::eVideoEncodeKHR ) + | VkFlags64( PipelineStageFlagBits2::eVideoDecodeKHR ) | VkFlags64( PipelineStageFlagBits2::eVideoEncodeKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags64( PipelineStageFlagBits2::eTransformFeedbackEXT ) | VkFlags64( PipelineStageFlagBits2::eConditionalRenderingEXT ) | + | VkFlags64( PipelineStageFlagBits2::eTransformFeedbackEXT ) | VkFlags64( PipelineStageFlagBits2::eConditionalRenderingEXT ) | VkFlags64( PipelineStageFlagBits2::eCommandPreprocessNV ) | VkFlags64( PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR ) | VkFlags64( PipelineStageFlagBits2::eAccelerationStructureBuildKHR ) | VkFlags64( PipelineStageFlagBits2::eRayTracingShaderKHR ) | VkFlags64( PipelineStageFlagBits2::eFragmentDensityProcessEXT ) | VkFlags64( PipelineStageFlagBits2::eTaskShaderEXT ) | @@ -6841,14 +6837,14 @@ namespace VULKAN_HPP_NAMESPACE VkFlags64( FormatFeatureFlagBits2::eStorageReadWithoutFormat ) | VkFlags64( FormatFeatureFlagBits2::eStorageWriteWithoutFormat ) | VkFlags64( FormatFeatureFlagBits2::eSampledImageDepthComparison ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeOutputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeDpbKHR ) + | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeOutputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoDecodeDpbKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags64( FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR ) | VkFlags64( FormatFeatureFlagBits2::eFragmentDensityMapEXT ) | + | VkFlags64( FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR ) | VkFlags64( FormatFeatureFlagBits2::eFragmentDensityMapEXT ) | VkFlags64( FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeInputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeDpbKHR ) + | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeInputKHR ) | VkFlags64( FormatFeatureFlagBits2::eVideoEncodeDpbKHR ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ - | VkFlags64( FormatFeatureFlagBits2::eLinearColorAttachmentNV ) | VkFlags64( FormatFeatureFlagBits2::eWeightImageQCOM ) | + | VkFlags64( FormatFeatureFlagBits2::eLinearColorAttachmentNV ) | VkFlags64( FormatFeatureFlagBits2::eWeightImageQCOM ) | VkFlags64( FormatFeatureFlagBits2::eWeightSampledImageQCOM ) | VkFlags64( FormatFeatureFlagBits2::eBlockMatchingQCOM ) | VkFlags64( FormatFeatureFlagBits2::eBoxFilterSampledQCOM ) | VkFlags64( FormatFeatureFlagBits2::eOpticalFlowImageNV ) | VkFlags64( FormatFeatureFlagBits2::eOpticalFlowVectorNV ) | VkFlags64( FormatFeatureFlagBits2::eOpticalFlowCostNV ) @@ -7143,7 +7139,7 @@ namespace VULKAN_HPP_NAMESPACE { allFlags = VkFlags( VideoCodecOperationFlagBitsKHR::eNone ) # if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH265EXT ) | + | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eEncodeH265EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eDecodeH264EXT ) | VkFlags( VideoCodecOperationFlagBitsKHR::eDecodeH265EXT ) # endif /*VK_ENABLE_BETA_EXTENSIONS*/ }; @@ -7326,7 +7322,7 @@ namespace VULKAN_HPP_NAMESPACE { allFlags = VkFlags( VideoCodingControlFlagBitsKHR::eReset ) # if defined( VK_ENABLE_BETA_EXTENSIONS ) - | VkFlags( VideoCodingControlFlagBitsKHR::eEncodeRateControl ) | VkFlags( VideoCodingControlFlagBitsKHR::eEncodeRateControlLayer ) + | VkFlags( VideoCodingControlFlagBitsKHR::eEncodeRateControl ) | VkFlags( VideoCodingControlFlagBitsKHR::eEncodeRateControlLayer ) # endif /*VK_ENABLE_BETA_EXTENSIONS*/ }; };