diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 3637c9f..ddf80f8 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -58,8 +58,7 @@ std::string createSuccessCode( std::string const & code, std::set determineSkippedParams( size_t returnParamIndex, std::map const & vectorParamIndices ); bool determineStructureChaining( std::string const & structType, - std::set const & extendedStructs, - std::map const & structureAliases ); + std::set const & extendedStructs ); std::string extractTag( int line, std::string const & name, std::set const & tags ); std::string findTag( std::set const & tags, std::string const & name, std::string const & postfix = "" ); std::pair generateFunctionBodyStandardReturn( std::string const & returnType ); @@ -394,19 +393,9 @@ std::set determineSkippedParams( size_t returnParamIndex, std::map const & extendedStructs, - std::map const & structureAliases ) + std::set const & extendedStructs ) { - bool isStructureChained = ( extendedStructs.find( structType ) != extendedStructs.end() ); - if ( !isStructureChained ) - { - auto aliasIt = structureAliases.find( structType ); - if ( ( aliasIt != structureAliases.end() ) ) - { - isStructureChained = ( extendedStructs.find( aliasIt->second ) != extendedStructs.end() ); - } - } - return isStructureChained; + return ( extendedStructs.find( structType ) != extendedStructs.end() ); } std::string findTag( std::set const & tags, std::string const & name, std::string const & postfix ) @@ -1250,18 +1239,28 @@ void VulkanHppGenerator::appendCommand( std::string & str, if ( returnVectorParamIt == vectorParamIndices.end() ) { // the return parameter is not a vector - if ( ( commandData.returnType == "VkResult" ) && - !isChainableStructure( commandData.params[nonConstPointerParamIndices[0]].type.type ) ) + if ( isStructureChainAnchor( commandData.params[nonConstPointerParamIndices[0]].type.type ) ) { - if ( isHandleType( commandData.params[nonConstPointerParamIndices[0]].type.type ) ) + if ( commandData.returnType == "void" ) { - appendCommandGetHandle( str, name, commandData, nonConstPointerParamIndices[0], definition ); + appendCommandGetChain( str, name, commandData, nonConstPointerParamIndices[0], definition ); + appendedFunction = true; } - else + } + else + { + if ( commandData.returnType == "VkResult" ) { - appendCommandGetValue( str, name, commandData, nonConstPointerParamIndices[0], definition ); + if ( isHandleType( commandData.params[nonConstPointerParamIndices[0]].type.type ) ) + { + appendCommandGetHandle( str, name, commandData, nonConstPointerParamIndices[0], definition ); + } + else + { + appendCommandGetValue( str, name, commandData, nonConstPointerParamIndices[0], definition ); + } + appendedFunction = true; } - appendedFunction = true; } } else @@ -1309,7 +1308,7 @@ void VulkanHppGenerator::appendCommand( std::string & str, ( vectorParamIndexIt->first == *std::next( nonConstPointerParamIndices.begin() ) ) ); if ( ( commandData.returnType == "void" ) && !determineStructureChaining( - commandData.params[vectorParamIndexIt->first].type.type, m_extendedStructs, m_structureAliases ) ) + commandData.params[vectorParamIndexIt->first].type.type, m_extendedStructs ) ) { assert( commandData.params[vectorParamIndexIt->first].type.type != "void" ); appendCommandEnumerateVoid( str, name, commandData, *vectorParamIndexIt, definition ); @@ -1372,7 +1371,7 @@ void VulkanHppGenerator::appendCommand( std::string & str, size_t returnParamIndex = determineReturnParamIndex( commandData, vectorParamIndices, twoStep ); bool isStructureChain = ( returnParamIndex != INVALID_INDEX ) && - determineStructureChaining( commandData.params[returnParamIndex].type.type, m_extendedStructs, m_structureAliases ); + determineStructureChaining( commandData.params[returnParamIndex].type.type, m_extendedStructs ); std::string enhancedReturnType = determineEnhancedReturnType( commandData, returnParamIndex, @@ -1543,13 +1542,15 @@ ${commandEnhancedWithAllocators} functionTemplate, std::map( { { "commandEnhanced", - constructCommandEnumerateTwoVectors( name, commandData, vectorParamIndices, definition, false ) }, + constructCommandResultEnumerateTwoVectors( name, commandData, vectorParamIndices, definition, false ) }, { "commandEnhancedDeprecated", - constructCommandEnumerateTwoVectorsDeprecated( name, commandData, vectorParamIndices, definition, false ) }, + constructCommandResultEnumerateTwoVectorsDeprecated( + name, commandData, vectorParamIndices, definition, false ) }, { "commandEnhancedWithAllocators", - constructCommandEnumerateTwoVectors( name, commandData, vectorParamIndices, definition, true ) }, + constructCommandResultEnumerateTwoVectors( name, commandData, vectorParamIndices, definition, true ) }, { "commandEnhancedWithAllocatorsDeprecated", - constructCommandEnumerateTwoVectorsDeprecated( name, commandData, vectorParamIndices, definition, true ) }, + constructCommandResultEnumerateTwoVectorsDeprecated( + name, commandData, vectorParamIndices, definition, true ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "newlineOnDefinition", definition ? "\n" : "" } } ) ); } @@ -1577,13 +1578,42 @@ ${commandEnhancedWithAllocators} str += replaceWithMap( functionTemplate, std::map( - { { "commandEnhanced", constructCommandEnumerateVoid( name, commandData, vectorParamIndex, definition, false ) }, + { { "commandEnhanced", constructCommandVoidEnumerate( name, commandData, vectorParamIndex, definition, false ) }, { "commandEnhancedWithAllocators", - constructCommandEnumerateVoid( name, commandData, vectorParamIndex, definition, true ) }, + constructCommandVoidEnumerate( name, commandData, vectorParamIndex, definition, true ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "newlineOnDefinition", definition ? "\n" : "" } } ) ); } +void VulkanHppGenerator::appendCommandGetChain( std::string & str, + std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const +{ + std::string const functionTemplate = R"( +${enter}${commandStandard}${newlineOnDefinition} +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE +${commandEnhanced}${newlineOnDefinition} +${commandEnhancedChained} +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +${leave})"; + + std::string enter, leave; + std::tie( enter, leave ) = generateProtection( commandData.feature, commandData.extensions ); + + str += replaceWithMap( + functionTemplate, + std::map( + { { "commandEnhanced", constructCommandVoidGetValue( name, commandData, nonConstPointerIndex, definition ) }, + { "commandEnhancedChained", + constructCommandVoidGetChain( name, commandData, nonConstPointerIndex, definition ) }, + { "commandStandard", constructCommandStandard( name, commandData, definition ) }, + { "enter", enter }, + { "leave", leave }, + { "newlineOnDefinition", definition ? "\n" : "" } } ) ); +} + void VulkanHppGenerator::appendCommandGetHandle( std::string & str, std::string const & name, CommandData const & commandData, @@ -1606,9 +1636,9 @@ ${leave})"; str += replaceWithMap( functionTemplate, std::map( - { { "commandEnhanced", constructCommandGetValue( name, commandData, nonConstPointerIndex, definition ) }, + { { "commandEnhanced", constructCommandResultGetValue( name, commandData, nonConstPointerIndex, definition ) }, { "commandEnhancedUnique", - constructCommandGetHandleUnique( name, commandData, nonConstPointerIndex, definition ) }, + constructCommandResultGetHandleUnique( name, commandData, nonConstPointerIndex, definition ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, { "leave", leave }, @@ -1634,7 +1664,7 @@ ${leave})"; str += replaceWithMap( functionTemplate, std::map( - { { "commandEnhanced", constructCommandGetValue( name, commandData, nonConstPointerIndex, definition ) }, + { { "commandEnhanced", constructCommandResultGetValue( name, commandData, nonConstPointerIndex, definition ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, { "leave", leave }, @@ -1666,11 +1696,13 @@ ${leave})"; functionTemplate, std::map( { { "commandEnhanced", - constructCommandGetVector( name, commandData, vectorParamIndices, returnParamIndex, definition ) }, + constructCommandResultGetVector( name, commandData, vectorParamIndices, returnParamIndex, definition ) }, { "commandDeprecated", - constructCommandGetVectorDeprecated( name, commandData, vectorParamIndices, returnParamIndex, definition ) }, + constructCommandResultGetVectorDeprecated( + name, commandData, vectorParamIndices, returnParamIndex, definition ) }, { "commandEnhancedSingular", - constructCommandGetVectorSingular( name, commandData, vectorParamIndices, returnParamIndex, definition ) }, + constructCommandResultGetVectorSingular( + name, commandData, vectorParamIndices, returnParamIndex, definition ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, { "leave", leave }, @@ -1706,22 +1738,22 @@ ${leave})"; str += replaceWithMap( functionTemplate, std::map( { { "commandEnhanced", - constructCommandGetVectorOfHandles( + constructCommandResultGetVectorOfHandles( name, commandData, vectorParamIndices, returnParamIndex, definition, false ) }, { "commandEnhancedSingular", - constructCommandGetVectorOfHandlesSingular( + constructCommandResultGetVectorOfHandlesSingular( name, commandData, vectorParamIndices, returnParamIndex, definition ) }, { "commandEnhancedUnique", - constructCommandGetVectorOfUniqueHandles( + constructCommandResultGetVectorOfHandlesUnique( name, commandData, vectorParamIndices, returnParamIndex, definition, false ) }, { "commandEnhancedUniqueSingular", - constructCommandGetVectorOfUniqueHandlesSingular( + constructCommandResultGetVectorOfHandlesUniqueSingular( name, commandData, vectorParamIndices, returnParamIndex, definition ) }, { "commandEnhancedUniqueWithAllocators", - constructCommandGetVectorOfUniqueHandles( + constructCommandResultGetVectorOfHandlesUnique( name, commandData, vectorParamIndices, returnParamIndex, definition, true ) }, { "commandEnhancedWithAllocators", - constructCommandGetVectorOfHandles( + constructCommandResultGetVectorOfHandles( name, commandData, vectorParamIndices, returnParamIndex, definition, true ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, @@ -1756,16 +1788,16 @@ ${leave})"; str += replaceWithMap( functionTemplate, std::map( { { "commandEnhanced", - constructCommandGetVectorOfHandles( + constructCommandResultGetVectorOfHandles( name, commandData, vectorParamIndices, returnParamIndex, definition, false ) }, { "commandEnhancedUnique", - constructCommandGetVectorOfUniqueHandles( + constructCommandResultGetVectorOfHandlesUnique( name, commandData, vectorParamIndices, returnParamIndex, definition, false ) }, { "commandEnhancedUniqueWithAllocators", - constructCommandGetVectorOfUniqueHandles( + constructCommandResultGetVectorOfHandlesUnique( name, commandData, vectorParamIndices, returnParamIndex, definition, true ) }, { "commandEnhancedWithAllocators", - constructCommandGetVectorOfHandles( + constructCommandResultGetVectorOfHandles( name, commandData, vectorParamIndices, returnParamIndex, definition, true ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, @@ -1792,7 +1824,7 @@ ${leave})"; str += replaceWithMap( functionTemplate, std::map( - { { "commandEnhanced", constructCommandSimpleResult( name, commandData, definition, vectorParamIndices ) }, + { { "commandEnhanced", constructCommandResult( name, commandData, definition, vectorParamIndices ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, { "leave", leave }, @@ -1800,10 +1832,10 @@ ${leave})"; } void VulkanHppGenerator::appendCommandSimpleReturn( std::string & str, - std::string const & name, - CommandData const & commandData, - bool definition, - std::map const & vectorParamIndices ) const + std::string const & name, + CommandData const & commandData, + bool definition, + std::map const & vectorParamIndices ) const { const std::string functionTemplate = R"( ${enter}${commandStandard}${newlineOnDefinition} @@ -1818,7 +1850,7 @@ ${leave})"; str += replaceWithMap( functionTemplate, std::map( - { { "commandEnhanced", constructCommandSimple( name, commandData, definition, vectorParamIndices ) }, + { { "commandEnhanced", constructCommandType( name, commandData, definition, vectorParamIndices ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, { "leave", leave }, @@ -1844,8 +1876,8 @@ ${leave})"; str += replaceWithMap( functionTemplate, std::map( - { { "commandEnhanced", constructCommandSimpleVoid( name, commandData, definition, vectorParamIndices ) }, - { "commandStandard", constructCommandStandardVoid( name, commandData, definition ) }, + { { "commandEnhanced", constructCommandVoid( name, commandData, definition, vectorParamIndices ) }, + { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, { "leave", leave }, { "newlineOnDefinition", definition ? "\n" : "" } } ) ); @@ -1870,7 +1902,7 @@ ${leave} str += replaceWithMap( functionTemplate, std::map( - { { "commandEnhanced", constructCommandSimpleResult( name, commandData, definition, {} ) }, + { { "commandEnhanced", constructCommandResult( name, commandData, definition, {} ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, { "leave", leave } } ) ); @@ -1891,7 +1923,7 @@ ${commandStandard} str += replaceWithMap( functionTemplate, std::map( { - { "commandStandard", constructCommandStandardVoid( name, commandData, definition ) }, + { "commandStandard", constructCommandStandard( name, commandData, definition ) }, } ) ); } @@ -1916,7 +1948,7 @@ ${leave})"; str += replaceWithMap( functionTemplate, std::map( - { { "commandEnhanced", constructCommandTwoVectors( name, commandData, vectorParamIndices, definition ) }, + { { "commandEnhanced", constructCommandResultGetTwoVectors( name, commandData, vectorParamIndices, definition ) }, { "commandStandard", constructCommandStandard( name, commandData, definition ) }, { "enter", enter }, { "leave", leave }, @@ -2880,19 +2912,11 @@ void VulkanHppGenerator::appendFunctionHeaderArgumentEnhancedPointer( std::strin std::string const & strippedParameterName ) const { assert( ( param.type.postfix.back() == '*' ) && !param.optional ); - if ( param.type.type == "void" ) - { - // for void-pointer, just use type and name - str += param.type.compose() + " " + param.name; - } - else - { - assert( param.type.type != "char" ); - // for non-char-pointer, change to reference - assert( param.type.postfix == "*" ); - str += param.type.prefix + ( param.type.prefix.empty() ? "" : " " ) + stripPrefix( param.type.type, "Vk" ) + " & " + - strippedParameterName; - } + assert( param.type.type != "char" ); + // for non-char-pointer, change to reference + assert( param.type.postfix == "*" ); + str += param.type.prefix + ( param.type.prefix.empty() ? "" : " " ) + stripPrefix( param.type.type, "Vk" ) + " & " + + strippedParameterName; } void VulkanHppGenerator::appendFunctionHeaderArgumentEnhancedVector( std::string & str, @@ -3987,13 +4011,79 @@ std::string return arguments; } -std::string - VulkanHppGenerator::constructCommandEnumerateTwoVectors( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - bool definition, - bool withAllocators ) const +std::string VulkanHppGenerator::constructCommandResult( std::string const & name, + CommandData const & commandData, + bool definition, + std::map const & vectorParamIndices ) const { + assert( !commandData.handle.empty() && ( commandData.returnType == "VkResult" ) ); + + std::string str; + + std::set skippedParameters = { 0 }; + for ( auto const & vpi : vectorParamIndices ) + { + if ( vpi.second != INVALID_INDEX ) + { + skippedParameters.insert( vpi.second ); + } + } + + std::string argumentList = + constructArgumentListEnhanced( commandData.params, skippedParameters, INVALID_INDEX, definition, false ); + std::string commandName = determineCommandName( name, commandData.params[0].type.type ); + std::string nodiscard = constructNoDiscardEnhanced( commandData ); + std::string returnType = constructReturnType( commandData, "void" ); + + if ( definition ) + { + std::string const functionTemplate = + R"( template + ${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}::${commandName}( ${argumentList} ) const + { + Result result = static_cast( d.${vkCommand}( ${callArguments} ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}"${successCodeList} ); + })"; + + str = + replaceWithMap( functionTemplate, + std::map( + { { "argumentList", argumentList }, + { "callArguments", constructCallArgumentsVectors( commandData.params, vectorParamIndices ) }, + { "className", stripPrefix( commandData.handle, "Vk" ) }, + { "commandName", commandName }, + { "nodiscard", nodiscard }, + { "returnType", returnType }, + { "successCodeList", constructSuccessCodeList( commandData.successCodes ) }, + { "vkCommand", name } } ) ); + } + else + { + std::string const functionTemplate = + R"( template + ${nodiscard}${returnType} ${commandName}( ${argumentList} ) const;)"; + + str = replaceWithMap( functionTemplate, + std::map( { { "argumentList", argumentList }, + { "commandName", commandName }, + { "nodiscard", nodiscard }, + { "returnType", returnType } } ) ); + } + + return str; +} + +std::string + VulkanHppGenerator::constructCommandResultEnumerateTwoVectors( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + bool definition, + bool withAllocators ) const +{ + assert( !commandData.handle.empty() && ( commandData.returnType == "VkResult" ) ); + assert( ( commandData.successCodes.size() == 2 ) && ( commandData.successCodes[0] == "VK_SUCCESS" ) && + ( commandData.successCodes[1] == "VK_INCOMPLETE" ) ); + std::string str; auto firstVectorParamIt = vectorParamIndices.begin(); @@ -4103,7 +4193,7 @@ std::string return str; } -std::string VulkanHppGenerator::constructCommandEnumerateTwoVectorsDeprecated( +std::string VulkanHppGenerator::constructCommandResultEnumerateTwoVectorsDeprecated( std::string const & name, CommandData const & commandData, std::map const & vectorParamIndices, @@ -4179,91 +4269,12 @@ std::string VulkanHppGenerator::constructCommandEnumerateTwoVectorsDeprecated( return str; } -std::string VulkanHppGenerator::constructCommandEnumerateVoid( std::string const & name, - CommandData const & commandData, - std::pair const & vectorParamIndex, - bool definition, - bool withAllocators ) const +std::string VulkanHppGenerator::constructCommandResultGetHandleUnique( std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const { - assert( commandData.params[0].type.type == commandData.handle ); - - std::string str; - - std::string argumentList = constructArgumentListEnhanced( commandData.params, - { 0, vectorParamIndex.second, vectorParamIndex.first }, - INVALID_INDEX, - definition, - withAllocators ); - std::string commandName = determineCommandName( name, commandData.params[0].type.type ); - std::string vectorElementType = stripPrefix( commandData.params[vectorParamIndex.first].type.type, "Vk" ); - - if ( definition ) - { - const std::string functionTemplate = - R"( template - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<${vectorElementType}, ${vectorElementType}Allocator> ${className}::${commandName}( ${argumentList} ) const - { - std::vector<${vectorElementType}, ${vectorElementType}Allocator> ${vectorName}${vectorAllocator}; - ${counterType} ${counterName}; - d.${vkCommand}( ${firstCallArguments} ); - ${vectorName}.resize( ${counterName} ); - d.${vkCommand}( ${secondCallArguments} ); - VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); - return ${vectorName}; - })"; - - std::string vectorName = startLowerCase( stripPrefix( commandData.params[vectorParamIndex.first].name, "p" ) ); - std::string typenameCheck = ", typename B, typename std::enable_if::value, int>::type "; - - str = replaceWithMap( - functionTemplate, - std::map( - { { "argumentList", argumentList }, - { "className", stripPrefix( commandData.handle, "Vk" ) }, - { "commandName", commandName }, - { "counterName", startLowerCase( stripPrefix( commandData.params[vectorParamIndex.second].name, "p" ) ) }, - { "counterType", commandData.params[vectorParamIndex.second].type.type }, - { "firstCallArguments", - constructCallArgumentsEnumerateVectors( commandData.params, { vectorParamIndex }, true ) }, - { "secondCallArguments", - constructCallArgumentsEnumerateVectors( commandData.params, { vectorParamIndex }, false ) }, - { "typenameCheck", withAllocators ? typenameCheck : "" }, - { "vectorAllocator", - withAllocators - ? ( "( " + startLowerCase( stripPrefix( commandData.params[vectorParamIndex.first].type.type, "Vk" ) ) + - "Allocator )" ) - : "" }, - { "vectorElementType", vectorElementType }, - { "vectorName", vectorName }, - { "vkCommand", name } } ) ); - } - else - { - const std::string functionTemplate = - R"( template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${withAllocatorTypenameCheck}> - VULKAN_HPP_NODISCARD std::vector<${vectorElementType}, ${vectorElementType}Allocator> ${commandName}( ${argumentList} ) const;)"; - - std::string typenameCheck = ", typename B = " + vectorElementType + - "Allocator, typename std::enable_if::value, int>::type = 0"; - - str = replaceWithMap( - functionTemplate, - std::map( { { "argumentList", argumentList }, - { "commandName", commandName }, - { "vectorElementType", vectorElementType }, - { "withAllocatorTypenameCheck", withAllocators ? typenameCheck : "" } } ) ); - } - return str; -} - -std::string VulkanHppGenerator::constructCommandGetHandleUnique( std::string const & name, - CommandData const & commandData, - size_t nonConstPointerIndex, - bool definition ) const -{ - assert( commandData.successCodes.size() == 1 ); + assert( ( commandData.returnType == "VkResult" ) && ( commandData.successCodes.size() == 1 ) ); std::string str; @@ -4358,11 +4369,78 @@ std::string VulkanHppGenerator::constructCommandGetHandleUnique( std::string con return str; } -std::string VulkanHppGenerator::constructCommandGetValue( std::string const & name, - CommandData const & commandData, - size_t nonConstPointerIndex, - bool definition ) const +std::string + VulkanHppGenerator::constructCommandResultGetTwoVectors( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + bool definition ) const { + assert( !commandData.handle.empty() && ( commandData.returnType == "VkResult" ) ); + + std::string str; + + auto firstVectorParamIt = vectorParamIndices.begin(); + auto secondVectorParamIt = std::next( firstVectorParamIt ); + + assert( commandData.params[0].type.type == commandData.handle ); + assert( firstVectorParamIt->second == secondVectorParamIt->second ); + + std::set skippedParameters = { 0, firstVectorParamIt->second }; + + std::string argumentList = + constructArgumentListEnhanced( commandData.params, skippedParameters, INVALID_INDEX, definition, false ); + std::string commandName = determineCommandName( name, commandData.params[0].type.type ); + std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); + std::string noexceptString = vectorSizeCheck.first ? "VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS" : "VULKAN_HPP_NOEXCEPT"; + + if ( definition ) + { + const std::string functionTemplate = + R"( template + VULKAN_HPP_INLINE Result ${className}::${commandName}( ${argumentList} ) const ${noexcept} + {${vectorSizeCheck} + Result result = static_cast( d.${vkCommand}( ${callArguments} ) ); + return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}"${successCodeList} ); + })"; + + str = + replaceWithMap( functionTemplate, + std::map( + { { "argumentList", argumentList }, + { "callArguments", constructCallArgumentsVectors( commandData.params, vectorParamIndices ) }, + { "className", stripPrefix( commandData.handle, "Vk" ) }, + { "commandName", commandName }, + { "noexcept", noexceptString }, + { "successCodeList", constructSuccessCodeList( commandData.successCodes ) }, + { "vectorSizeCheck", + vectorSizeCheck.first + ? constructVectorSizeCheck( name, commandData, vectorSizeCheck.second, skippedParameters ) + : "" }, + { "vkCommand", name } } ) ); + } + else + { + const std::string functionTemplate = + R"( template + Result ${commandName}( ${argumentList} ) const ${noexcept};)"; + + str = replaceWithMap( functionTemplate, + std::map( { + { "argumentList", argumentList }, + { "commandName", commandName }, + { "noexcept", noexceptString }, + } ) ); + } + return str; +} + +std::string VulkanHppGenerator::constructCommandResultGetValue( std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const +{ + assert( commandData.returnType == "VkResult" ); + std::string str; std::set skippedParams{ nonConstPointerIndex }; @@ -4431,12 +4509,14 @@ std::string VulkanHppGenerator::constructCommandGetValue( std::string const & na return str; } -std::string VulkanHppGenerator::constructCommandGetVector( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition ) const +std::string VulkanHppGenerator::constructCommandResultGetVector( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition ) const { + assert( !commandData.handle.empty() && ( commandData.returnType == "VkResult" ) ); + std::string str; std::string argumentList = @@ -4489,12 +4569,14 @@ std::string VulkanHppGenerator::constructCommandGetVector( std::string const & } std::string - VulkanHppGenerator::constructCommandGetVectorDeprecated( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition ) const + VulkanHppGenerator::constructCommandResultGetVectorDeprecated( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition ) const { + assert( !commandData.handle.empty() && ( commandData.returnType == "VkResult" ) ); + std::string str; std::string argumentList = constructFunctionHeaderArgumentsEnhanced( @@ -4548,14 +4630,15 @@ std::string return str; } -std::string VulkanHppGenerator::constructCommandGetVectorOfHandles( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition, - bool withAllocator ) const +std::string + VulkanHppGenerator::constructCommandResultGetVectorOfHandles( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition, + bool withAllocator ) const { - assert( !commandData.handle.empty() ); + assert( !commandData.handle.empty() && ( commandData.returnType == "VkResult" ) ); std::string str; @@ -4628,12 +4711,12 @@ std::string VulkanHppGenerator::constructCommandGetVectorOfHandles( std::string return str; } -std::string - VulkanHppGenerator::constructCommandGetVectorOfHandlesSingular( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition ) const +std::string VulkanHppGenerator::constructCommandResultGetVectorOfHandlesSingular( + std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition ) const { assert( !commandData.handle.empty() ); assert( ( vectorParamIndices.size() == 2 ) && @@ -4700,15 +4783,15 @@ std::string return str; } -std::string - VulkanHppGenerator::constructCommandGetVectorOfUniqueHandles( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition, - bool withAllocator ) const +std::string VulkanHppGenerator::constructCommandResultGetVectorOfHandlesUnique( + std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition, + bool withAllocator ) const { - assert( !commandData.handle.empty() ); + assert( !commandData.handle.empty() && ( commandData.returnType == "VkResult" ) ); std::string str; @@ -4821,7 +4904,7 @@ std::string return str; } -std::string VulkanHppGenerator::constructCommandGetVectorOfUniqueHandlesSingular( +std::string VulkanHppGenerator::constructCommandResultGetVectorOfHandlesUniqueSingular( std::string const & name, CommandData const & commandData, std::map const & vectorParamIndices, @@ -4896,12 +4979,15 @@ std::string VulkanHppGenerator::constructCommandGetVectorOfUniqueHandlesSingular return str; } -std::string VulkanHppGenerator::constructCommandGetVectorSingular( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition ) const +std::string + VulkanHppGenerator::constructCommandResultGetVectorSingular( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition ) const { + assert( !commandData.handle.empty() && ( commandData.returnType == "VkResult" ) ); + std::string str; std::string argumentList = constructArgumentListEnhanced( @@ -4955,12 +5041,150 @@ std::string VulkanHppGenerator::constructCommandGetVectorSingular( std::string c return str; } -std::string VulkanHppGenerator::constructCommandSimple( std::string const & name, - CommandData const & commandData, - bool definition, - std::map const & vectorParamIndices ) const +std::string VulkanHppGenerator::constructCommandStandard( std::string const & name, + CommandData const & commandData, + bool definition ) const { - assert( commandData.successCodes.empty() && commandData.errorCodes.empty() ); + std::string str; + + std::set skippedParams; + if ( !commandData.handle.empty() ) + { + assert( commandData.params[0].type.type == commandData.handle ); + skippedParams.insert( 0 ); + } + + std::string argumentList = constructArgumentListStandard( commandData.params, skippedParams, definition ); + std::string commandName = determineCommandName( name, commandData.params[0].type.type ); + std::string nodiscard = constructNoDiscardStandard( commandData ); + std::string returnType = stripPrefix( commandData.returnType, "Vk" ); + + if ( definition ) + { + std::string className = stripPrefix( commandData.handle, "Vk" ); + if ( !className.empty() ) + { + className += "::"; + } + std::string functionBody = + "d." + name + "( " + constructCallArgumentsStandard( commandData.handle, commandData.params ) + " )"; + if ( beginsWith( commandData.returnType, "Vk" ) ) + { + functionBody = "return static_cast<" + returnType + ">( " + functionBody + " )"; + } + else if ( commandData.returnType != "void" ) + { + functionBody = "return " + functionBody; + } + + std::string const functionTemplate = + R"( template + ${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${commandName}( ${argumentList} )${const} VULKAN_HPP_NOEXCEPT + { + ${functionBody}; + })"; + + str = replaceWithMap( functionTemplate, + std::map( { { "argumentList", argumentList }, + { "className", className }, + { "commandName", commandName }, + { "const", commandData.handle.empty() ? "" : " const" }, + { "functionBody", functionBody }, + { "nodiscard", nodiscard }, + { "returnType", returnType } } ) ); + } + else + { + std::string const functionTemplate = + R"( template + ${nodiscard}${returnType} ${commandName}( ${argumentList} VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )${const} VULKAN_HPP_NOEXCEPT;)"; + + str = replaceWithMap( functionTemplate, + std::map( { { "argumentList", argumentList }, + { "commandName", commandName }, + { "const", commandData.handle.empty() ? "" : " const" }, + { "nodiscard", nodiscard }, + { "returnType", returnType } } ) ); + } + return str; +} + +std::string VulkanHppGenerator::constructCommandVoidGetChain( std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const +{ + assert( !commandData.handle.empty() && ( commandData.returnType == "void" ) && commandData.successCodes.empty() && + commandData.errorCodes.empty() ); + + std::string str; + + std::set skippedParams{ nonConstPointerIndex }; + if ( !commandData.handle.empty() ) + { + assert( commandData.params[0].type.type == commandData.handle ); + skippedParams.insert( 0 ); + } + + std::string argumentList = + constructArgumentListEnhanced( commandData.params, skippedParams, INVALID_INDEX, definition, false ); + std::string commandName = determineCommandName( name, commandData.params[0].type.type ); + std::string nodiscard = constructNoDiscardEnhanced( commandData ); + assert( beginsWith( commandData.params[nonConstPointerIndex].type.type, "Vk" ) ); + std::string returnType = + "VULKAN_HPP_NAMESPACE::" + stripPrefix( commandData.params[nonConstPointerIndex].type.type, "Vk" ); + + if ( definition ) + { + std::string const functionTemplate = + R"( template + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain ${className}${commandName}( ${argumentList} ) const VULKAN_HPP_NOEXCEPT + { + StructureChain structureChain; + ${returnType} & ${returnVariable} = structureChain.template get<${returnType}>(); + d.${vkCommand}( ${callArguments} ); + return structureChain; + })"; + + std::string className = stripPrefix( commandData.handle, "Vk" ); + if ( !className.empty() ) + { + className += "::"; + } + + str = replaceWithMap( + functionTemplate, + std::map( + { { "argumentList", argumentList }, + { "callArguments", + constructCallArgumentsGetValue( commandData.handle, commandData.params, nonConstPointerIndex ) }, + { "className", className }, + { "commandName", commandName }, + { "returnVariable", startLowerCase( stripPrefix( commandData.params[nonConstPointerIndex].name, "p" ) ) }, + { "returnType", returnType }, + { "vkCommand", name } } ) ); + } + else + { + std::string const functionTemplate = + R"( template + VULKAN_HPP_NODISCARD StructureChain ${commandName}( ${argumentList} ) const VULKAN_HPP_NOEXCEPT;)"; + + str = replaceWithMap( + functionTemplate, + std::map( { { "argumentList", argumentList }, { "commandName", commandName } } ) ); + } + + return str; +} + +std::string VulkanHppGenerator::constructCommandType( std::string const & name, + CommandData const & commandData, + bool definition, + std::map const & vectorParamIndices ) const +{ + assert( !commandData.handle.empty() && ( commandData.returnType != "VkResult" ) && + ( commandData.returnType != "void" ) && commandData.successCodes.empty() && commandData.errorCodes.empty() ); std::string str; @@ -5015,72 +5239,14 @@ std::string VulkanHppGenerator::constructCommandSimple( std::string const & return str; } -std::string - VulkanHppGenerator::constructCommandSimpleResult( std::string const & name, - CommandData const & commandData, - bool definition, - std::map const & vectorParamIndices ) const +std::string VulkanHppGenerator::constructCommandVoid( std::string const & name, + CommandData const & commandData, + bool definition, + std::map const & vectorParamIndices ) const { - std::string str; + assert( !commandData.handle.empty() && ( commandData.returnType == "void" ) && commandData.successCodes.empty() && + commandData.errorCodes.empty() ); - std::set skippedParameters = { 0 }; - for ( auto const & vpi : vectorParamIndices ) - { - if ( vpi.second != INVALID_INDEX ) - { - skippedParameters.insert( vpi.second ); - } - } - - std::string argumentList = - constructArgumentListEnhanced( commandData.params, skippedParameters, INVALID_INDEX, definition, false ); - std::string commandName = determineCommandName( name, commandData.params[0].type.type ); - std::string nodiscard = constructNoDiscardEnhanced( commandData ); - std::string returnType = constructReturnType( commandData, "void" ); - - if ( definition ) - { - std::string const functionTemplate = - R"( template - ${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}::${commandName}( ${argumentList} ) const - { - Result result = static_cast( d.${vkCommand}( ${callArguments} ) ); - return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}"${successCodeList} ); - })"; - - str = - replaceWithMap( functionTemplate, - std::map( - { { "argumentList", argumentList }, - { "callArguments", constructCallArgumentsVectors( commandData.params, vectorParamIndices ) }, - { "className", stripPrefix( commandData.handle, "Vk" ) }, - { "commandName", commandName }, - { "nodiscard", nodiscard }, - { "returnType", returnType }, - { "successCodeList", constructSuccessCodeList( commandData.successCodes ) }, - { "vkCommand", name } } ) ); - } - else - { - std::string const functionTemplate = - R"( template - ${nodiscard}${returnType} ${commandName}( ${argumentList} ) const;)"; - - str = replaceWithMap( functionTemplate, - std::map( { { "argumentList", argumentList }, - { "commandName", commandName }, - { "nodiscard", nodiscard }, - { "returnType", returnType } } ) ); - } - - return str; -} - -std::string VulkanHppGenerator::constructCommandSimpleVoid( std::string const & name, - CommandData const & commandData, - bool definition, - std::map const & vectorParamIndices ) const -{ std::string str; std::set skippedParameters = { 0 }; @@ -5097,8 +5263,8 @@ std::string VulkanHppGenerator::constructCommandSimpleVoid( std::string const & std::string commandName = determineCommandName( name, commandData.params[0].type.type ); std::string typenameT = ( ( vectorParamIndices.size() == 1 ) && ( commandData.params[vectorParamIndices.begin()->first].type.type == "void" ) ) - ? "typename T, " - : ""; + ? "typename T, " + : ""; std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); std::string noexceptString = vectorSizeCheck.first ? "VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS" : "VULKAN_HPP_NOEXCEPT"; @@ -5142,175 +5308,141 @@ std::string VulkanHppGenerator::constructCommandSimpleVoid( std::string const & return str; } -std::string VulkanHppGenerator::constructCommandStandard( std::string const & name, - CommandData const & commandData, - bool definition ) const +std::string VulkanHppGenerator::constructCommandVoidEnumerate( std::string const & name, + CommandData const & commandData, + std::pair const & vectorParamIndex, + bool definition, + bool withAllocators ) const { + assert( !commandData.handle.empty() && commandData.params[0].type.type == commandData.handle && + ( commandData.returnType == "void" ) && commandData.successCodes.empty() && commandData.errorCodes.empty() ); + std::string str; - std::set skippedParams; - if ( !commandData.handle.empty() ) - { - assert( commandData.params[0].type.type == commandData.handle ); - skippedParams.insert( 0 ); - } - - std::string argumentList = constructArgumentListStandard( commandData.params, skippedParams, definition ); - std::string commandName = determineCommandName( name, commandData.params[0].type.type ); - std::string nodiscard = constructNoDiscardStandard( commandData ); - std::string returnType = stripPrefix( commandData.returnType, "Vk" ); + std::string argumentList = constructArgumentListEnhanced( commandData.params, + { 0, vectorParamIndex.second, vectorParamIndex.first }, + INVALID_INDEX, + definition, + withAllocators ); + std::string commandName = determineCommandName( name, commandData.params[0].type.type ); + std::string vectorElementType = stripPrefix( commandData.params[vectorParamIndex.first].type.type, "Vk" ); if ( definition ) { - std::string className = stripPrefix( commandData.handle, "Vk" ); - if ( !className.empty() ) - { - className += "::"; - } - std::string functionBody = - "d." + name + "( " + constructCallArgumentsStandard( commandData.handle, commandData.params ) + " )"; - if ( beginsWith(commandData.returnType, "Vk")) - { - functionBody = "return static_cast<" + returnType + ">( " + functionBody + " )"; - } - else if ( commandData.returnType != "void" ) - { - functionBody = "return " + functionBody; - } - - std::string const functionTemplate = - R"( template - ${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${commandName}( ${argumentList} )${const} VULKAN_HPP_NOEXCEPT + const std::string functionTemplate = + R"( template + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<${vectorElementType}, ${vectorElementType}Allocator> ${className}::${commandName}( ${argumentList} ) const { - ${functionBody}; + std::vector<${vectorElementType}, ${vectorElementType}Allocator> ${vectorName}${vectorAllocator}; + ${counterType} ${counterName}; + d.${vkCommand}( ${firstCallArguments} ); + ${vectorName}.resize( ${counterName} ); + d.${vkCommand}( ${secondCallArguments} ); + VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); + return ${vectorName}; })"; - str = replaceWithMap( functionTemplate, - std::map( { { "argumentList", argumentList }, - { "className", className }, - { "commandName", commandName }, - { "const", commandData.handle.empty() ? "" : " const" }, - { "functionBody", functionBody }, - { "nodiscard", nodiscard }, - { "returnType", returnType } } ) ); - } - else - { - std::string const functionTemplate = - R"( template - ${nodiscard}${returnType} ${commandName}( ${argumentList} VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )${const} VULKAN_HPP_NOEXCEPT;)"; - - str = replaceWithMap( functionTemplate, - std::map( { { "argumentList", argumentList }, - { "commandName", commandName }, - { "const", commandData.handle.empty() ? "" : " const" }, - { "nodiscard", nodiscard }, - { "returnType", returnType } } ) ); - } - return str; -} - -std::string VulkanHppGenerator::constructCommandStandardVoid( std::string const & name, - CommandData const & commandData, - bool definition ) const -{ - std::string str; - - std::string argumentList = constructArgumentListStandard( commandData.params, { 0 }, definition ); - std::string commandName = determineCommandName( name, commandData.params[0].type.type ); - - if ( definition ) - { - std::string const functionTemplate = - R"( template - VULKAN_HPP_INLINE void ${className}::${commandName}( ${argumentList} ) const VULKAN_HPP_NOEXCEPT - { - d.${vkCommand}( ${callArguments} ); - })"; - - str = - replaceWithMap( functionTemplate, - std::map( { - { "argumentList", argumentList }, - { "callArguments", constructCallArgumentsStandard( commandData.handle, commandData.params ) }, - { "className", stripPrefix( commandData.handle, "Vk" ) }, - { "commandName", commandName }, - { "vkCommand", name }, - } ) ); - } - else - { - std::string const functionTemplate = - R"( template - void ${commandName}( ${argumentList} VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;)"; + std::string vectorName = startLowerCase( stripPrefix( commandData.params[vectorParamIndex.first].name, "p" ) ); + std::string typenameCheck = ", typename B, typename std::enable_if::value, int>::type "; str = replaceWithMap( functionTemplate, - std::map( { { "argumentList", argumentList }, { "commandName", commandName } } ) ); + std::map( + { { "argumentList", argumentList }, + { "className", stripPrefix( commandData.handle, "Vk" ) }, + { "commandName", commandName }, + { "counterName", startLowerCase( stripPrefix( commandData.params[vectorParamIndex.second].name, "p" ) ) }, + { "counterType", commandData.params[vectorParamIndex.second].type.type }, + { "firstCallArguments", + constructCallArgumentsEnumerateVectors( commandData.params, { vectorParamIndex }, true ) }, + { "secondCallArguments", + constructCallArgumentsEnumerateVectors( commandData.params, { vectorParamIndex }, false ) }, + { "typenameCheck", withAllocators ? typenameCheck : "" }, + { "vectorAllocator", + withAllocators + ? ( "( " + startLowerCase( stripPrefix( commandData.params[vectorParamIndex.first].type.type, "Vk" ) ) + + "Allocator )" ) + : "" }, + { "vectorElementType", vectorElementType }, + { "vectorName", vectorName }, + { "vkCommand", name } } ) ); + } + else + { + const std::string functionTemplate = + R"( template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${withAllocatorTypenameCheck}> + VULKAN_HPP_NODISCARD std::vector<${vectorElementType}, ${vectorElementType}Allocator> ${commandName}( ${argumentList} ) const;)"; + + std::string typenameCheck = ", typename B = " + vectorElementType + + "Allocator, typename std::enable_if::value, int>::type = 0"; + + str = replaceWithMap( + functionTemplate, + std::map( { { "argumentList", argumentList }, + { "commandName", commandName }, + { "vectorElementType", vectorElementType }, + { "withAllocatorTypenameCheck", withAllocators ? typenameCheck : "" } } ) ); } return str; } -std::string VulkanHppGenerator::constructCommandTwoVectors( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - bool definition ) const +std::string VulkanHppGenerator::constructCommandVoidGetValue( std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const { assert( !commandData.handle.empty() ); + assert( ( commandData.returnType == "void" ) && commandData.successCodes.empty() && commandData.errorCodes.empty() ); + std::string str; - auto firstVectorParamIt = vectorParamIndices.begin(); - auto secondVectorParamIt = std::next( firstVectorParamIt ); - - assert( commandData.params[0].type.type == commandData.handle ); - assert( firstVectorParamIt->second == secondVectorParamIt->second ); - - std::set skippedParameters = { 0, firstVectorParamIt->second }; + std::set skippedParameters = { 0, nonConstPointerIndex }; std::string argumentList = constructArgumentListEnhanced( commandData.params, skippedParameters, INVALID_INDEX, definition, false ); std::string commandName = determineCommandName( name, commandData.params[0].type.type ); - std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); - std::string noexceptString = vectorSizeCheck.first ? "VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS" : "VULKAN_HPP_NOEXCEPT"; + std::string nodiscard = constructNoDiscardEnhanced( commandData ); + assert( beginsWith( commandData.params[nonConstPointerIndex].type.type, "Vk" ) ); + std::string returnType = + "VULKAN_HPP_NAMESPACE::" + stripPrefix( commandData.params[nonConstPointerIndex].type.type, "Vk" ); if ( definition ) { - const std::string functionTemplate = + std::string const functionTemplate = R"( template - VULKAN_HPP_INLINE Result ${className}::${commandName}( ${argumentList} ) const ${noexcept} - {${vectorSizeCheck} - Result result = static_cast( d.${vkCommand}( ${callArguments} ) ); - return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}"${successCodeList} ); + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ${returnType} ${className}::${commandName}( ${argumentList} ) const VULKAN_HPP_NOEXCEPT + { + ${returnType} ${returnVariable}; + d.${vkCommand}( ${callArguments} ); + return ${returnVariable}; })"; - str = - replaceWithMap( functionTemplate, - std::map( - { { "argumentList", argumentList }, - { "callArguments", constructCallArgumentsVectors( commandData.params, vectorParamIndices ) }, - { "className", stripPrefix( commandData.handle, "Vk" ) }, - { "commandName", commandName }, - { "noexcept", noexceptString }, - { "successCodeList", constructSuccessCodeList( commandData.successCodes ) }, - { "vectorSizeCheck", - vectorSizeCheck.first - ? constructVectorSizeCheck( name, commandData, vectorSizeCheck.second, skippedParameters ) - : "" }, - { "vkCommand", name } } ) ); + str = replaceWithMap( + functionTemplate, + std::map( + { { "argumentList", argumentList }, + { "callArguments", + constructCallArgumentsGetValue( commandData.handle, commandData.params, nonConstPointerIndex ) }, + { "className", stripPrefix( commandData.handle, "Vk" ) }, + { "commandName", commandName }, + { "returnType", returnType }, + { "returnVariable", startLowerCase( stripPrefix( commandData.params[nonConstPointerIndex].name, "p" ) ) }, + { "vkCommand", name } } ) ); } else { - const std::string functionTemplate = + std::string const functionTemplate = R"( template - Result ${commandName}( ${argumentList} ) const ${noexcept};)"; + VULKAN_HPP_NODISCARD ${returnType} ${commandName}( ${argumentList} ) const VULKAN_HPP_NOEXCEPT;)"; - str = replaceWithMap( functionTemplate, - std::map( { - { "argumentList", argumentList }, - { "commandName", commandName }, - { "noexcept", noexceptString }, - } ) ); + str = replaceWithMap( + functionTemplate, + std::map( + { { "argumentList", argumentList }, { "commandName", commandName }, { "returnType", returnType } } ) ); } + return str; } @@ -7380,26 +7512,6 @@ std::string VulkanHppGenerator::getVectorSize( std::vector const & } } -bool VulkanHppGenerator::isChainableStructure( std::string const & type ) const -{ - if ( beginsWith( type, "Vk" ) ) - { - auto it = m_structures.find( type ); - if ( it == m_structures.end() ) - { - it = std::find_if( - m_structures.begin(), m_structures.end(), [&type]( std::pair const & sd ) { - return sd.second.aliases.find( type ) != sd.second.aliases.end(); - } ); - } - if ( it != m_structures.end() ) - { - return ( 1 < it->second.members.size() ) && ( it->second.members[1].name == "pNext" ); - } - } - return false; -} - bool VulkanHppGenerator::isHandleType( std::string const & type ) const { if ( beginsWith( type, "Vk" ) ) @@ -7471,6 +7583,26 @@ bool VulkanHppGenerator::isParamIndirect( std::string const & name, ParamData co return false; } +bool VulkanHppGenerator::isStructureChainAnchor( std::string const & type ) const +{ + if ( beginsWith( type, "Vk" ) ) + { + auto it = m_structures.find( type ); + if ( it == m_structures.end() ) + { + it = std::find_if( + m_structures.begin(), m_structures.end(), [&type]( std::pair const & sd ) { + return sd.second.aliases.find( type ) != sd.second.aliases.end(); + } ); + } + if ( it != m_structures.end() ) + { + return m_extendedStructs.find( it->first ) != m_extendedStructs.end(); + } + } + return false; +} + bool VulkanHppGenerator::isTwoStepAlgorithm( std::vector const & params ) const { // we generate a two-step algorithm for functions returning a vector of stuff, where the length is specified as a diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 8367b29..5019a1f 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -323,6 +323,11 @@ private: CommandData const & commandData, std::pair const & vectorParamIndex, bool definition ) const; + void appendCommandGetChain( std::string & str, + std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const; void appendCommandGetHandle( std::string & str, std::string const & name, CommandData const & commandData, @@ -543,86 +548,93 @@ private: std::string constructCallArgumentsStandard( std::string const & handle, std::vector const & params ) const; std::string constructCallArgumentsVectors( std::vector const & params, std::map const & vectorParamIndices ) const; - std::string constructCommandEnumerateTwoVectors( std::string const & name, + std::string constructCommandResult( std::string const & name, + CommandData const & commandData, + bool definition, + std::map const & vectorParamIndices ) const; + std::string constructCommandResultEnumerateTwoVectors( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + bool definition, + bool withAllocators ) const; + std::string constructCommandResultEnumerateTwoVectorsDeprecated( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + bool definition, + bool withAllocators ) const; + std::string constructCommandResultGetHandleUnique( std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const; + std::string constructCommandResultGetTwoVectors( std::string const & name, CommandData const & commandData, std::map const & vectorParamIndices, - bool definition, - bool withAllocators ) const; - std::string constructCommandEnumerateTwoVectorsDeprecated( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - bool definition, - bool withAllocators ) const; - std::string constructCommandEnumerateVoid( std::string const & name, - CommandData const & commandData, - std::pair const & vectorParamIndex, - bool definition, - bool withAllocators ) const; - std::string constructCommandGetHandleUnique( std::string const & name, - CommandData const & commandData, - size_t nonConstPointerIndex, - bool definition ) const; - std::string constructCommandGetValue( std::string const & name, - CommandData const & commandData, - size_t nonConstPointerIndex, - bool definition ) const; - std::string constructCommandGetVector( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition ) const; - std::string constructCommandGetVectorDeprecated( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, bool definition ) const; - std::string constructCommandGetVectorOfHandles( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition, - bool withAllocator ) const; - std::string constructCommandGetVectorOfHandlesSingular( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition ) const; - std::string constructCommandGetVectorOfUniqueHandles( std::string const & name, + std::string constructCommandResultGetValue( std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const; + std::string constructCommandResultGetVector( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition ) const; + std::string constructCommandResultGetVectorDeprecated( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition ) const; + std::string constructCommandResultGetVectorOfHandles( std::string const & name, CommandData const & commandData, std::map const & vectorParamIndices, size_t returnParamIndex, bool definition, bool withAllocator ) const; - std::string constructCommandGetVectorOfUniqueHandlesSingular( std::string const & name, + std::string constructCommandResultGetVectorOfHandlesSingular( std::string const & name, CommandData const & commandData, std::map const & vectorParamIndices, size_t returnParamIndex, bool definition ) const; - std::string constructCommandGetVectorSingular( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - size_t returnParamIndex, - bool definition ) const; - std::string constructCommandSimple( std::string const & name, - CommandData const & commandData, - bool definition, - std::map const & vectorParamIndices ) const; - std::string constructCommandSimpleResult( std::string const & name, - CommandData const & commandData, - bool definition, - std::map const & vectorParamIndices ) const; - std::string constructCommandSimpleVoid( std::string const & name, - CommandData const & commandData, - bool definition, - std::map const & vectorParamIndices ) const; + std::string constructCommandResultGetVectorOfHandlesUnique( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition, + bool withAllocator ) const; + std::string + constructCommandResultGetVectorOfHandlesUniqueSingular( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition ) const; + std::string constructCommandResultGetVectorSingular( std::string const & name, + CommandData const & commandData, + std::map const & vectorParamIndices, + size_t returnParamIndex, + bool definition ) const; std::string constructCommandStandard( std::string const & name, CommandData const & commandData, bool definition ) const; - std::string - constructCommandStandardVoid( std::string const & name, CommandData const & commandData, bool definition ) const; - std::string constructCommandTwoVectors( std::string const & name, - CommandData const & commandData, - std::map const & vectorParamIndices, - bool definition ) const; + std::string constructCommandType( std::string const & name, + CommandData const & commandData, + bool definition, + std::map const & vectorParamIndices ) const; + std::string constructCommandVoid( std::string const & name, + CommandData const & commandData, + bool definition, + std::map const & vectorParamIndices ) const; + std::string constructCommandVoidEnumerate( std::string const & name, + CommandData const & commandData, + std::pair const & vectorParamIndex, + bool definition, + bool withAllocators ) const; + std::string constructCommandVoidGetChain( std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const; + std::string constructCommandVoidGetValue( std::string const & name, + CommandData const & commandData, + size_t nonConstPointerIndex, + bool definition ) const; std::string constructConstexprString( std::pair const & structData ) const; std::string constructFunctionBodyEnhanced( std::string const & indentation, std::string const & name, @@ -697,11 +709,11 @@ private: std::string getVectorSize( std::vector const & params, std::map const & vectorParamIndices, size_t returnParamIndex ) const; - bool isChainableStructure( std::string const & type ) const; bool isHandleType( std::string const & type ) const; bool isParam( std::string const & name, std::vector const & params ) const; bool isParamIndirect( std::string const & name, std::vector const & params ) const; bool isParamIndirect( std::string const & name, ParamData const & param ) const; + bool isStructureChainAnchor( std::string const & type ) const; bool isTwoStepAlgorithm( std::vector const & params ) const; bool needsComplexBody( CommandData const & commandData ) const; std::pair>> diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 312f445..b4fbe9c 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -54248,11 +54248,11 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::MemoryRequirements2 getAccelerationStructureMemoryRequirementsKHR( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getAccelerationStructureMemoryRequirementsKHR( const AccelerationStructureMemoryRequirementsInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getAccelerationStructureMemoryRequirementsKHR( + VULKAN_HPP_NODISCARD StructureChain getAccelerationStructureMemoryRequirementsKHR( const AccelerationStructureMemoryRequirementsInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -54265,11 +54265,11 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getAccelerationStructureMemoryRequirementsNV( + VULKAN_HPP_NODISCARD StructureChain getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -54345,11 +54345,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getBufferMemoryRequirements2( + VULKAN_HPP_NODISCARD StructureChain getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -54361,11 +54361,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2KHR( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getBufferMemoryRequirements2KHR( + VULKAN_HPP_NODISCARD StructureChain getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -54442,11 +54442,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getDescriptorSetLayoutSupport( + VULKAN_HPP_NODISCARD StructureChain getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -54458,11 +54458,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupportKHR( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getDescriptorSetLayoutSupportKHR( + VULKAN_HPP_NODISCARD StructureChain getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -54674,17 +54674,17 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::MemoryRequirements2 getGeneratedCommandsMemoryRequirementsNV( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getGeneratedCommandsMemoryRequirementsNV( const GeneratedCommandsMemoryRequirementsInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getGeneratedCommandsMemoryRequirementsNV( + VULKAN_HPP_NODISCARD StructureChain getGeneratedCommandsMemoryRequirementsNV( const GeneratedCommandsMemoryRequirementsInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template - Result getImageDrmFormatModifierPropertiesEXT( + VULKAN_HPP_NODISCARD Result getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; @@ -54714,11 +54714,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getImageMemoryRequirements2( + VULKAN_HPP_NODISCARD StructureChain getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -54730,11 +54730,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2KHR( + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain getImageMemoryRequirements2KHR( + VULKAN_HPP_NODISCARD StructureChain getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -60953,11 +60953,11 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 - getFeatures2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 + getFeatures2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain - getFeatures2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD StructureChain + getFeatures2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -60965,11 +60965,11 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 - getFeatures2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 + getFeatures2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain - getFeatures2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD StructureChain + getFeatures2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -60989,13 +60989,13 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::FormatProperties2 - getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 + getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, + Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain - getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD StructureChain + getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, + Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -61005,13 +61005,13 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::FormatProperties2 - getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 + getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, + Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain - getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, - Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD StructureChain + getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, + Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -61080,11 +61080,11 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - getMemoryProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 + getMemoryProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain - getMemoryProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD StructureChain + getMemoryProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -61093,11 +61093,11 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - getMemoryProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 + getMemoryProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain - getMemoryProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD StructureChain + getMemoryProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -61147,11 +61147,11 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 - getProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 + getProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain - getProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD StructureChain + getProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -61159,11 +61159,11 @@ namespace VULKAN_HPP_NAMESPACE Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 - getProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 + getProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template - StructureChain - getProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; + VULKAN_HPP_NODISCARD StructureChain + getProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template @@ -97338,10 +97338,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } + # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getAccelerationStructureMemoryRequirementsKHR( const AccelerationStructureMemoryRequirementsInfoKHR & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 + Device::getAccelerationStructureMemoryRequirementsKHR( const AccelerationStructureMemoryRequirementsInfoKHR & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; @@ -97351,9 +97352,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template - VULKAN_HPP_INLINE StructureChain - Device::getAccelerationStructureMemoryRequirementsKHR( const AccelerationStructureMemoryRequirementsInfoKHR & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getAccelerationStructureMemoryRequirementsKHR( const AccelerationStructureMemoryRequirementsInfoKHR & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -97379,10 +97381,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR - Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR + Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR memoryRequirements; @@ -97392,9 +97395,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template - VULKAN_HPP_INLINE StructureChain - Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -97528,10 +97532,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 + Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; @@ -97540,9 +97545,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template - VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -97565,10 +97571,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 + Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; @@ -97577,9 +97584,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template - VULKAN_HPP_INLINE StructureChain - Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -97721,10 +97729,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pCreateInfo ), reinterpret_cast( pSupport ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport + Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; @@ -97733,9 +97742,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &support ) ); return support; } + template - VULKAN_HPP_INLINE StructureChain - Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -97758,10 +97768,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pCreateInfo ), reinterpret_cast( pSupport ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport - Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport + Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; @@ -97770,9 +97781,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &support ) ); return support; } + template - VULKAN_HPP_INLINE StructureChain - Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -97881,6 +97893,7 @@ namespace VULKAN_HPP_NAMESPACE return static_cast( d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast( pDeviceGroupPresentCapabilities ) ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -98161,10 +98174,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getGeneratedCommandsMemoryRequirementsNV( const GeneratedCommandsMemoryRequirementsInfoNV & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 + Device::getGeneratedCommandsMemoryRequirementsNV( const GeneratedCommandsMemoryRequirementsInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; @@ -98174,9 +98188,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template - VULKAN_HPP_INLINE StructureChain - Device::getGeneratedCommandsMemoryRequirementsNV( const GeneratedCommandsMemoryRequirementsInfoNV & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getGeneratedCommandsMemoryRequirementsNV( const GeneratedCommandsMemoryRequirementsInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -98191,7 +98206,7 @@ namespace VULKAN_HPP_NAMESPACE #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template - VULKAN_HPP_INLINE Result Device::getImageDrmFormatModifierPropertiesEXT( + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT @@ -98201,6 +98216,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast( image ), reinterpret_cast( pProperties ) ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE typename ResultValueType::type @@ -98248,10 +98264,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 + Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; @@ -98260,9 +98277,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template - VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -98285,10 +98303,11 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 - Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 + Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; @@ -98297,9 +98316,10 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template - VULKAN_HPP_INLINE StructureChain - Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -98546,6 +98566,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast( imageView ), reinterpret_cast( pProperties ) ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -98638,6 +98659,7 @@ namespace VULKAN_HPP_NAMESPACE fd, reinterpret_cast( pMemoryFdProperties ) ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -98670,6 +98692,7 @@ namespace VULKAN_HPP_NAMESPACE pHostPointer, reinterpret_cast( pMemoryHostPointerProperties ) ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -98760,6 +98783,7 @@ namespace VULKAN_HPP_NAMESPACE handle, reinterpret_cast( pMemoryWin32HandleProperties ) ) ); } + # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -102892,6 +102916,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( pDisplayPlaneInfo ), reinterpret_cast( pCapabilities ) ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -103672,18 +103697,20 @@ namespace VULKAN_HPP_NAMESPACE { d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( pFeatures ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 - PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 + PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( &features ) ); return features; } + template - VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = @@ -103699,18 +103726,20 @@ namespace VULKAN_HPP_NAMESPACE { d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( pFeatures ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 - PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 + PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); return features; } + template - VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = @@ -103751,10 +103780,11 @@ namespace VULKAN_HPP_NAMESPACE d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 - PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 + PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; @@ -103762,9 +103792,10 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } + template - VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -103785,10 +103816,11 @@ namespace VULKAN_HPP_NAMESPACE d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 - PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 + PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; @@ -103796,9 +103828,10 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } + template - VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; @@ -103969,19 +104002,21 @@ namespace VULKAN_HPP_NAMESPACE d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 + PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return memoryProperties; } + template - VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = @@ -104000,19 +104035,21 @@ namespace VULKAN_HPP_NAMESPACE d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 - PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 + PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return memoryProperties; } + template - VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = @@ -104147,19 +104184,21 @@ namespace VULKAN_HPP_NAMESPACE d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( pProperties ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 - PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 + PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } + template - VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = @@ -104178,19 +104217,21 @@ namespace VULKAN_HPP_NAMESPACE d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( pProperties ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 - PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 + PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } + template - VULKAN_HPP_INLINE StructureChain - PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain + PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = @@ -104789,6 +104830,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); } + #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE