From b5d312187cc160f1a0e73b60e668ec52a6ea2f55 Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Mon, 15 Nov 2021 15:05:17 +0100 Subject: [PATCH] Add support of functions enumerating chained structure data. + slightly reordered error handling in enumerating functions. --- VulkanHppGenerator.cpp | 301 ++++++++++++++++++-- VulkanHppGenerator.hpp | 12 + vulkan/vulkan_funcs.hpp | 614 ++++++++++++++++++++++++++-------------- vulkan/vulkan_raii.hpp | 427 +++++++++++++++++----------- 4 files changed, 954 insertions(+), 400 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 6adddb9..7b079da 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -2876,12 +2876,15 @@ std::string VulkanHppGenerator::generateCommandResultEnumerate( std::string cons { ${vectorName}.resize( ${counterName} ); result = static_cast( d.${vkCommand}( ${secondCallArguments} ) ); - VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( ${counterName} < ${vectorName}.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - ${vectorName}.resize( ${counterName} ); + VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); + if ( ${counterName} < ${vectorName}.size() ) + { + ${vectorName}.resize( ${counterName} ); + } } return createResultValue( result, ${vectorName}, VULKAN_HPP_NAMESPACE_STRING"::${className}${classSeparator}${commandName}" ); })"; @@ -2933,6 +2936,111 @@ std::string VulkanHppGenerator::generateCommandResultEnumerate( std::string cons } } +std::string + VulkanHppGenerator::generateCommandResultEnumerateChained( std::string const & name, + CommandData const & commandData, + size_t initialSkipCount, + bool definition, + std::pair const & vectorParamIndex, + bool withAllocator ) const +{ + std::set skippedParams = determineSkippedParams( commandData.params, + initialSkipCount, + { vectorParamIndex }, + { vectorParamIndex.second, vectorParamIndex.first }, + false ); + std::string argumentList = + generateArgumentListEnhanced( commandData.params, skippedParams, {}, definition, withAllocator, true, true ); + std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags ); + std::string nodiscard = generateNoDiscard( 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() ); + std::string vectorElementType = + stripPostfix( commandData.params[vectorParamIndex.first].type.compose( "VULKAN_HPP_NAMESPACE" ), " *" ); + std::string allocatorType = startUpperCase( vectorElementType ) + "Allocator"; + + if ( definition ) + { + const std::string functionTemplate = + R"( template + ${nodiscard}VULKAN_HPP_INLINE std::vector ${className}${classSeparator}${commandName}( ${argumentList} )${const} + { + VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); + std::vector returnVector(${structureChainAllocator}); + std::vector<${vectorElementType}> ${vectorName}; + ${counterType} ${counterName}; + Result result; + do + { + result = static_cast( d.${vkCommand}( ${firstCallArguments} ) ); + if ( ( result == Result::eSuccess ) && ${counterName} ) + { + returnVector.resize( ${counterName} ); + ${vectorName}.resize( ${counterName} ); + for ( ${counterType} i = 0; i < ${counterName}; i++ ) + { + ${vectorName}[i].pNext = returnVector[i].template get<${vectorElementType}>().pNext; + } + result = static_cast( d.${vkCommand}( ${secondCallArguments} ) ); + } + } while ( result == Result::eIncomplete ); + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); + if ( ${counterName} < ${vectorName}.size() ) + { + returnVector.resize( ${counterName} ); + } + for ( ${counterType} i = 0; i < ${counterName}; i++ ) + { + returnVector[i].template get<${vectorElementType}>() = ${vectorName}[i]; + } + } + return createResultValue( result, returnVector, VULKAN_HPP_NAMESPACE_STRING"::${className}${classSeparator}${commandName}" ); + })"; + + std::string typenameCheck = withAllocator + ? ( ", typename B, typename std::enable_if::value, int>::type " ) + : ""; + + return replaceWithMap( + functionTemplate, + { { "argumentList", argumentList }, + { "className", + initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, + { "classSeparator", commandData.handle.empty() ? "" : "::" }, + { "commandName", commandName }, + { "const", commandData.handle.empty() ? "" : " const" }, + { "counterName", startLowerCase( stripPrefix( commandData.params[vectorParamIndex.second].name, "p" ) ) }, + { "counterType", commandData.params[vectorParamIndex.second].type.type }, + { "firstCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, true, {}, false ) }, + { "nodiscard", nodiscard }, + { "secondCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, + { "structureChainAllocator", withAllocator ? ( " structureChainAllocator " ) : "" }, + { "typenameCheck", typenameCheck }, + { "vectorElementType", vectorElementType }, + { "vectorName", startLowerCase( stripPrefix( commandData.params[vectorParamIndex.first].name, "p" ) ) }, + { "vkCommand", name } } ); + } + else + { + const std::string functionTemplate = + R"( template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${typenameCheck}> + ${nodiscard}std::vector ${commandName}( ${argumentList} )${const};)"; + + std::string typenameCheck = withAllocator ? ( ", typename B = " + allocatorType + + ", typename std::enable_if::value, int>::type = 0" ) + : ""; + + return replaceWithMap( functionTemplate, + { { "argumentList", argumentList }, + { "const", commandData.handle.empty() ? "" : " const" }, + { "commandName", commandName }, + { "nodiscard", nodiscard }, + { "typenameCheck", typenameCheck } } ); + } +} + std::string VulkanHppGenerator::generateCommandResultEnumerateTwoVectors( std::string const & name, CommandData const & commandData, @@ -4354,25 +4462,53 @@ std::string VulkanHppGenerator::generateCommandResultMultiSuccessWithErrors2Retu bool definition, std::vector const & returnParamIndices ) const { - if ( ( commandData.params[returnParamIndices[0]].type.type == "size_t" ) || - ( commandData.params[returnParamIndices[0]].type.type == "uint32_t" ) ) + if ( ( commandData.successCodes.size() == 2 ) && ( commandData.successCodes[0] == "VK_SUCCESS" ) && + ( commandData.successCodes[1] == "VK_INCOMPLETE" ) ) { - if ( !isStructureChainAnchor( commandData.params[returnParamIndices[1]].type.type ) ) + if ( ( commandData.params[returnParamIndices[0]].type.type == "size_t" ) || + ( commandData.params[returnParamIndices[0]].type.type == "uint32_t" ) ) { - std::map vectorParamIndices = determineVectorParamIndices( commandData.params ); - if ( vectorParamIndices.size() == 1 ) + if ( isStructureChainAnchor( commandData.params[returnParamIndices[1]].type.type ) ) { - if ( returnParamIndices[0] == vectorParamIndices.begin()->second ) + std::map vectorParamIndices = determineVectorParamIndices( commandData.params ); + if ( vectorParamIndices.size() == 1 ) { - if ( returnParamIndices[1] == vectorParamIndices.begin()->first ) + if ( returnParamIndices[0] == vectorParamIndices.begin()->second ) { - return generateCommandSetStandardEnhancedWithAllocator( - definition, - generateCommandStandard( name, commandData, initialSkipCount, definition ), - generateCommandResultEnumerate( - name, commandData, initialSkipCount, definition, *vectorParamIndices.begin(), false ), - generateCommandResultEnumerate( - name, commandData, initialSkipCount, definition, *vectorParamIndices.begin(), true ) ); + if ( returnParamIndices[1] == vectorParamIndices.begin()->first ) + { + return generateCommandSetStandardEnhancedWithAllocatorChained( + definition, + generateCommandStandard( name, commandData, initialSkipCount, definition ), + generateCommandResultEnumerate( + name, commandData, initialSkipCount, definition, *vectorParamIndices.begin(), false ), + generateCommandResultEnumerate( + name, commandData, initialSkipCount, definition, *vectorParamIndices.begin(), true ), + generateCommandResultEnumerateChained( + name, commandData, initialSkipCount, definition, *vectorParamIndices.begin(), false ), + generateCommandResultEnumerateChained( + name, commandData, initialSkipCount, definition, *vectorParamIndices.begin(), true ) ); + } + } + } + } + else + { + std::map vectorParamIndices = determineVectorParamIndices( commandData.params ); + if ( vectorParamIndices.size() == 1 ) + { + if ( returnParamIndices[0] == vectorParamIndices.begin()->second ) + { + if ( returnParamIndices[1] == vectorParamIndices.begin()->first ) + { + return generateCommandSetStandardEnhancedWithAllocator( + definition, + generateCommandStandard( name, commandData, initialSkipCount, definition ), + generateCommandResultEnumerate( + name, commandData, initialSkipCount, definition, *vectorParamIndices.begin(), false ), + generateCommandResultEnumerate( + name, commandData, initialSkipCount, definition, *vectorParamIndices.begin(), true ) ); + } } } } @@ -8098,7 +8234,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE } } } - else if ( !isStructureChainAnchor( commandIt->second.params[returnParamIndices[1]].type.type ) ) + else { std::map vectorParamIndices = determineVectorParamIndices( commandIt->second.params ); if ( vectorParamIndices.size() == 1 ) @@ -8111,8 +8247,14 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE ( commandIt->second.successCodes[0] == "VK_SUCCESS" ) && ( commandIt->second.successCodes[1] == "VK_INCOMPLETE" ) ) { - return generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerate( + std::string str = generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerate( commandIt, initialSkipCount, vectorParamIndices, returnParamIndices, definition ); + if ( isStructureChainAnchor( commandIt->second.params[returnParamIndices[1]].type.type ) ) + { + str += generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerateChain( + commandIt, initialSkipCount, vectorParamIndices, returnParamIndices, definition ); + } + return str; } } } @@ -8161,17 +8303,20 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE { ${vectorName}.resize( ${counterName} ); result = static_cast( getDispatcher()->${vkCommand}( ${secondCallArguments} ) ); - VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( ${counterName} < ${vectorName}.size() ) ) - { - ${vectorName}.resize( ${counterName} ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING"::${className}::${commandName}" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); + if ( ${counterName} < ${vectorName}.size() ) + { + ${vectorName}.resize( ${counterName} ); + } + } return ${vectorName}; } )"; @@ -8217,6 +8362,112 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE } } +std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerateChain( + std::map::const_iterator commandIt, + size_t initialSkipCount, + std::map const & vectorParamIndices, + std::vector const & returnParamIndices, + bool definition ) const +{ + std::set skippedParameters = + determineSkippedParams( commandIt->second.params, initialSkipCount, vectorParamIndices, returnParamIndices, false ); + std::string argumentList = + generateArgumentListEnhanced( commandIt->second.params, skippedParameters, {}, definition, false, true, false ); + std::string commandName = generateCommandName( commandIt->first, commandIt->second.params, initialSkipCount, m_tags ); + std::string vectorElementType = commandIt->second.params[vectorParamIndices.begin()->first].type.type; + if ( !isHandleType( vectorElementType ) ) + { + assert( commandIt->second.params[vectorParamIndices.begin()->first].type.isNonConstPointer() ); + vectorElementType = + ( vectorElementType == "void" ) + ? "uint8_t" + : stripPostfix( + commandIt->second.params[vectorParamIndices.begin()->first].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" ); + } + + if ( definition ) + { + const std::string definitionTemplate = + R"( + template + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector> ${className}::${commandName}( ${argumentList} ) const + {${functionPointerCheck} + std::vector> returnVector; + std::vector<${vectorElementType}> ${vectorName}; + ${counterType} ${counterName}; + VULKAN_HPP_NAMESPACE::Result result; + do + { + result = static_cast( getDispatcher()->${vkCommand}( ${firstCallArguments} ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ${counterName} ) + { + returnVector.resize( ${counterName} ); + ${vectorName}.resize( ${counterName} ); + for ( ${counterType} i = 0; i < ${counterName}; i++ ) + { + ${vectorName}[i].pNext = returnVector[i].template get<${vectorElementType}>().pNext; + } + result = static_cast( getDispatcher()->${vkCommand}( ${secondCallArguments} ) ); + } + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + throwResultException( result, VULKAN_HPP_NAMESPACE_STRING"::${className}::${commandName}" ); + } + VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); + if ( ${counterName} < ${vectorName}.size() ) + { + returnVector.resize( ${counterName} ); + } + for ( ${counterType} i = 0; i < ${counterName}; i++ ) + { + returnVector[i].template get<${vectorElementType}>() = ${vectorName}[i]; + } + return ${vectorName}; + } +)"; + + std::string counterName = + startLowerCase( stripPrefix( commandIt->second.params[vectorParamIndices.begin()->second].name, "p" ) ); + std::string firstCallArguments = + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, true, {}, true ); + std::string secondCallArguments = + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); + std::string vectorName = + startLowerCase( stripPrefix( commandIt->second.params[vectorParamIndices.begin()->first].name, "p" ) ); + + return replaceWithMap( + definitionTemplate, + { { "argumentList", argumentList }, + { "className", + initialSkipCount ? stripPrefix( commandIt->second.params[initialSkipCount - 1].type.type, "Vk" ) + : "Context" }, + { "commandName", commandName }, + { "counterName", counterName }, + { "counterType", commandIt->second.params[vectorParamIndices.begin()->second].type.type }, + { "firstCallArguments", firstCallArguments }, + { "functionPointerCheck", generateFunctionPointerCheck( commandIt->first, commandIt->second.referencedIn ) }, + { "secondCallArguments", secondCallArguments }, + { "vectorElementType", vectorElementType }, + { "vectorName", vectorName }, + { "vkCommand", commandIt->first } } ); + } + else + { + std::string const declarationTemplate = + R"( + template + VULKAN_HPP_NODISCARD std::vector> ${commandName}( ${argumentList} ) const; +)"; + + return replaceWithMap( declarationTemplate, + { + { "argumentList", argumentList }, + { "commandName", commandName } + } ); + } +} + std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithErrors3Return( std::map::const_iterator commandIt, size_t initialSkipCount, @@ -10060,11 +10311,11 @@ ${enter} ${handleType}s( ${constructorArguments} ) { ${vectorName}.resize( ${counterName} ); result = static_cast( dispatcher->${constructorCall}( ${secondCallArguments} ) ); - VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { + VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); this->reserve( ${counterName} ); for ( auto const & ${handleName} : ${vectorName} ) { diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index be81739..1471292 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -458,6 +458,12 @@ private: bool definition, std::pair const & vectorParamIndices, bool withAllocators ) const; + std::string generateCommandResultEnumerateChained( std::string const & name, + CommandData const & commandData, + size_t initialSkipCount, + bool definition, + std::pair const & vectorParamIndices, + bool withAllocators ) const; std::string generateCommandResultEnumerateTwoVectors( std::string const & name, CommandData const & commandData, size_t initialSkipCount, @@ -944,6 +950,12 @@ private: std::map const & vectorParamIndices, std::vector const & returnParamIndices, bool definition ) const; + std::string generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerateChain( + std::map::const_iterator commandIt, + size_t initialSkipCount, + std::map const & vectorParamIndices, + std::vector const & returnParamIndices, + bool definition ) const; std::string generateRAIIHandleCommandResultMultiSuccessWithErrors3Return( std::map::const_iterator commandIt, size_t initialSkipCount, diff --git a/vulkan/vulkan_funcs.hpp b/vulkan/vulkan_funcs.hpp index fde5888..7606580 100644 --- a/vulkan/vulkan_funcs.hpp +++ b/vulkan/vulkan_funcs.hpp @@ -118,12 +118,15 @@ namespace VULKAN_HPP_NAMESPACE physicalDevices.resize( physicalDeviceCount ); result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); - VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( physicalDeviceCount < physicalDevices.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - physicalDevices.resize( physicalDeviceCount ); + VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); + if ( physicalDeviceCount < physicalDevices.size() ) + { + physicalDevices.resize( physicalDeviceCount ); + } } return createResultValue( result, physicalDevices, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); @@ -149,12 +152,15 @@ namespace VULKAN_HPP_NAMESPACE physicalDevices.resize( physicalDeviceCount ); result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); - VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( physicalDeviceCount < physicalDevices.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - physicalDevices.resize( physicalDeviceCount ); + VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); + if ( physicalDeviceCount < physicalDevices.size() ) + { + physicalDevices.resize( physicalDeviceCount ); + } } return createResultValue( result, physicalDevices, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); @@ -493,12 +499,15 @@ namespace VULKAN_HPP_NAMESPACE d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); @@ -529,12 +538,15 @@ namespace VULKAN_HPP_NAMESPACE d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); @@ -576,12 +588,15 @@ namespace VULKAN_HPP_NAMESPACE layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); @@ -613,12 +628,15 @@ namespace VULKAN_HPP_NAMESPACE layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); @@ -654,12 +672,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); } @@ -684,12 +705,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); } @@ -724,12 +748,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); @@ -756,12 +783,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); @@ -2723,12 +2753,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( dataSize < data.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - data.resize( dataSize ); + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + if ( dataSize < data.size() ) + { + data.resize( dataSize ); + } } return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); } @@ -2757,12 +2790,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( dataSize < data.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - data.resize( dataSize ); + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + if ( dataSize < data.size() ) + { + data.resize( dataSize ); + } } return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); } @@ -5607,12 +5643,15 @@ namespace VULKAN_HPP_NAMESPACE m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) + { + physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + } } return createResultValue( result, physicalDeviceGroupProperties, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); @@ -5644,12 +5683,15 @@ namespace VULKAN_HPP_NAMESPACE m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) + { + physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + } } return createResultValue( result, physicalDeviceGroupProperties, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); @@ -7044,12 +7086,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( surfaceFormatCount < surfaceFormats.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - surfaceFormats.resize( surfaceFormatCount ); + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); + if ( surfaceFormatCount < surfaceFormats.size() ) + { + surfaceFormats.resize( surfaceFormatCount ); + } } return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); @@ -7081,12 +7126,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( surfaceFormatCount < surfaceFormats.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - surfaceFormats.resize( surfaceFormatCount ); + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); + if ( surfaceFormatCount < surfaceFormats.size() ) + { + surfaceFormats.resize( surfaceFormatCount ); + } } return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); @@ -7130,12 +7178,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( presentModeCount < presentModes.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - presentModes.resize( presentModeCount ); + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); + if ( presentModeCount < presentModes.size() ) + { + presentModes.resize( presentModeCount ); + } } return createResultValue( result, presentModes, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); @@ -7167,12 +7218,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( presentModeCount < presentModes.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - presentModes.resize( presentModeCount ); + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); + if ( presentModeCount < presentModes.size() ) + { + presentModes.resize( presentModeCount ); + } } return createResultValue( result, presentModes, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); @@ -7324,12 +7378,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); - VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( swapchainImageCount < swapchainImages.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - swapchainImages.resize( swapchainImageCount ); + VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); + if ( swapchainImageCount < swapchainImages.size() ) + { + swapchainImages.resize( swapchainImageCount ); + } } return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); } @@ -7359,12 +7416,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); - VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( swapchainImageCount < swapchainImages.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - swapchainImages.resize( swapchainImageCount ); + VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); + if ( swapchainImageCount < swapchainImages.size() ) + { + swapchainImages.resize( swapchainImageCount ); + } } return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); } @@ -7526,12 +7586,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); - VULKAN_HPP_ASSERT( rectCount <= rects.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( rectCount < rects.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - rects.resize( rectCount ); + VULKAN_HPP_ASSERT( rectCount <= rects.size() ); + if ( rectCount < rects.size() ) + { + rects.resize( rectCount ); + } } return createResultValue( result, rects, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); } @@ -7561,12 +7624,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); - VULKAN_HPP_ASSERT( rectCount <= rects.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( rectCount < rects.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - rects.resize( rectCount ); + VULKAN_HPP_ASSERT( rectCount <= rects.size() ); + if ( rectCount < rects.size() ) + { + rects.resize( rectCount ); + } } return createResultValue( result, rects, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); } @@ -7635,12 +7701,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); @@ -7668,12 +7737,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); @@ -7710,12 +7782,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); @@ -7744,12 +7819,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); @@ -7786,12 +7864,15 @@ namespace VULKAN_HPP_NAMESPACE displays.resize( displayCount ); result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); - VULKAN_HPP_ASSERT( displayCount <= displays.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( displayCount < displays.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - displays.resize( displayCount ); + VULKAN_HPP_ASSERT( displayCount <= displays.size() ); + if ( displayCount < displays.size() ) + { + displays.resize( displayCount ); + } } return createResultValue( result, displays, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); @@ -7819,12 +7900,15 @@ namespace VULKAN_HPP_NAMESPACE displays.resize( displayCount ); result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); - VULKAN_HPP_ASSERT( displayCount <= displays.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( displayCount < displays.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - displays.resize( displayCount ); + VULKAN_HPP_ASSERT( displayCount <= displays.size() ); + if ( displayCount < displays.size() ) + { + displays.resize( displayCount ); + } } return createResultValue( result, displays, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); @@ -7868,12 +7952,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); @@ -7906,12 +7993,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); @@ -8969,12 +9059,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); - VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( videoFormatPropertyCount < videoFormatProperties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - videoFormatProperties.resize( videoFormatPropertyCount ); + VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); + if ( videoFormatPropertyCount < videoFormatProperties.size() ) + { + videoFormatProperties.resize( videoFormatPropertyCount ); + } } return createResultValue( result, videoFormatProperties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); @@ -9011,12 +9104,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); - VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( videoFormatPropertyCount < videoFormatProperties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - videoFormatProperties.resize( videoFormatPropertyCount ); + VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); + if ( videoFormatPropertyCount < videoFormatProperties.size() ) + { + videoFormatProperties.resize( videoFormatPropertyCount ); + } } return createResultValue( result, videoFormatProperties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); @@ -9169,13 +9265,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( videoSession ), &videoSessionMemoryRequirementsCount, reinterpret_cast( videoSessionMemoryRequirements.data() ) ) ); - VULKAN_HPP_ASSERT( videoSessionMemoryRequirementsCount <= videoSessionMemoryRequirements.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && - ( videoSessionMemoryRequirementsCount < videoSessionMemoryRequirements.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); + VULKAN_HPP_ASSERT( videoSessionMemoryRequirementsCount <= videoSessionMemoryRequirements.size() ); + if ( videoSessionMemoryRequirementsCount < videoSessionMemoryRequirements.size() ) + { + videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); + } } return createResultValue( result, videoSessionMemoryRequirements, @@ -9211,13 +9309,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( videoSession ), &videoSessionMemoryRequirementsCount, reinterpret_cast( videoSessionMemoryRequirements.data() ) ) ); - VULKAN_HPP_ASSERT( videoSessionMemoryRequirementsCount <= videoSessionMemoryRequirements.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && - ( videoSessionMemoryRequirementsCount < videoSessionMemoryRequirements.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); + VULKAN_HPP_ASSERT( videoSessionMemoryRequirementsCount <= videoSessionMemoryRequirements.size() ); + if ( videoSessionMemoryRequirementsCount < videoSessionMemoryRequirements.size() ) + { + videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); + } } return createResultValue( result, videoSessionMemoryRequirements, @@ -10045,12 +10145,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( infoType ), &infoSize, reinterpret_cast( info.data() ) ) ); - VULKAN_HPP_ASSERT( infoSize <= info.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( infoSize < info.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - info.resize( infoSize ); + VULKAN_HPP_ASSERT( infoSize <= info.size() ); + if ( infoSize < info.size() ) + { + info.resize( infoSize ); + } } return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); } @@ -10087,12 +10190,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( infoType ), &infoSize, reinterpret_cast( info.data() ) ) ); - VULKAN_HPP_ASSERT( infoSize <= info.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( infoSize < info.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - info.resize( infoSize ); + VULKAN_HPP_ASSERT( infoSize <= info.size() ); + if ( infoSize < info.size() ) + { + info.resize( infoSize ); + } } return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); } @@ -10826,12 +10932,15 @@ namespace VULKAN_HPP_NAMESPACE m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) + { + physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + } } return createResultValue( result, physicalDeviceGroupProperties, @@ -10864,12 +10973,15 @@ namespace VULKAN_HPP_NAMESPACE m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) + { + physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + } } return createResultValue( result, physicalDeviceGroupProperties, @@ -11762,12 +11874,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); - VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( presentationTimingCount < presentationTimings.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - presentationTimings.resize( presentationTimingCount ); + VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); + if ( presentationTimingCount < presentationTimings.size() ) + { + presentationTimings.resize( presentationTimingCount ); + } } return createResultValue( result, presentationTimings, VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); @@ -11802,12 +11917,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); - VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( presentationTimingCount < presentationTimings.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - presentationTimings.resize( presentationTimingCount ); + VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); + if ( presentationTimingCount < presentationTimings.size() ) + { + presentationTimings.resize( presentationTimingCount ); + } } return createResultValue( result, presentationTimings, VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); @@ -12530,12 +12648,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( surfaceFormatCount < surfaceFormats.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - surfaceFormats.resize( surfaceFormatCount ); + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); + if ( surfaceFormatCount < surfaceFormats.size() ) + { + surfaceFormats.resize( surfaceFormatCount ); + } } return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); @@ -12570,12 +12691,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( surfaceFormatCount < surfaceFormats.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - surfaceFormats.resize( surfaceFormatCount ); + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); + if ( surfaceFormatCount < surfaceFormats.size() ) + { + surfaceFormats.resize( surfaceFormatCount ); + } } return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); @@ -12614,12 +12738,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); @@ -12647,12 +12774,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); @@ -12689,12 +12819,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); @@ -12723,12 +12856,15 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); @@ -12772,12 +12908,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); @@ -12811,12 +12950,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); @@ -14547,12 +14689,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( dataSize < data.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - data.resize( dataSize ); + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + if ( dataSize < data.size() ) + { + data.resize( dataSize ); + } } return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); } @@ -14582,12 +14727,15 @@ namespace VULKAN_HPP_NAMESPACE static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( dataSize < data.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - data.resize( dataSize ); + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + if ( dataSize < data.size() ) + { + data.resize( dataSize ); + } } return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); } @@ -15526,12 +15674,15 @@ namespace VULKAN_HPP_NAMESPACE timeDomains.resize( timeDomainCount ); result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); - VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( timeDomainCount < timeDomains.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - timeDomains.resize( timeDomainCount ); + VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); + if ( timeDomainCount < timeDomains.size() ) + { + timeDomains.resize( timeDomainCount ); + } } return createResultValue( result, timeDomains, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); @@ -15559,12 +15710,15 @@ namespace VULKAN_HPP_NAMESPACE timeDomains.resize( timeDomainCount ); result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); - VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( timeDomainCount < timeDomains.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - timeDomains.resize( timeDomainCount ); + VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); + if ( timeDomainCount < timeDomains.size() ) + { + timeDomains.resize( timeDomainCount ); + } } return createResultValue( result, timeDomains, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); @@ -16304,12 +16458,15 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); - VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( fragmentShadingRateCount < fragmentShadingRates.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - fragmentShadingRates.resize( fragmentShadingRateCount ); + VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); + if ( fragmentShadingRateCount < fragmentShadingRates.size() ) + { + fragmentShadingRates.resize( fragmentShadingRateCount ); + } } return createResultValue( result, fragmentShadingRates, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); @@ -16342,12 +16499,15 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); - VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( fragmentShadingRateCount < fragmentShadingRates.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - fragmentShadingRates.resize( fragmentShadingRateCount ); + VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); + if ( fragmentShadingRateCount < fragmentShadingRates.size() ) + { + fragmentShadingRates.resize( fragmentShadingRateCount ); + } } return createResultValue( result, fragmentShadingRates, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); @@ -16434,12 +16594,15 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( toolCount < toolProperties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - toolProperties.resize( toolCount ); + VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); + if ( toolCount < toolProperties.size() ) + { + toolProperties.resize( toolCount ); + } } return createResultValue( result, toolProperties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); @@ -16470,12 +16633,15 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( toolCount < toolProperties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - toolProperties.resize( toolCount ); + VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); + if ( toolCount < toolProperties.size() ) + { + toolProperties.resize( toolCount ); + } } return createResultValue( result, toolProperties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); @@ -16546,12 +16712,15 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); @@ -16583,12 +16752,15 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( propertyCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( propertyCount ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); @@ -16631,12 +16803,15 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ) ); - VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( combinationCount < combinations.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - combinations.resize( combinationCount ); + VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); + if ( combinationCount < combinations.size() ) + { + combinations.resize( combinationCount ); + } } return createResultValue( result, combinations, @@ -16671,12 +16846,15 @@ namespace VULKAN_HPP_NAMESPACE m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ) ); - VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( combinationCount < combinations.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - combinations.resize( combinationCount ); + VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); + if ( combinationCount < combinations.size() ) + { + combinations.resize( combinationCount ); + } } return createResultValue( result, combinations, @@ -16729,12 +16907,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &surfaceInfo ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( presentModeCount < presentModes.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - presentModes.resize( presentModeCount ); + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); + if ( presentModeCount < presentModes.size() ) + { + presentModes.resize( presentModeCount ); + } } return createResultValue( result, presentModes, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); @@ -16769,12 +16950,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &surfaceInfo ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( presentModeCount < presentModes.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - presentModes.resize( presentModeCount ); + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); + if ( presentModeCount < presentModes.size() ) + { + presentModes.resize( presentModeCount ); + } } return createResultValue( result, presentModes, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); @@ -17388,12 +17572,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &pipelineInfo ), &executableCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( executableCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( executableCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( executableCount ); + VULKAN_HPP_ASSERT( executableCount <= properties.size() ); + if ( executableCount < properties.size() ) + { + properties.resize( executableCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); @@ -17428,12 +17615,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &pipelineInfo ), &executableCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( executableCount <= properties.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( executableCount < properties.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - properties.resize( executableCount ); + VULKAN_HPP_ASSERT( executableCount <= properties.size() ); + if ( executableCount < properties.size() ) + { + properties.resize( executableCount ); + } } return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); @@ -17481,12 +17671,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &executableInfo ), &statisticCount, reinterpret_cast( statistics.data() ) ) ); - VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( statisticCount < statistics.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - statistics.resize( statisticCount ); + VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); + if ( statisticCount < statistics.size() ) + { + statistics.resize( statisticCount ); + } } return createResultValue( result, statistics, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); @@ -17524,12 +17717,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &executableInfo ), &statisticCount, reinterpret_cast( statistics.data() ) ) ); - VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( statisticCount < statistics.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - statistics.resize( statisticCount ); + VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); + if ( statisticCount < statistics.size() ) + { + statistics.resize( statisticCount ); + } } return createResultValue( result, statistics, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); @@ -17579,12 +17775,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &executableInfo ), &internalRepresentationCount, reinterpret_cast( internalRepresentations.data() ) ) ); - VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( internalRepresentationCount < internalRepresentations.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - internalRepresentations.resize( internalRepresentationCount ); + VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); + if ( internalRepresentationCount < internalRepresentations.size() ) + { + internalRepresentations.resize( internalRepresentationCount ); + } } return createResultValue( result, internalRepresentations, @@ -17625,12 +17824,15 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &executableInfo ), &internalRepresentationCount, reinterpret_cast( internalRepresentations.data() ) ) ); - VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); } } while ( result == Result::eIncomplete ); - if ( ( result == Result::eSuccess ) && ( internalRepresentationCount < internalRepresentations.size() ) ) + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { - internalRepresentations.resize( internalRepresentationCount ); + VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); + if ( internalRepresentationCount < internalRepresentations.size() ) + { + internalRepresentations.resize( internalRepresentationCount ); + } } return createResultValue( result, internalRepresentations, diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index 4c925f8..0ccab4f 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -3016,11 +3016,11 @@ namespace VULKAN_HPP_NAMESPACE physicalDevices.resize( physicalDeviceCount ); result = static_cast( dispatcher->vkEnumeratePhysicalDevices( static_cast( *instance ), &physicalDeviceCount, physicalDevices.data() ) ); - VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { + VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); this->reserve( physicalDeviceCount ); for ( auto const & physicalDevice : physicalDevices ) { @@ -6444,11 +6444,11 @@ namespace VULKAN_HPP_NAMESPACE displays.resize( displayCount ); result = static_cast( dispatcher->vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( *physicalDevice ), planeIndex, &displayCount, displays.data() ) ); - VULKAN_HPP_ASSERT( displayCount <= displays.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { + VULKAN_HPP_ASSERT( displayCount <= displays.size() ); this->reserve( displayCount ); for ( auto const & displayKHR : displays ) { @@ -9700,17 +9700,20 @@ namespace VULKAN_HPP_NAMESPACE layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceExtensionProperties" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -9735,18 +9738,21 @@ namespace VULKAN_HPP_NAMESPACE layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -9765,17 +9771,20 @@ namespace VULKAN_HPP_NAMESPACE properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceLayerProperties" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -9796,17 +9805,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -10254,17 +10266,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( dataSize < data.size() ) ) - { - data.resize( dataSize ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::getData" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + if ( dataSize < data.size() ) + { + data.resize( dataSize ); + } + } return data; } @@ -11052,18 +11067,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_instance ), &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) + { + physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + } + } return physicalDeviceGroupProperties; } @@ -11625,17 +11642,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( surfaceFormatCount < surfaceFormats.size() ) ) - { - surfaceFormats.resize( surfaceFormatCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); + if ( surfaceFormatCount < surfaceFormats.size() ) + { + surfaceFormats.resize( surfaceFormatCount ); + } + } return surfaceFormats; } @@ -11665,17 +11685,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( presentModeCount < presentModes.size() ) ) - { - presentModes.resize( presentModeCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); + if ( presentModeCount < presentModes.size() ) + { + presentModes.resize( presentModeCount ); + } + } return presentModes; } @@ -11711,17 +11734,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_swapchain ), &swapchainImageCount, swapchainImages.data() ) ); - VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( swapchainImageCount < swapchainImages.size() ) ) - { - swapchainImages.resize( swapchainImageCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getImages" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); + if ( swapchainImageCount < swapchainImages.size() ) + { + swapchainImages.resize( swapchainImageCount ); + } + } return swapchainImages; } @@ -11832,17 +11858,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); - VULKAN_HPP_ASSERT( rectCount <= rects.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( rectCount < rects.size() ) ) - { - rects.resize( rectCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( rectCount <= rects.size() ); + if ( rectCount < rects.size() ) + { + rects.resize( rectCount ); + } + } return rects; } @@ -11890,17 +11919,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -11927,17 +11959,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -11971,17 +12006,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -12298,18 +12336,20 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); - VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( videoFormatPropertyCount < videoFormatProperties.size() ) ) - { - videoFormatProperties.resize( videoFormatPropertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); + if ( videoFormatPropertyCount < videoFormatProperties.size() ) + { + videoFormatProperties.resize( videoFormatPropertyCount ); + } + } return videoFormatProperties; } @@ -12345,18 +12385,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_videoSession ), &videoSessionMemoryRequirementsCount, reinterpret_cast( videoSessionMemoryRequirements.data() ) ) ); - VULKAN_HPP_ASSERT( videoSessionMemoryRequirementsCount <= videoSessionMemoryRequirements.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( videoSessionMemoryRequirementsCount < videoSessionMemoryRequirements.size() ) ) - { - videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::VideoSessionKHR::getMemoryRequirements" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( videoSessionMemoryRequirementsCount <= videoSessionMemoryRequirements.size() ); + if ( videoSessionMemoryRequirementsCount < videoSessionMemoryRequirements.size() ) + { + videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); + } + } return videoSessionMemoryRequirements; } @@ -12720,17 +12762,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( infoType ), &infoSize, reinterpret_cast( info.data() ) ) ); - VULKAN_HPP_ASSERT( infoSize <= info.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( infoSize < info.size() ) ) - { - info.resize( infoSize ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getShaderInfoAMD" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( infoSize <= info.size() ); + if ( infoSize < info.size() ) + { + info.resize( infoSize ); + } + } return info; } @@ -13157,18 +13202,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_instance ), &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); - VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) ) - { - physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) + { + physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); + } + } return physicalDeviceGroupProperties; } @@ -13638,18 +13685,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); - VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( presentationTimingCount < presentationTimings.size() ) ) - { - presentationTimings.resize( presentationTimingCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getPastPresentationTimingGOOGLE" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); + if ( presentationTimingCount < presentationTimings.size() ) + { + presentationTimings.resize( presentationTimingCount ); + } + } return presentationTimings; } @@ -14002,17 +14051,20 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); - VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( surfaceFormatCount < surfaceFormats.size() ) ) - { - surfaceFormats.resize( surfaceFormatCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); + if ( surfaceFormatCount < surfaceFormats.size() ) + { + surfaceFormats.resize( surfaceFormatCount ); + } + } return surfaceFormats; } @@ -14039,17 +14091,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -14076,17 +14131,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -14115,17 +14173,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -14938,17 +14999,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); - VULKAN_HPP_ASSERT( dataSize <= data.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( dataSize < data.size() ) ) - { - data.resize( dataSize ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::getData" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + if ( dataSize < data.size() ) + { + data.resize( dataSize ); + } + } return data; } @@ -15408,17 +15472,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); - VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( timeDomainCount < timeDomains.size() ) ) - { - timeDomains.resize( timeDomainCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); + if ( timeDomainCount < timeDomains.size() ) + { + timeDomains.resize( timeDomainCount ); + } + } return timeDomains; } @@ -15793,18 +15860,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); - VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( fragmentShadingRateCount < fragmentShadingRates.size() ) ) - { - fragmentShadingRates.resize( fragmentShadingRateCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); + if ( fragmentShadingRateCount < fragmentShadingRates.size() ) + { + fragmentShadingRates.resize( fragmentShadingRateCount ); + } + } return fragmentShadingRates; } @@ -15858,17 +15927,20 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ) ); - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( toolCount < toolProperties.size() ) ) - { - toolProperties.resize( toolCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); + if ( toolCount < toolProperties.size() ) + { + toolProperties.resize( toolCount ); + } + } return toolProperties; } @@ -15916,18 +15988,21 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( propertyCount < properties.size() ) ) - { - properties.resize( propertyCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) + { + properties.resize( propertyCount ); + } + } return properties; } @@ -15956,18 +16031,21 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &combinationCount, reinterpret_cast( combinations.data() ) ) ); - VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( combinationCount < combinations.size() ) ) - { - combinations.resize( combinationCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); + if ( combinationCount < combinations.size() ) + { + combinations.resize( combinationCount ); + } + } return combinations; } @@ -16001,17 +16079,20 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &surfaceInfo ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); - VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( presentModeCount < presentModes.size() ) ) - { - presentModes.resize( presentModeCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); + if ( presentModeCount < presentModes.size() ) + { + presentModes.resize( presentModeCount ); + } + } return presentModes; } @@ -16381,17 +16462,20 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &pipelineInfo ), &executableCount, reinterpret_cast( properties.data() ) ) ); - VULKAN_HPP_ASSERT( executableCount <= properties.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( executableCount < properties.size() ) ) - { - properties.resize( executableCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( executableCount <= properties.size() ); + if ( executableCount < properties.size() ) + { + properties.resize( executableCount ); + } + } return properties; } @@ -16421,17 +16505,20 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &executableInfo ), &statisticCount, reinterpret_cast( statistics.data() ) ) ); - VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( statisticCount < statistics.size() ) ) - { - statistics.resize( statisticCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); + if ( statisticCount < statistics.size() ) + { + statistics.resize( statisticCount ); + } + } return statistics; } @@ -16464,19 +16551,21 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &executableInfo ), &internalRepresentationCount, reinterpret_cast( internalRepresentations.data() ) ) ); - VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( internalRepresentationCount < internalRepresentations.size() ) ) - { - internalRepresentations.resize( internalRepresentationCount ); - } if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); } + if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { + VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); + if ( internalRepresentationCount < internalRepresentations.size() ) + { + internalRepresentations.resize( internalRepresentationCount ); + } + } return internalRepresentations; }