From 448efe9edb47d400fe9b59f298c35ed98e3aadba Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Mon, 27 Jun 2022 10:03:03 +0200 Subject: [PATCH] Combine two types of commands into one generation function --- VulkanHppGenerator.cpp | 104 +--- VulkanHppGenerator.hpp | 8 +- vulkan/vulkan_raii.hpp | 1046 ++++++++++++++++------------------------ 3 files changed, 435 insertions(+), 723 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 5e0d7b8..aa2e14c 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -2033,7 +2033,8 @@ std::vector VulkanHppGenerator::determineConstPointerParams( std::vector std::vector VulkanHppGenerator::determineDataTypes( std::vector const & params, std::map const & vectorParams, std::vector const & returnParams, - std::set const & templatedParams ) const + std::set const & templatedParams, + bool raii ) const { std::vector dataTypes; for ( auto rp : returnParams ) @@ -2051,6 +2052,10 @@ std::vector VulkanHppGenerator::determineDataTypes( std::vector dataTypes = determineDataTypes( commandData.params, vectorParams, returnParams, templatedParams ); + std::vector dataTypes = determineDataTypes( commandData.params, vectorParams, returnParams, templatedParams, false ); std::string dataType = combineDataTypes( vectorParams, returnParams, singular, enumerating, dataTypes, unique, false ); std::string argumentTemplates = generateArgumentTemplates( commandData.params, returnParams, vectorParams, templatedParams, chained, false ); @@ -6155,7 +6160,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandEnhanced( std::mapfirst == "vkGetMemoryHostPointerPropertiesEXT" ) ? std::set() : determineVoidPointerParams( commandIt->second.params ); bool enumerating = determineEnumeration( vectorParams, returnParams ); - std::vector dataTypes = determineDataTypes( commandIt->second.params, vectorParams, returnParams, templatedParams ); + std::vector dataTypes = determineDataTypes( commandIt->second.params, vectorParams, returnParams, templatedParams, true ); std::string dataType = combineDataTypes( vectorParams, returnParams, singular, enumerating, dataTypes, false, true ); std::string argumentTemplates = generateArgumentTemplates( commandIt->second.params, returnParams, vectorParams, templatedParams, chained, true ); @@ -6657,8 +6662,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE } else { - std::string str = generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerate( - commandIt, initialSkipCount, vectorParams, returnParams, definition ); + std::string str = generateRAIIHandleCommandEnhanced( commandIt, initialSkipCount, returnParams, vectorParams, definition, false, false ); if ( isStructureChainAnchor( commandIt->second.params[returnParams[1]].type.type ) ) { str += generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerateChain( @@ -6676,94 +6680,6 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE return ""; } -std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerate( - std::map::const_iterator commandIt, - size_t initialSkipCount, - std::map const & vectorParams, - std::vector const & returnParams, - bool definition ) const -{ - std::set skippedParams = determineSkippedParams( commandIt->second.params, initialSkipCount, vectorParams, returnParams, false ); - std::string argumentList = - generateArgumentListEnhanced( commandIt->second.params, returnParams, vectorParams, skippedParams, {}, {}, definition, false, false, false ); - std::string commandName = generateCommandName( commandIt->first, commandIt->second.params, initialSkipCount, m_tags, false, false ); - std::string vectorElementType = commandIt->second.params[vectorParams.begin()->first].type.type; - if ( !isHandleType( vectorElementType ) ) - { - assert( commandIt->second.params[vectorParams.begin()->first].type.isNonConstPointer() ); - vectorElementType = ( vectorElementType == "void" ) - ? "uint8_t" - : stripPostfix( commandIt->second.params[vectorParams.begin()->first].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" ); - } - - if ( definition ) - { - const std::string definitionTemplate = - R"( - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<${vectorElementType}> ${className}::${commandName}( ${argumentList} ) const - {${functionPointerCheck} - 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} ) - { - ${vectorName}.resize( ${counterName} ); - 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}" ); - } - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); - if ( ${counterName} < ${vectorName}.size() ) - { - ${vectorName}.resize( ${counterName} ); - } - } - return ${vectorName}; - } -)"; - - std::string counterName = startLowerCase( stripPrefix( commandIt->second.params[vectorParams.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[vectorParams.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[vectorParams.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"( - VULKAN_HPP_NODISCARD std::vector<${vectorElementType}> ${commandName}( ${argumentList} ) const; -)"; - - return replaceWithMap( declarationTemplate, - { - { "argumentList", argumentList }, - { "commandName", commandName }, - { "vectorElementType", vectorElementType }, - } ); - } -} - std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerateChain( std::map::const_iterator commandIt, size_t initialSkipCount, @@ -9158,7 +9074,7 @@ std::string VulkanHppGenerator::generateReturnType( assert( ( ( commandData.successCodes.size() == 1 ) || ( ( commandData.successCodes.size() == 2 ) && ( commandData.successCodes[1] == "VK_INCOMPLETE" ) ) ) && !commandData.errorCodes.empty() && ( returnParams.size() <= 3 ) ); - returnType = "typename ResultValueType<" + modifiedDataType + ">::type"; + returnType = raii ? modifiedDataType : ( "typename ResultValueType<" + modifiedDataType + ">::type" ); } } return returnType; diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 3ca23b5..1516960 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -411,7 +411,8 @@ private: std::vector determineDataTypes( std::vector const & params, std::map const & vectorParams, std::vector const & returnParams, - std::set const & templatedParams ) const; + std::set const & templatedParams, + bool raii ) const; size_t determineDefaultStartIndex( std::vector const & params, std::set const & skippedParams ) const; bool determineEnumeration( std::map const & vectorParams, std::vector const & returnParams ) const; size_t determineInitialSkipCount( std::string const & command ) const; @@ -725,11 +726,6 @@ private: size_t initialSkipCount, bool definition, std::vector const & returnParamIndices ) const; - std::string generateRAIIHandleCommandResultMultiSuccessWithErrors2Return1VectorEnumerate( std::map::const_iterator commandIt, - size_t initialSkipCount, - 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, diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index 654f049..7c8ba59 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -10279,29 +10279,22 @@ namespace VULKAN_HPP_NAMESPACE { std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( getDispatcher()->vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkEnumerateInstanceExtensionProperties( + layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceExtensionProperties" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -10311,32 +10304,25 @@ namespace VULKAN_HPP_NAMESPACE { std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkEnumerateDeviceExtensionProperties( - static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkEnumerateDeviceExtensionProperties( + static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( - getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), - layerName ? layerName->c_str() : nullptr, - &propertyCount, - reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), + layerName ? layerName->c_str() : nullptr, + &propertyCount, + reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -10345,28 +10331,21 @@ namespace VULKAN_HPP_NAMESPACE { std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( - getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceLayerProperties" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -10375,29 +10354,22 @@ namespace VULKAN_HPP_NAMESPACE { std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkEnumerateDeviceLayerProperties( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkEnumerateDeviceLayerProperties( static_cast( m_physicalDevice ), &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( getDispatcher()->vkEnumerateDeviceLayerProperties( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkEnumerateDeviceLayerProperties( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -10750,31 +10722,25 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PipelineCache::getData() const { - std::vector data; - size_t dataSize; - VULKAN_HPP_NAMESPACE::Result result; + std::vector data; + size_t dataSize; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPipelineCacheData( static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) + result = + getDispatcher()->vkGetPipelineCacheData( static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, nullptr ); + if ( ( result == VK_SUCCESS ) && dataSize ) { data.resize( dataSize ); - result = static_cast( getDispatcher()->vkGetPipelineCacheData( - static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); + result = getDispatcher()->vkGetPipelineCacheData( + static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::getData" ); + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + if ( dataSize < data.size() ) { - 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 ); - } + data.resize( dataSize ); } return data; } @@ -11419,31 +11385,24 @@ namespace VULKAN_HPP_NAMESPACE { std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) + result = getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ); + if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = static_cast( + result = getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, - reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); + reinterpret_cast( physicalDeviceGroupProperties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { - 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 ); - } + physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } return physicalDeviceGroupProperties; } @@ -11921,29 +11880,22 @@ namespace VULKAN_HPP_NAMESPACE { std::vector toolProperties; uint32_t toolCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) + result = getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, nullptr ); + if ( ( result == VK_SUCCESS ) && toolCount ) { toolProperties.resize( toolCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolProperties( - static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceToolProperties( + static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); + VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); + if ( toolCount < toolProperties.size() ) { - throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); - } - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); - if ( toolCount < toolProperties.size() ) - { - toolProperties.resize( toolCount ); - } + toolProperties.resize( toolCount ); } return toolProperties; } @@ -12283,34 +12235,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR && "Function needs extension enabled!" ); + std::vector surfaceFormats; uint32_t surfaceFormatCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) + result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, nullptr ); + if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); + if ( surfaceFormatCount < surfaceFormats.size() ) { - 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 ); - } + surfaceFormats.resize( surfaceFormatCount ); } return surfaceFormats; } @@ -12320,34 +12266,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR && "Function needs extension enabled!" ); + std::vector presentModes; uint32_t presentModeCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) + result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, nullptr ); + if ( ( result == VK_SUCCESS ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + &presentModeCount, + reinterpret_cast( presentModes.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); + if ( presentModeCount < presentModes.size() ) { - 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 ); - } + presentModes.resize( presentModeCount ); } return presentModes; } @@ -12364,31 +12304,26 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector SwapchainKHR::getImages() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainImagesKHR && "Function needs extension enabled!" ); - std::vector swapchainImages; - uint32_t swapchainImageCount; - VULKAN_HPP_NAMESPACE::Result result; + + std::vector swapchainImages; + uint32_t swapchainImageCount; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetSwapchainImagesKHR( - static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) + result = getDispatcher()->vkGetSwapchainImagesKHR( + static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, nullptr ); + if ( ( result == VK_SUCCESS ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); - result = static_cast( getDispatcher()->vkGetSwapchainImagesKHR( - static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, swapchainImages.data() ) ); + result = getDispatcher()->vkGetSwapchainImagesKHR( + static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, swapchainImages.data() ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getImages" ); + VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); + if ( swapchainImageCount < swapchainImages.size() ) { - 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 ); - } + swapchainImages.resize( swapchainImageCount ); } return swapchainImages; } @@ -12459,34 +12394,26 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR && "Function needs extension enabled!" ); + std::vector rects; uint32_t rectCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) + result = getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, nullptr ); + if ( ( result == VK_SUCCESS ) && rectCount ) { rects.resize( rectCount ); - result = static_cast( - getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &rectCount, - reinterpret_cast( rects.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); + VULKAN_HPP_ASSERT( rectCount <= rects.size() ); + if ( rectCount < rects.size() ) { - 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 ); - } + rects.resize( rectCount ); } return rects; } @@ -12515,31 +12442,25 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR && "Function needs extension enabled!" ); + std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -12548,31 +12469,25 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR && "Function needs extension enabled!" ); + std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -12587,34 +12502,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayModePropertiesKHR && "Function needs extension enabled!" ); + std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetDisplayModePropertiesKHR( - static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkGetDisplayModePropertiesKHR( + static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( - getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), - static_cast( m_display ), - &propertyCount, - reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), + static_cast( m_display ), + &propertyCount, + reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -12880,37 +12789,31 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR && "Function needs extension enabled!" ); + std::vector videoFormatProperties; uint32_t videoFormatPropertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoFormatInfo ), - &videoFormatPropertyCount, - nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) + result = getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), + reinterpret_cast( &videoFormatInfo ), + &videoFormatPropertyCount, + nullptr ); + if ( ( result == VK_SUCCESS ) && videoFormatPropertyCount ) { videoFormatProperties.resize( videoFormatPropertyCount ); - result = static_cast( + result = getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, - reinterpret_cast( videoFormatProperties.data() ) ) ); + reinterpret_cast( videoFormatProperties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); + VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); + if ( videoFormatPropertyCount < videoFormatProperties.size() ) { - 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 ); - } + videoFormatProperties.resize( videoFormatPropertyCount ); } return videoFormatProperties; } @@ -12926,34 +12829,29 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR && "Function needs extension enabled!" ); + std::vector videoSessionMemoryRequirements; uint32_t videoSessionMemoryRequirementsCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( - static_cast( m_device ), static_cast( m_videoSession ), &videoSessionMemoryRequirementsCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoSessionMemoryRequirementsCount ) + result = getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( + static_cast( m_device ), static_cast( m_videoSession ), &videoSessionMemoryRequirementsCount, nullptr ); + if ( ( result == VK_SUCCESS ) && videoSessionMemoryRequirementsCount ) { videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); - result = static_cast( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( + result = getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( static_cast( m_device ), static_cast( m_videoSession ), &videoSessionMemoryRequirementsCount, - reinterpret_cast( videoSessionMemoryRequirements.data() ) ) ); + reinterpret_cast( videoSessionMemoryRequirements.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::VideoSessionKHR::getMemoryRequirements" ); + VULKAN_HPP_ASSERT( videoSessionMemoryRequirementsCount <= videoSessionMemoryRequirements.size() ); + if ( videoSessionMemoryRequirementsCount < videoSessionMemoryRequirements.size() ) { - 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 ); - } + videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); } return videoSessionMemoryRequirements; } @@ -13222,39 +13120,34 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderInfoAMD && "Function needs extension enabled!" ); - std::vector info; - size_t infoSize; - VULKAN_HPP_NAMESPACE::Result result; + + std::vector info; + size_t infoSize; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), - static_cast( m_pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && infoSize ) + result = getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), + static_cast( m_pipeline ), + static_cast( shaderStage ), + static_cast( infoType ), + &infoSize, + nullptr ); + if ( ( result == VK_SUCCESS ) && infoSize ) { info.resize( infoSize ); - result = static_cast( getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), - static_cast( m_pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - reinterpret_cast( info.data() ) ) ); + result = getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), + static_cast( m_pipeline ), + static_cast( shaderStage ), + static_cast( infoType ), + &infoSize, + reinterpret_cast( info.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getShaderInfoAMD" ); + VULKAN_HPP_ASSERT( infoSize <= info.size() ); + if ( infoSize < info.size() ) { - 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 ); - } + info.resize( infoSize ); } return info; } @@ -13618,33 +13511,27 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR && "Function needs extension enabled!" ); + std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) + result = getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ); + if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( - static_cast( m_instance ), - &physicalDeviceGroupCount, - reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); + result = + getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), + &physicalDeviceGroupCount, + reinterpret_cast( physicalDeviceGroupProperties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); + VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); + if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { - 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 ); - } + physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } return physicalDeviceGroupProperties; } @@ -14001,34 +13888,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPastPresentationTimingGOOGLE && "Function needs extension enabled!" ); + std::vector presentationTimings; uint32_t presentationTimingCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetPastPresentationTimingGOOGLE( - static_cast( m_device ), static_cast( m_swapchain ), &presentationTimingCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentationTimingCount ) + result = getDispatcher()->vkGetPastPresentationTimingGOOGLE( + static_cast( m_device ), static_cast( m_swapchain ), &presentationTimingCount, nullptr ); + if ( ( result == VK_SUCCESS ) && presentationTimingCount ) { presentationTimings.resize( presentationTimingCount ); - result = static_cast( - getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), - static_cast( m_swapchain ), - &presentationTimingCount, - reinterpret_cast( presentationTimings.data() ) ) ); + result = getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), + static_cast( m_swapchain ), + &presentationTimingCount, + reinterpret_cast( presentationTimings.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getPastPresentationTimingGOOGLE" ); + VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); + if ( presentationTimingCount < presentationTimings.size() ) { - 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 ); - } + presentationTimings.resize( presentationTimingCount ); } return presentationTimings; } @@ -14296,37 +14177,30 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR && "Function needs extension enabled!" ); + std::vector surfaceFormats; uint32_t surfaceFormatCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) + result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + nullptr ); + if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); + if ( surfaceFormatCount < surfaceFormats.size() ) { - 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 ); - } + surfaceFormats.resize( surfaceFormatCount ); } return surfaceFormats; } @@ -14385,31 +14259,25 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR && "Function needs extension enabled!" ); + std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -14418,31 +14286,25 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR && "Function needs extension enabled!" ); + std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -14451,34 +14313,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayModeProperties2KHR && "Function needs extension enabled!" ); + std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetDisplayModeProperties2KHR( - static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = getDispatcher()->vkGetDisplayModeProperties2KHR( + static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( - getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), - static_cast( m_display ), - &propertyCount, - reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), + static_cast( m_display ), + &propertyCount, + reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -15139,31 +14995,26 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetValidationCacheDataEXT && "Function needs extension enabled!" ); - std::vector data; - size_t dataSize; - VULKAN_HPP_NAMESPACE::Result result; + + std::vector data; + size_t dataSize; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetValidationCacheDataEXT( - static_cast( m_device ), static_cast( m_validationCache ), &dataSize, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) + result = getDispatcher()->vkGetValidationCacheDataEXT( + static_cast( m_device ), static_cast( m_validationCache ), &dataSize, nullptr ); + if ( ( result == VK_SUCCESS ) && dataSize ) { data.resize( dataSize ); - result = static_cast( getDispatcher()->vkGetValidationCacheDataEXT( - static_cast( m_device ), static_cast( m_validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); + result = getDispatcher()->vkGetValidationCacheDataEXT( + static_cast( m_device ), static_cast( m_validationCache ), &dataSize, reinterpret_cast( data.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::getData" ); + VULKAN_HPP_ASSERT( dataSize <= data.size() ); + if ( dataSize < data.size() ) { - 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 ); - } + data.resize( dataSize ); } return data; } @@ -15549,31 +15400,26 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT && "Function needs extension enabled!" ); + std::vector timeDomains; uint32_t timeDomainCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) + result = + getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ); + if ( ( result == VK_SUCCESS ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( - static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( + static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); + VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); + if ( timeDomainCount < timeDomains.size() ) { - 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 ); - } + timeDomains.resize( timeDomainCount ); } return timeDomains; } @@ -15855,33 +15701,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR && "Function needs extension enabled!" ); + std::vector fragmentShadingRates; uint32_t fragmentShadingRateCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( - static_cast( m_physicalDevice ), &fragmentShadingRateCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) + result = + getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, nullptr ); + if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( + result = getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, - reinterpret_cast( fragmentShadingRates.data() ) ) ); + reinterpret_cast( fragmentShadingRates.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); + VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); + if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { - 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 ); - } + fragmentShadingRates.resize( fragmentShadingRateCount ); } return fragmentShadingRates; } @@ -15918,31 +15759,25 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT && "Function needs extension enabled!" ); + std::vector toolProperties; uint32_t toolCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( static_cast( m_physicalDevice ), &toolCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) + result = getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( static_cast( m_physicalDevice ), &toolCount, nullptr ); + if ( ( result == VK_SUCCESS ) && toolCount ) { toolProperties.resize( toolCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( - static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( + static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); + VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); + if ( toolCount < toolProperties.size() ) { - 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 ); - } + toolProperties.resize( toolCount ); } return toolProperties; } @@ -15969,31 +15804,26 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV && "Function needs extension enabled!" ); + std::vector properties; uint32_t propertyCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) + result = + getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, nullptr ); + if ( ( result == VK_SUCCESS ) && propertyCount ) { properties.resize( propertyCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); + VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + if ( propertyCount < properties.size() ) { - 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 ); - } + properties.resize( propertyCount ); } return properties; } @@ -16006,33 +15836,29 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV && "Function needs extension enabled!" ); + std::vector combinations; uint32_t combinationCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - static_cast( m_physicalDevice ), &combinationCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && combinationCount ) + result = getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + static_cast( m_physicalDevice ), &combinationCount, nullptr ); + if ( ( result == VK_SUCCESS ) && combinationCount ) { combinations.resize( combinationCount ); - result = static_cast( getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + result = getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( static_cast( m_physicalDevice ), &combinationCount, - reinterpret_cast( combinations.data() ) ) ); + reinterpret_cast( combinations.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); + VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); + if ( combinationCount < combinations.size() ) { - 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 ); - } + combinations.resize( combinationCount ); } return combinations; } @@ -16045,37 +15871,30 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT && "Function needs extension enabled!" ); + std::vector presentModes; uint32_t presentModeCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) + result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &presentModeCount, + nullptr ); + if ( ( result == VK_SUCCESS ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = static_cast( - getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ) ); + result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &presentModeCount, + reinterpret_cast( presentModes.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); + VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); + if ( presentModeCount < presentModes.size() ) { - 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 ); - } + presentModes.resize( presentModeCount ); } return presentModes; } @@ -16358,34 +16177,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutablePropertiesKHR && "Function needs extension enabled!" ); + std::vector properties; uint32_t executableCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetPipelineExecutablePropertiesKHR( - static_cast( m_device ), reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && executableCount ) + result = getDispatcher()->vkGetPipelineExecutablePropertiesKHR( + static_cast( m_device ), reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ); + if ( ( result == VK_SUCCESS ) && executableCount ) { properties.resize( executableCount ); - result = static_cast( - getDispatcher()->vkGetPipelineExecutablePropertiesKHR( static_cast( m_device ), - reinterpret_cast( &pipelineInfo ), - &executableCount, - reinterpret_cast( properties.data() ) ) ); + result = getDispatcher()->vkGetPipelineExecutablePropertiesKHR( static_cast( m_device ), + reinterpret_cast( &pipelineInfo ), + &executableCount, + reinterpret_cast( properties.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); + VULKAN_HPP_ASSERT( executableCount <= properties.size() ); + if ( executableCount < properties.size() ) { - 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 ); - } + properties.resize( executableCount ); } return properties; } @@ -16395,34 +16208,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutableStatisticsKHR && "Function needs extension enabled!" ); + std::vector statistics; uint32_t statisticCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( getDispatcher()->vkGetPipelineExecutableStatisticsKHR( - static_cast( m_device ), reinterpret_cast( &executableInfo ), &statisticCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && statisticCount ) + result = getDispatcher()->vkGetPipelineExecutableStatisticsKHR( + static_cast( m_device ), reinterpret_cast( &executableInfo ), &statisticCount, nullptr ); + if ( ( result == VK_SUCCESS ) && statisticCount ) { statistics.resize( statisticCount ); - result = static_cast( - getDispatcher()->vkGetPipelineExecutableStatisticsKHR( static_cast( m_device ), - reinterpret_cast( &executableInfo ), - &statisticCount, - reinterpret_cast( statistics.data() ) ) ); + result = getDispatcher()->vkGetPipelineExecutableStatisticsKHR( static_cast( m_device ), + reinterpret_cast( &executableInfo ), + &statisticCount, + reinterpret_cast( statistics.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); + VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); + if ( statisticCount < statistics.size() ) { - 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 ); - } + statistics.resize( statisticCount ); } return statistics; } @@ -16432,37 +16239,30 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR && "Function needs extension enabled!" ); + std::vector internalRepresentations; uint32_t internalRepresentationCount; - VULKAN_HPP_NAMESPACE::Result result; + VkResult result; do { - result = static_cast( - getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( static_cast( m_device ), - reinterpret_cast( &executableInfo ), - &internalRepresentationCount, - nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && internalRepresentationCount ) + result = getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( + static_cast( m_device ), reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ); + if ( ( result == VK_SUCCESS ) && internalRepresentationCount ) { internalRepresentations.resize( internalRepresentationCount ); - result = static_cast( getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( + result = getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( static_cast( m_device ), reinterpret_cast( &executableInfo ), &internalRepresentationCount, - reinterpret_cast( internalRepresentations.data() ) ) ); + reinterpret_cast( internalRepresentations.data() ) ); } - } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + } while ( result == VK_INCOMPLETE ); + resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); + VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); + if ( internalRepresentationCount < internalRepresentations.size() ) { - 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 ); - } + internalRepresentations.resize( internalRepresentationCount ); } return internalRepresentations; }