diff --git a/README.md b/README.md index 7166427..1f21061 100644 --- a/README.md +++ b/README.md @@ -845,6 +845,10 @@ This either selects the dynamic (when it's 1) or the static (when it's not 1) Di By default, a little helper class ```DynamicLoader``` is used to dynamically load the vulkan library. If you set it to something different than 1 before including vulkan.hpp, this helper is not available, and you need to explicitly provide your own loader type for the function ```DispatchLoaderDynamic::init()```. +#### VULKAN_HPP_EXPECTED + +When this is not externally defined and VULKAN_HPP_CPP_VERSION is at least 23, VULKAN_HPP_EXPECTED is defined to be std::expected, and VULKAN_HPP_UNEXPECTED is defined to be std::unexpected. + #### VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC By default, the member ```m_mask``` of the ```Flags``` template class is private. This is to prevent accidentally setting a ```Flags``` with some inappropriate value. But it also prevents using a ```Flags```, or a structure holding a ```Flags```, to be used as a non-type template parameter. If you really need that functionality, and accept the reduced security, you can use this define to change the access specifier for m_mask from private to public, which allows using a ```Flags``` as a non-type template parameter. @@ -889,6 +893,10 @@ By defining ```VULKAN_HPP_NO_SMART_HANDLE``` before including vulkan.hpp, the he With C++20, the so-called spaceship-operator ```<=>``` is introduced. If that operator is supported, all the structs and classes in vulkan.hpp use the default implementation of it. As currently some implementations of this operator are very slow, and others seem to be incomplete, by defining ```VULKAN_HPP_NO_SPACESHIP_OPERATOR``` before including vulkan.hpp you can remove that operator from those structs and classes. +#### VULKAN_HPP_RAII_NO_EXCEPTIONS + +If both, VULKAN_HPP_NO_EXCEPTIONS and VULKAN_HPP_EXPECTED are defined, the vk::raii-classes don't throw exceptions. That is, the actual constructors are not available, but the creation-functions must be used. For more details have a look at the vk_raii_ProgrammingGuide.md. + #### VULKAN_HPP_STORAGE_API With this define you can specify whether the ```DispatchLoaderDynamic``` is imported or exported (see ```VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE```). If ```VULKAN_HPP_STORAGE_API``` is not defined externally, and ```VULKAN_HPP_STORAGE_SHARED``` is defined, depending on the ```VULKAN_HPP_STORAGE_SHARED_EXPORT``` being defined, ```VULKAN_HPP_STORAGE_API``` is either set to ```__declspec( dllexport )``` (for MSVC) / ```__attribute__( ( visibility( "default" ) ) )``` (for gcc or clang) or ```__declspec( dllimport )``` (for MSVC), respectively. For other compilers, you might specify the corresponding storage by defining ```VULKAN_HPP_STORAGE_API``` on your own. @@ -897,6 +905,10 @@ With this define you can specify whether the ```DispatchLoaderDynamic``` is impo 32-bit vulkan is not typesafe for non-dispatchable handles, so we don't allow copy constructors on this platform by default. To enable this feature on 32-bit platforms define ```VULKAN_HPP_TYPESAFE_CONVERSION```. +#### VULKAN_HPP_UNEXPECTED + +See ```VULKAN_HPP_EXPECTED```. + #### VULKAN_HPP_USE_REFLECT With this define you can include a reflection mechanism on the vk-structures. It adds a function ```reflect``` that returns a tuple-version of the structure. That tuple then could easily be iterated. But at least for now, that feature takes lots of compile-time resources, so currently it is recommended to enable that feature only if you're willing to pay that price. diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index a449c79..c3f3d82 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -443,6 +443,9 @@ void VulkanHppGenerator::generateHppFile() const std::cout << "VulkanHppGenerator: Generating " << vulkan_hpp << " ... " << std::endl; std::string const vulkanHppTemplate = R"(${licenseHeader} +#ifndef VULKAN_HPP +# define VULKAN_HPP + ${includes} static_assert( VK_HEADER_VERSION == ${headerVersion}, "Wrong VK_HEADER_VERSION!" ); @@ -583,15 +586,10 @@ void VulkanHppGenerator::generateRAIIHppFile() const #ifndef VULKAN_RAII_HPP #define VULKAN_RAII_HPP -#include #include // std::exchange, std::forward #include -#if !defined( VULKAN_HPP_RAII_NAMESPACE ) -# define VULKAN_HPP_RAII_NAMESPACE raii -#endif - -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) && !defined(VULKAN_HPP_NO_EXCEPTIONS) +#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) namespace VULKAN_HPP_NAMESPACE { namespace VULKAN_HPP_RAII_NAMESPACE @@ -608,6 +606,17 @@ namespace VULKAN_HPP_NAMESPACE # endif } + template + class CreateReturnType + { + public: +#if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + using Type = VULKAN_HPP_EXPECTED; +#else + using Type = T; +#endif + }; + ${RAIIDispatchers} ${RAIIHandles} ${RAIICommandDefinitions} @@ -801,7 +810,7 @@ export namespace VULKAN_HPP_NAMESPACE { ${usings} -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) && !defined( VULKAN_HPP_NO_EXCEPTIONS ) +#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) namespace VULKAN_HPP_RAII_NAMESPACE { ${raiiUsings} @@ -2708,13 +2717,14 @@ std::string VulkanHppGenerator::generateCallArgumentsEnhanced( CommandData const bool nonConstPointerAsNullptr, std::set const & singularParams, std::set const & templatedParams, - bool raiiHandleMemberFunction, + bool raii, + bool raiiFactory, CommandFlavourFlags flavourFlags ) const { assert( initialSkipCount <= commandData.params.size() ); std::string arguments; bool encounteredArgument = false; - if ( raiiHandleMemberFunction ) + if ( raii ) { switch ( initialSkipCount ) { @@ -2762,43 +2772,12 @@ std::string VulkanHppGenerator::generateCallArgumentsEnhanced( CommandData const { arguments += ", "; } - arguments += generateCallArgumentEnhanced( commandData.params, i, nonConstPointerAsNullptr, singularParams, templatedParams, flavourFlags ); + arguments += generateCallArgumentEnhanced( commandData.params, i, nonConstPointerAsNullptr, singularParams, templatedParams, flavourFlags, raiiFactory ); encounteredArgument = true; } return arguments; } -std::string VulkanHppGenerator::generateCallArgumentsRAIIFactory( std::vector const & params, - size_t initialSkipCount, - std::set const & skippedParams, - std::set const & singularParams ) const -{ - assert( initialSkipCount <= params.size() ); - std::string arguments = "*this"; - // skip the last parameter! - for ( size_t i = initialSkipCount; i < params.size() - 1; ++i ) - { - if ( !skippedParams.contains( i ) ) - { - std::string argument = params[i].name; - if ( !params[i].type.isValue() ) - { - argument = startLowerCase( stripPrefix( argument, "p" ) ); - if ( singularParams.contains( i ) ) - { - argument = stripPluralS( argument ); - } - } - else - { - assert( !singularParams.contains( i ) ); - } - arguments += ", " + argument; - } - } - return arguments; -} - std::string VulkanHppGenerator::generateCallArgumentsStandard( std::string const & handle, std::vector const & params ) const { std::string arguments; @@ -2848,7 +2827,8 @@ std::string VulkanHppGenerator::generateCallArgumentEnhanced( std::vector const & singularParams, std::set const & templatedParams, - CommandFlavourFlags flavourFlags ) const + CommandFlavourFlags flavourFlags, + bool raiiFactory ) const { std::string argument; ParamData const & param = params[paramIndex]; @@ -2865,7 +2845,7 @@ std::string VulkanHppGenerator::generateCallArgumentEnhanced( std::vector const & params, - size_t paramIndex, - std::set const & singularParams, - CommandFlavourFlags flavourFlags ) const +std::string VulkanHppGenerator::generateCallArgumentEnhancedValue( + std::vector const & params, size_t paramIndex, std::set const & singularParams, CommandFlavourFlags flavourFlags, bool raiiFactory ) const { std::string argument; ParamData const & param = params[paramIndex]; @@ -3012,6 +2990,18 @@ std::string VulkanHppGenerator::generateCallArgumentEnhancedValue( std::vector

name, "p" ) + "Type )"; } } + else if ( raiiFactory && m_handles.contains( param.type.type ) ) + { + assert( param.type.isValue() && param.lenExpression.empty() ); + if ( param.optional ) + { + argument = param.name + " ? static_cast<" + param.type.type + ">( **" + param.name + " ) : 0"; + } + else + { + argument = "static_cast<" + param.type.type + ">( *" + param.name + " )"; + } + } else { argument = "static_cast<" + param.type.compose( "" ) + ">( " + param.name + " )"; @@ -3086,7 +3076,8 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const & std::set const & templatedParams, std::vector const & chainedReturnParams, CommandFlavourFlags flavourFlags, - bool raii ) const + bool raii, + bool raiiFactory ) const { std::string dispatcher = raii ? "getDispatcher()->" : "d."; // if at least one returnParam is a size value of a vector param (and no singular params), we need two calls @@ -3100,10 +3091,11 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const & assert( std::any_of( returnParams.begin(), returnParams.end(), [&vectorParamIt]( size_t rp ) { return rp == vectorParamIt->first; } ) ); assert( std::any_of( returnParams.begin(), returnParams.end(), [&vectorParamIt]( size_t rp ) { return rp == vectorParamIt->second.lenParam; } ) ); - std::string firstCallArguments = generateCallArgumentsEnhanced( commandData, initialSkipCount, true, {}, templatedParams, raii, flavourFlags ); - std::string secondCallArguments = generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, templatedParams, raii, flavourFlags ); - std::string vectorName = startLowerCase( stripPrefix( commandData.params[vectorParamIt->first].name, "p" ) ); - std::string vectorSize = startLowerCase( stripPrefix( commandData.params[vectorParamIt->second.lenParam].name, "p" ) ); + std::string firstCallArguments = generateCallArgumentsEnhanced( commandData, initialSkipCount, true, {}, templatedParams, raii, raiiFactory, flavourFlags ); + std::string secondCallArguments = + generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, templatedParams, raii, raiiFactory, flavourFlags ); + std::string vectorName = startLowerCase( stripPrefix( commandData.params[vectorParamIt->first].name, "p" ) ); + std::string vectorSize = startLowerCase( stripPrefix( commandData.params[vectorParamIt->second.lenParam].name, "p" ) ); if ( ( flavourFlags & CommandFlavourFlagBits::chained ) && needsStructureChainResize( vectorParams, chainedReturnParams ) ) { @@ -3113,11 +3105,11 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const & if ( commandData.returnType == "VkResult" ) { - const std::string callSequenceTemplate = R"(VkResult result; + const std::string callSequenceTemplate = R"(VULKAN_HPP_NAMESPACE::Result result; do { - result = ${dispatcher}${vkCommand}( ${firstCallArguments} ); - if ( ( result == VK_SUCCESS ) && ${counterName} ) + result = static_cast( ${dispatcher}${vkCommand}( ${firstCallArguments} ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ${counterName} ) { structureChains.resize( ${counterName} ); ${vectorName}.resize( ${counterName} ); @@ -3125,9 +3117,9 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const & { ${vectorName}[i].pNext = structureChains[i].template get<${vectorElementType}>().pNext; } - result = ${dispatcher}${vkCommand}( ${secondCallArguments} ); + result = static_cast( ${dispatcher}${vkCommand}( ${secondCallArguments} ) ); } - } while ( result == VK_INCOMPLETE );)"; + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete );)"; return replaceWithMap( callSequenceTemplate, { { "counterName", startLowerCase( stripPrefix( commandData.params[vectorParamIt->second.lenParam].name, "p" ) ) }, @@ -3194,16 +3186,16 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const & case 2: { assert( ( commandData.successCodes[0] == "VK_SUCCESS" ) && ( commandData.successCodes[1] == "VK_INCOMPLETE" ) ); - std::string const callSequenceTemplate = R"(VkResult result; + std::string const callSequenceTemplate = R"(VULKAN_HPP_NAMESPACE::Result result; do { - result = ${dispatcher}${vkCommand}( ${firstCallArguments} ); - if ( ( result == VK_SUCCESS ) && ${counterName} ) + result = static_cast( ${dispatcher}${vkCommand}( ${firstCallArguments} ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ${counterName} ) { ${resizes} - result = ${dispatcher}${vkCommand}( ${secondCallArguments} ); + result = static_cast( ${dispatcher}${vkCommand}( ${secondCallArguments} ) ); } - } while ( result == VK_INCOMPLETE );)"; + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete );)"; return replaceWithMap( callSequenceTemplate, { { "counterName", startLowerCase( stripPrefix( commandData.params[vectorParamIt->second.lenParam].name, "p" ) ) }, @@ -3233,11 +3225,22 @@ std::string VulkanHppGenerator::generateCallSequence( std::string const & { "vkCommand", name } } ); } } + else if ( ( commandData.returnType == "VkResult" ) && ( ( 1 < commandData.successCodes.size() ) || !commandData.errorCodes.empty() ) ) + { + std::string const callSequenceTemplate = + R"(VULKAN_HPP_NAMESPACE::Result result = static_cast( ${dispatcher}${vkCommand}( ${callArguments} ) );)"; + + std::string callArguments = + generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParams, templatedParams, raii, raiiFactory, flavourFlags ); + + return replaceWithMap( callSequenceTemplate, { { "callArguments", callArguments }, { "dispatcher", dispatcher }, { "vkCommand", name } } ); + } else { std::string const callSequenceTemplate = R"(${resultAssignment}${dispatcher}${vkCommand}( ${callArguments} );)"; - std::string callArguments = generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParams, templatedParams, raii, flavourFlags ); + std::string callArguments = + generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParams, templatedParams, raii, raiiFactory, flavourFlags ); std::string resultAssignment = generateResultAssignment( commandData ); return replaceWithMap( @@ -3414,13 +3417,14 @@ std::string VulkanHppGenerator::generateCommandEnhanced( std::string const & std::string argumentTemplates = generateArgumentTemplates( commandData.params, returnParams, vectorParams, templatedParams, chainedReturnParams, false ); auto [allocatorTemplates, uniqueHandleAllocatorTemplates] = generateAllocatorTemplates( returnParams, dataTypes, vectorParams, chainedReturnParams, flavourFlags, definition ); - std::string typenameCheck = generateTypenameCheck( returnParams, vectorParams, chainedReturnParams, definition, dataTypes, flavourFlags ); - std::string nodiscard = generateNoDiscard( !returnParams.empty(), 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() ); - std::string returnType = generateReturnType( commandData, returnParams, vectorParams, flavourFlags, false, dataTypes ); - std::string className = initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : ""; - std::string classSeparator = commandData.handle.empty() ? "" : "::"; - std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, flavourFlags ); - std::string argumentList = generateArgumentListEnhanced( + std::string typenameCheck = generateTypenameCheck( returnParams, vectorParams, chainedReturnParams, definition, dataTypes, flavourFlags ); + std::string nodiscard = generateNoDiscard( !returnParams.empty(), 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() ); + std::string returnType = generateReturnType( returnParams, vectorParams, flavourFlags, false, dataTypes ); + std::string decoratedReturnType = generateDecoratedReturnType( commandData, returnParams, vectorParams, flavourFlags, false, returnType ); + std::string className = initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : ""; + std::string classSeparator = commandData.handle.empty() ? "" : "::"; + std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, flavourFlags ); + std::string argumentList = generateArgumentListEnhanced( commandData.params, returnParams, vectorParams, skippedParams, singularParams, templatedParams, chainedReturnParams, definition, flavourFlags, true ); std::string constString = commandData.handle.empty() ? "" : " const"; std::string noexceptString = generateNoExcept( commandData.errorCodes, returnParams, vectorParams, flavourFlags, vectorSizeCheck.first, false ); @@ -3436,12 +3440,13 @@ std::string VulkanHppGenerator::generateCommandEnhanced( std::string const & generateDataPreparation( commandData, initialSkipCount, returnParams, vectorParams, templatedParams, flavourFlags, enumerating ); std::string dataSizeChecks = generateDataSizeChecks( commandData, returnParams, dataTypes, vectorParams, templatedParams, singular ); std::string callSequence = generateCallSequence( - name, commandData, returnParams, vectorParams, initialSkipCount, singularParams, templatedParams, chainedReturnParams, flavourFlags, false ); + name, commandData, returnParams, vectorParams, initialSkipCount, singularParams, templatedParams, chainedReturnParams, flavourFlags, false, false ); std::string resultCheck = generateResultCheck( commandData, className, classSeparator, commandName, enumerating ); std::string returnStatement = generateReturnStatement( name, commandData, returnVariable, returnType, + decoratedReturnType, dataType, initialSkipCount, returnParams.empty() ? INVALID_INDEX : returnParams[0], @@ -3451,7 +3456,7 @@ std::string VulkanHppGenerator::generateCommandEnhanced( std::string const & std::string const functionTemplate = R"( template <${argumentTemplates}${allocatorTemplates}typename Dispatch${uniqueHandleAllocatorTemplates}${typenameCheck}> - ${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const}${noexcept} + ${nodiscard}VULKAN_HPP_INLINE ${decoratedReturnType} ${className}${classSeparator}${commandName}( ${argumentList} )${const}${noexcept} { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); ${vectorSizeCheck} @@ -3475,11 +3480,11 @@ ${vectorSizeCheck} { "dataDeclarations", dataDeclarations }, { "dataPreparation", dataPreparation }, { "dataSizeChecks", dataSizeChecks }, + { "decoratedReturnType", decoratedReturnType }, { "nodiscard", nodiscard }, { "noexcept", noexceptString }, { "resultCheck", resultCheck }, { "returnStatement", returnStatement }, - { "returnType", returnType }, { "typenameCheck", typenameCheck }, { "uniqueHandleAllocatorTemplates", uniqueHandleAllocatorTemplates }, { "vectorSizeCheck", vectorSizeCheckString } } ); @@ -3488,7 +3493,7 @@ ${vectorSizeCheck} { std::string const functionTemplate = R"( template <${argumentTemplates}${allocatorTemplates}typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${uniqueHandleAllocatorTemplates}${typenameCheck}> - ${nodiscard}${returnType} ${commandName}( ${argumentList} )${const}${noexcept};)"; + ${nodiscard}${decoratedReturnType} ${commandName}( ${argumentList} )${const}${noexcept};)"; return replaceWithMap( functionTemplate, { { "allocatorTemplates", allocatorTemplates }, @@ -3496,9 +3501,9 @@ ${vectorSizeCheck} { "argumentTemplates", argumentTemplates }, { "commandName", commandName }, { "const", commandData.handle.empty() ? "" : " const" }, + { "decoratedReturnType", decoratedReturnType }, { "nodiscard", nodiscard }, { "noexcept", noexceptString }, - { "returnType", returnType }, { "typenameCheck", typenameCheck }, { "uniqueHandleAllocatorTemplates", uniqueHandleAllocatorTemplates } } ); } @@ -5782,8 +5787,14 @@ std::string VulkanHppGenerator::generateDataDeclarations1Return( CommandData con if ( ( vectorParamIt == vectorParams.end() ) || ( flavourFlags & CommandFlavourFlagBits::singular ) ) { std::string const dataDeclarationsTemplate = R"(${returnType} ${returnVariable};)"; - - return replaceWithMap( dataDeclarationsTemplate, { { "returnType", dataType }, { "returnVariable", returnVariable } } ); + if ( dataType.starts_with( "VULKAN_HPP_NAMESPACE" ) ) + { + return replaceWithMap( dataDeclarationsTemplate, { { "returnType", dataType }, { "returnVariable", returnVariable } } ); + } + else + { + return replaceWithMap( dataDeclarationsTemplate, { { "returnType", returnType }, { "returnVariable", returnVariable } } ); + } } else { @@ -5823,7 +5834,7 @@ std::string VulkanHppGenerator::generateDataDeclarations2Returns( CommandData co CommandFlavourFlags flavourFlags, bool raii, std::vector const & dataTypes, - std::string const & dataType, + std::string const & returnType, std::string const & returnVariable ) const { bool chained = flavourFlags & CommandFlavourFlagBits::chained; @@ -5862,7 +5873,7 @@ std::string VulkanHppGenerator::generateDataDeclarations2Returns( CommandData co return replaceWithMap( dataDeclarationTemplate, { { "counterType", dataTypes[0] }, { "counterVariable", counterVariable }, - { "returnType", dataType }, + { "returnType", returnType }, { "returnVariable", returnVariable }, { "vectorAllocator", vectorAllocator } } ); } @@ -6214,6 +6225,64 @@ std::string VulkanHppGenerator::generateDebugReportObjectType( std::string const return ( valueIt == enumIt->second.values.end() ) ? "eUnknown" : generateEnumValueName( enumIt->first, valueIt->name, false ); } +std::string VulkanHppGenerator::generateDecoratedReturnType( CommandData const & commandData, + std::vector const & returnParams, + std::map const & vectorParams, + CommandFlavourFlags flavourFlags, + bool raii, + std::string const & returnType ) const +{ + bool chained = flavourFlags & CommandFlavourFlagBits::chained; +#if !defined( NDEBUG ) + bool unique = flavourFlags & CommandFlavourFlagBits::unique; +#endif + assert( !( chained && unique ) ); + + std::string decoratedReturnType; + if ( ( 1 < commandData.successCodes.size() ) && returnParams.empty() && !chained ) + { + assert( ( commandData.returnType == "VkResult" ) && !unique ); + decoratedReturnType = "VULKAN_HPP_NAMESPACE::Result"; + } + else if ( ( commandData.returnType != "VkResult" ) && ( commandData.returnType != "void" ) ) + { + assert( returnParams.empty() && !chained && !unique ); + if ( commandData.returnType.starts_with( "Vk" ) ) + { + decoratedReturnType = generateNamespacedType( commandData.returnType ); + } + else + { + decoratedReturnType = commandData.returnType; + } + } + else if ( ( commandData.returnType == "void" ) || + ( ( commandData.returnType == "VkResult" ) && ( commandData.successCodes.size() == 1 ) && ( commandData.errorCodes.empty() || raii ) ) ) + { + assert( !unique ); + assert( ( commandData.returnType != "void" ) || ( returnParams.size() <= 2 ) ); + decoratedReturnType = returnType; + } + else + { + assert( commandData.returnType == "VkResult" ); + assert( !commandData.successCodes.empty() && ( commandData.successCodes[0] == "VK_SUCCESS" ) ); + if ( ( 1 < commandData.successCodes.size() ) && ( ( returnParams.size() == 1 ) || ( ( returnParams.size() == 2 ) && vectorParams.empty() ) ) ) + { + assert( !commandData.errorCodes.empty() ); + decoratedReturnType = ( raii ? "std::pair"; + } + else + { + assert( + ( ( commandData.successCodes.size() == 1 ) || ( ( commandData.successCodes.size() == 2 ) && ( commandData.successCodes[1] == "VK_INCOMPLETE" ) ) ) && + ( returnParams.size() <= 3 ) ); + decoratedReturnType = raii ? returnType : ( "typename ResultValueType<" + returnType + ">::type" ); + } + } + return decoratedReturnType; +} + std::string VulkanHppGenerator::generateDispatchLoaderDynamic() const { const std::string dispatchLoaderDynamicTemplate = R"( @@ -7065,21 +7134,6 @@ std::string VulkanHppGenerator::generateExtensionTypeTest( std::string const & t return typeTest; } -std::string VulkanHppGenerator::generateFailureCheck( std::vector const & successCodes ) const -{ - assert( !successCodes.empty() ); - std::string failureCheck = "result != " + generateSuccessCode( successCodes[0] ); - if ( 1 < successCodes.size() ) - { - failureCheck = "( " + failureCheck + " )"; - for ( size_t i = 1; i < successCodes.size(); ++i ) - { - failureCheck += "&& ( result != " + generateSuccessCode( successCodes[i] ) + " )"; - } - } - return failureCheck; -} - std::string VulkanHppGenerator::generateFormatTraits() const { if ( m_formats.empty() ) @@ -8186,6 +8240,50 @@ ${deviceMembers} return str; } +std::string VulkanHppGenerator::generateRAIIFactoryReturnStatements( std::vector const & params, + std::vector const & successCodes, + std::string const & vkType, + bool enumerating, + std::string const & returnType, + std::string const & returnVariable, + bool singular ) const +{ + auto handleIt = m_handles.find( vkType ); + assert( handleIt != m_handles.end() ); + + if ( returnType.starts_with( "std::vector" ) ) + { + std::string const & returnTemplate = R"(${returnType} ${returnVariable}RAII; + ${returnVariable}RAII.reserve( ${returnVariable}.size() ); + for ( auto & ${element} : ${returnVariable} ) + { + ${returnVariable}RAII.emplace_back( *this, ${handleConstructorArguments}${successCodePassToElement} ); + } + return ${returnVariable}RAII; +)"; + std::string element = stripPluralS( returnVariable ); + std::string handleConstructorArguments = generateRAIIHandleSingularConstructorArguments( *handleIt, params, true ); + + assert( !successCodes.empty() ); + std::string successCodePassToElement = ( enumerating || ( successCodes.size() == 1 ) ) ? "" : ", result"; + + return replaceWithMap( returnTemplate, + { { "element", element }, + { "handleConstructorArguments", handleConstructorArguments }, + { "successCodePassToElement", successCodePassToElement }, + { "returnType", returnType }, + { "returnVariable", returnVariable } } ); + } + else + { + std::string const & returnTemplate = "return ${returnType}( *this, ${handleConstructorArguments} );"; + + std::string handleConstructorArguments = generateRAIIHandleSingularConstructorArguments( *handleIt, params, singular ); + + return replaceWithMap( returnTemplate, { { "returnType", returnType }, { "handleConstructorArguments", handleConstructorArguments } } ); + } +} + std::string VulkanHppGenerator::generateRAIIHandle( std::pair const & handle, std::set & listedHandles, std::set const & specialFunctions ) const @@ -8368,6 +8466,12 @@ ${enter} class ${handleType}s : public std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; ${leave} )"; @@ -8512,8 +8616,9 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandEnhanced( std::string c !returnParams.empty() || ( ( commandData.returnType != "VkResult" ) && ( commandData.returnType != "void" ) ), 1 < commandData.successCodes.size(), false ); std::pair>> vectorSizeCheck = needsVectorSizeCheck( commandData.params, vectorParams, returnParams, singularParams, skippedParams ); - std::string noexceptString = generateNoExcept( commandData.errorCodes, returnParams, vectorParams, flavourFlags, vectorSizeCheck.first, true ); - std::string returnType = generateReturnType( commandData, returnParams, vectorParams, flavourFlags, true, dataTypes ); + std::string noexceptString = generateNoExcept( commandData.errorCodes, returnParams, vectorParams, flavourFlags, vectorSizeCheck.first, true ); + std::string returnType = generateReturnType( returnParams, vectorParams, flavourFlags, true, dataTypes ); + std::string decoratedReturnType = generateDecoratedReturnType( commandData, returnParams, vectorParams, flavourFlags, true, returnType ); if ( definition ) { @@ -8534,7 +8639,7 @@ ${vectorSizeCheck} )"; std::string callSequence = generateCallSequence( - name, commandData, returnParams, vectorParams, initialSkipCount, singularParams, templatedParams, chainedReturnParams, flavourFlags, true ); + name, commandData, returnParams, vectorParams, initialSkipCount, singularParams, templatedParams, chainedReturnParams, flavourFlags, true, false ); std::string className = initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "Context"; std::string returnVariable = generateReturnVariable( commandData, returnParams, vectorParams, flavourFlags ); std::string dataDeclarations = @@ -8547,6 +8652,7 @@ ${vectorSizeCheck} commandData, returnVariable, returnType, + decoratedReturnType, dataType, initialSkipCount, returnParams.empty() ? INVALID_INDEX : returnParams[0], @@ -8554,7 +8660,7 @@ ${vectorSizeCheck} enumerating, true ); std::string vectorSizeCheckString = - vectorSizeCheck.first ? generateRAIIHandleVectorSizeCheck( name, commandData, initialSkipCount, vectorSizeCheck.second, skippedParams ) : ""; + vectorSizeCheck.first ? generateVectorSizeCheck( name, commandData, initialSkipCount, vectorSizeCheck.second, skippedParams, false ) : ""; return replaceWithMap( definitionTemplate, { { "argumentList", argumentList }, @@ -8570,7 +8676,7 @@ ${vectorSizeCheck} { "noexcept", noexceptString }, { "resultCheck", resultCheck }, { "returnStatement", returnStatement }, - { "returnType", returnType }, + { "returnType", decoratedReturnType }, { "vectorSizeCheck", vectorSizeCheckString } } ); } else @@ -8587,7 +8693,7 @@ ${vectorSizeCheck} { "commandName", commandName }, { "nodiscard", nodiscard }, { "noexcept", noexceptString }, - { "returnType", returnType } } ); + { "returnType", decoratedReturnType } } ); } } @@ -8599,54 +8705,74 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandFactory( std::string co bool definition, CommandFlavourFlags flavourFlags ) const { - bool singular = flavourFlags & CommandFlavourFlagBits::singular; - assert( isHandleType( commandData.params[returnParams.back()].type.type ) ); assert( ( returnParams.size() == 1 ) || ( ( returnParams.size() == 2 ) && ( vectorParams.size() == 1 ) && ( returnParams[0] == vectorParams.begin()->second.lenParam ) && ( returnParams[1] == vectorParams.begin()->first ) ) ); + assert( determineVoidPointerParams( commandData.params ).empty() ); + bool enumerating = determineEnumeration( vectorParams, returnParams ); + bool singular = flavourFlags & CommandFlavourFlagBits::singular; std::set skippedParams = determineSkippedParams( commandData.params, initialSkipCount, vectorParams, returnParams, singular ); std::set singularParams = singular ? determineSingularParams( returnParams.back(), vectorParams ) : std::set(); std::string argumentList = generateRAIIHandleCommandFactoryArgumentList( commandData.params, skippedParams, definition, singular ); std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, flavourFlags ); - std::string handleType = stripPostfix( commandData.params[returnParams.back()].type.compose( "VULKAN_HPP_RAII_NAMESPACE" ), " *" ); + std::string handleType = stripPostfix( commandData.params[returnParams.back()].type.compose( "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE" ), " *" ); + std::string noexceptString = enumerating ? "" : "VULKAN_HPP_RAII_CREATE_NOEXCEPT"; std::string returnType = handleType; if ( vectorParams.contains( returnParams.back() ) && !singular ) { - returnType = "std::vector<" + handleType + ">"; + noexceptString = ""; + returnType = "std::vector<" + handleType + ">"; handleType += "s"; } if ( definition ) { - std::string callArguments = generateCallArgumentsRAIIFactory( commandData.params, initialSkipCount, skippedParams, singularParams ); - std::string className = initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "Context"; + std::string callSequence = + generateCallSequence( name, commandData, returnParams, vectorParams, initialSkipCount, singularParams, {}, {}, flavourFlags, true, true ); + std::string className = initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "Context"; + std::vector dataTypes = determineDataTypes( commandData.params, vectorParams, returnParams, {} ); + std::string dataType = combineDataTypes( vectorParams, returnParams, enumerating, dataTypes, flavourFlags, true ); + std::string returnVariable = generateReturnVariable( commandData, returnParams, vectorParams, flavourFlags ); + std::string returnStatements = generateRAIIFactoryReturnStatements( + commandData.params, commandData.successCodes, commandData.params[returnParams.back()].type.type, enumerating, returnType, returnVariable, singular ); + std::string dataDeclarations = + generateDataDeclarations( commandData, returnParams, vectorParams, {}, flavourFlags, true, dataTypes, dataType, returnType, returnVariable ); + std::string vkType = commandData.params[returnParams.back()].type.type; + std::string resultCheck = generateResultCheckExpected( commandData.successCodes, className, commandName ); std::string const definitionTemplate = R"( - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ${returnType} ${className}::${commandName}( ${argumentList} ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType<${returnType}>::Type ${className}::${commandName}( ${argumentList} ) const ${noexcept} { - return ${handleType}( ${callArguments} ); + ${dataDeclarations} + ${callSequence} + ${resultCheck} + ${returnStatements} } )"; return replaceWithMap( definitionTemplate, { { "argumentList", argumentList }, - { "callArguments", callArguments }, + { "callSequence", callSequence }, { "className", className }, { "commandName", commandName }, - { "handleType", handleType }, + { "dataDeclarations", dataDeclarations }, + { "noexcept", noexceptString }, + { "resultCheck", resultCheck }, + { "returnStatements", returnStatements }, { "returnType", returnType } } ); } else { std::string const declarationTemplate = R"( - VULKAN_HPP_NODISCARD ${returnType} ${commandName}( ${argumentList} ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType<${returnType}>::Type ${commandName}( ${argumentList} ) const ${noexcept}; )"; - return replaceWithMap( declarationTemplate, { { "argumentList", argumentList }, { "commandName", commandName }, { "returnType", returnType } } ); + return replaceWithMap( declarationTemplate, + { { "argumentList", argumentList }, { "commandName", commandName }, { "noexcept", noexceptString }, { "returnType", returnType } } ); } } @@ -8712,13 +8838,12 @@ std::pair !isHandleType( constructorIt->second.params[vectorParams.begin()->first].type.type ) ) { std::string singularConstructor; - auto lenParamIt = constructorIt->second.params.begin() + vectorParams.begin()->second.lenParam; - auto handleParamIt = constructorIt->second.params.begin() + std::next( vectorParams.begin() )->first; + auto lenParamIt = constructorIt->second.params.begin() + vectorParams.begin()->second.lenParam; if ( !checkEquivalentSingularConstructor( handle.second.constructorIts, constructorIt, lenParamIt ) ) { - singularConstructor = generateRAIIHandleConstructorVectorSingular( handle, constructorIt, handleParamIt, enter, leave ); + singularConstructor = generateRAIIHandleConstructorByCall( handle, constructorIt, enter, leave, true, true ); } - return std::make_pair( singularConstructor, generateRAIIHandleConstructorVector( handle, constructorIt, handleParamIt, enter, leave ) ); + return std::make_pair( singularConstructor, generateRAIIHandleConstructorByCall( handle, constructorIt, enter, leave, true, false ) ); } } } @@ -8870,148 +8995,6 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorArguments( std::pai return arguments; } -std::string - VulkanHppGenerator::generateRAIIHandleConstructorCallArguments( std::pair const & handle, - std::map::const_iterator constructorIt, - bool nonConstPointerAsNullptr, - std::set const & singularParams, - bool allocatorIsMemberVariable ) const -{ - std::string arguments; - bool encounteredArgument = false; - size_t i = 0; - if ( skipLeadingGrandParent( handle ) ) - { - assert( ( 1 < constructorIt->second.params.size() ) && m_handles.contains( constructorIt->second.params[0].type.type ) && - m_handles.contains( constructorIt->second.params[1].type.type ) ); - arguments += "static_cast<" + constructorIt->second.params[0].type.type + ">( " + constructorIt->second.params[1].name + ".get" + - stripPrefix( constructorIt->second.params[0].type.type, "Vk" ) + "() )"; - encounteredArgument = true; - i = 1; - } - for ( ; i < constructorIt->second.params.size(); ++i ) - { - ParamData const & param = constructorIt->second.params[i]; - if ( encounteredArgument ) - { - arguments += ", "; - } - if ( param.type.type == handle.first ) - { - assert( param.type.isNonConstPointer() && param.arraySizes.empty() ); - if ( param.lenExpression.empty() || !singularParams.empty() ) - { - assert( !param.optional ); - assert( singularParams.empty() || ( param.lenExpression == constructorIt->second.params[*singularParams.begin()].name ) ); - std::string paramName = generateRAIIHandleConstructorParamName( handle.first, handle.second.destructorIt ); - arguments += "reinterpret_cast<" + handle.first + "*>( &m_" + paramName + " )"; - } - else if ( nonConstPointerAsNullptr ) - { - arguments += "nullptr"; - } - else - { - arguments += startLowerCase( stripPrefix( param.name, "p" ) ) + ".data()"; - } - } - else if ( param.type.type == "VkAllocationCallbacks" ) - { - assert( param.optional ); - if ( allocatorIsMemberVariable ) - { - arguments += "reinterpret_cast( m_allocator )"; - } - else - { - arguments += "reinterpret_cast(static_cast( allocator ) )"; - } - } - else if ( m_handles.contains( param.type.type ) ) - { - assert( param.type.isValue() && param.arraySizes.empty() && param.lenExpression.empty() ); - if ( param.optional ) - { - arguments += param.name + " ? static_cast<" + param.type.type + ">( **" + param.name + " ) : 0"; - } - else - { - arguments += "static_cast<" + param.type.type + ">( *" + param.name + " )"; - } - } - else - { - assert( !param.optional ); - arguments += generateCallArgumentEnhanced( constructorIt->second.params, i, nonConstPointerAsNullptr, singularParams, {}, {} ); - } - encounteredArgument = true; - } - return arguments; -} - -std::string VulkanHppGenerator::generateRAIIHandleConstructorEnumerate( std::pair const & handle, - std::map::const_iterator constructorIt, - std::vector::const_iterator handleParamIt, - std::vector::const_iterator lenParamIt, - std::string const & enter, - std::string const & leave ) const -{ - std::string handleConstructorArguments = generateRAIIHandleSingularConstructorArguments( handle, constructorIt ); - std::string handleType = stripPrefix( handle.first, "Vk" ); - std::string dispatcherType = hasParentHandle( handle.first, "VkDevice" ) ? "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher" - : "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher"; - - const std::string constructorTemplate = - R"( -${enter} ${handleType}s( ${constructorArguments} ) - { - ${dispatcherType} const * dispatcher = ${parentName}.getDispatcher(); - std::vector<${vectorElementType}> ${vectorName}; - ${counterType} ${counterName}; - VULKAN_HPP_NAMESPACE::Result result; - do - { - result = static_cast( dispatcher->${constructorCall}( ${firstCallArguments} ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ${counterName} ) - { - ${vectorName}.resize( ${counterName} ); - result = static_cast( dispatcher->${constructorCall}( ${secondCallArguments} ) ); - } - } 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} ) - { - this->emplace_back( ${parentName}, ${handleConstructorArguments} ); - } - } - else - { - detail::throwResultException( result, "${constructorCall}" ); - } - } -${leave})"; - - return replaceWithMap( constructorTemplate, - { { "constructorArguments", generateRAIIHandleConstructorArguments( handle, constructorIt, false, false ) }, - { "constructorCall", constructorIt->first }, - { "counterName", startLowerCase( stripPrefix( lenParamIt->name, "p" ) ) }, - { "counterType", lenParamIt->type.type }, - { "dispatcherType", dispatcherType }, - { "enter", enter }, - { "firstCallArguments", generateRAIIHandleConstructorCallArguments( handle, constructorIt, true, {}, true ) }, - { "handleConstructorArguments", handleConstructorArguments }, - { "handleName", startLowerCase( handleType ) }, - { "handleType", handleType }, - { "leave", leave }, - { "parentName", constructorIt->second.params.front().name }, - { "secondCallArguments", generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, {}, true ) }, - { "vectorElementType", handleParamIt->type.type }, - { "vectorName", startLowerCase( stripPrefix( handleParamIt->name, "p" ) ) } } ); -} - std::string VulkanHppGenerator::generateRAIIHandleConstructorInitializationList( std::pair const & handle, std::map::const_iterator constructorIt, @@ -9165,16 +9148,14 @@ std::pair VulkanHppGenerator::generateRAIIHandleConstr std::map vectorParams = determineVectorParams( constructorIt->second.params ); switch ( vectorParams.size() ) { - case 0: - return std::make_pair( generateRAIIHandleConstructorResultSingleSuccessWithErrors1Return0Vector( handle, constructorIt, enter, leave ), "" ); + case 0: return std::make_pair( generateRAIIHandleConstructorByCall( handle, constructorIt, enter, leave, false, false ), "" ); case 1: if ( returnParams[0] == vectorParams.begin()->first ) { if ( isLenByStructMember( constructorIt->second.params[vectorParams.begin()->first].lenExpression, constructorIt->second.params[vectorParams.begin()->second.lenParam] ) ) { - auto handleParamIt = constructorIt->second.params.begin() + returnParams[0]; - return std::make_pair( "", generateRAIIHandleConstructorVector( handle, constructorIt, handleParamIt, enter, leave ) ); + return std::make_pair( "", generateRAIIHandleConstructorByCall( handle, constructorIt, enter, leave, true, false ) ); } } break; @@ -9210,9 +9191,7 @@ std::pair VulkanHppGenerator::generateRAIIHandleConstr { assert( returnParams[1] == vectorParams.begin()->first ); assert( constructorIt->second.successCodes[1] == "VK_INCOMPLETE" ); - auto lenParamIt = constructorIt->second.params.begin() + returnParams[0]; - auto handleParamIt = constructorIt->second.params.begin() + returnParams[1]; - return std::make_pair( "", generateRAIIHandleConstructorEnumerate( handle, constructorIt, handleParamIt, lenParamIt, enter, leave ) ); + return std::make_pair( "", generateRAIIHandleConstructorByCall( handle, constructorIt, enter, leave, true, false ) ); } } } @@ -9239,62 +9218,83 @@ std::pair VulkanHppGenerator::generateRAIIHandleConstr return std::make_pair( "", "" ); } -std::string VulkanHppGenerator::generateRAIIHandleConstructorResultSingleSuccessWithErrors1Return0Vector( - std::pair const & handle, - std::map::const_iterator constructorIt, - std::string const & enter, - std::string const & leave ) const +std::string VulkanHppGenerator::generateRAIIHandleConstructorByCall( std::pair const & handle, + std::map::const_iterator constructorIt, + std::string const & enter, + std::string const & leave, + bool isPlural, + bool forceSingular ) const { auto [parentType, parentName] = getParentTypeAndName( handle ); - std::string getDispatcher = parentName + ".getDispatcher()"; - std::string dispatcherInitializer, dispatcherInit; - if ( ( handle.first != "VkInstance" ) && ( handle.first != "VkDevice" ) ) + size_t skipCount = 0; + if ( constructorIt->second.handle == constructorIt->second.params[skipCount].type.type ) { - dispatcherInitializer = "m_dispatcher( " + getDispatcher + " )"; + ++skipCount; } - else + if ( handle.second.parent == constructorIt->second.params[skipCount].type.type ) { - std::string handleType = stripPrefix( handle.first, "Vk" ); - dispatcherInit = "\n m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::" + handleType + "Dispatcher( " + parentName + - ".getDispatcher()->vkGet" + handleType + "ProcAddr, static_cast<" + handle.first + ">( m_" + startLowerCase( handleType ) + " ) ) );"; + ++skipCount; } + std::string constructorArguments = generateRAIIHandleConstructorArguments( handle, constructorIt, forceSingular, false ); + std::string createCall = generateCommandName( + constructorIt->first, constructorIt->second.params, skipCount, forceSingular ? CommandFlavourFlagBits::singular : CommandFlavourFlagBits() ); - std::string constructorArguments = generateRAIIHandleConstructorArguments( handle, constructorIt, false, false ); - - std::string callArguments = generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, {}, handle.second.destructorIt != m_commands.end() ); - - std::string initializationList = generateRAIIHandleConstructorInitializationList( handle, constructorIt, handle.second.destructorIt, false ); - if ( !initializationList.empty() && !dispatcherInitializer.empty() ) + std::string createArguments; + for ( size_t i = skipCount; i < constructorIt->second.params.size() - 1; ++i ) { - initializationList += ", "; + if ( constructorIt->second.params[i].type.isValue() || specialPointerTypes.contains( constructorIt->second.params[i].type.type ) ) + { + createArguments += constructorIt->second.params[i].name + ", "; + } + else if ( constructorIt->second.params[i].type.isConstPointer() ) + { + assert( constructorIt->second.params[i].lenParams.empty() || isPlural ); + if ( !constructorIt->second.params[i].lenParams.empty() ) + { + assert( constructorIt->second.params[i].lenParams.size() == 1 ); + std::string::size_type start = createArguments.find( constructorIt->second.params[i].lenParams[0].first ); + assert( start != std::string::npos ); + // remove the size/count argument, and its trailing ", " + createArguments.replace( start, constructorIt->second.params[i].lenParams[0].first.length() + 2, "" ); + } + std::string argument = startLowerCase( stripPrefix( constructorIt->second.params[i].name, "p" ) ); + if ( isPlural && forceSingular ) + { + argument = stripPluralS( argument ); + } + createArguments += argument + ", "; + } + else + { + // this is the count argument (by pointer) for an enumeration function -> skip it + } } + if ( !createArguments.empty() ) + { + createArguments = stripPostfix( createArguments, ", " ); + } + assert( constructorIt->second.params.back().type.type == handle.first ); const std::string constructorTemplate = R"( -${enter} ${handleType}( ${constructorArguments} ) - : ${initializationList}${dispatcherInitializer} +#if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +${enter} ${handleType}${plural}( ${constructorArguments} ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( ${getDispatcher}->${constructorCall}( ${callArguments} ) ); - if ( ${failureCheck} ) - { - detail::throwResultException( result, "${constructorCall}" ); - }${dispatcherInit} + *this = ${parentName}.${createCall}( ${createArguments} ); } -${leave})"; +${leave}#endif +)"; return replaceWithMap( constructorTemplate, - { { "callArguments", callArguments }, - { "constructorArguments", constructorArguments }, - { "constructorCall", constructorIt->first }, - { "dispatcherInitializer", dispatcherInitializer }, - { "dispatcherInit", dispatcherInit }, + { { "constructorArguments", constructorArguments }, + { "createArguments", createArguments }, + { "createCall", createCall }, { "enter", enter }, - { "failureCheck", generateFailureCheck( constructorIt->second.successCodes ) }, - { "getDispatcher", getDispatcher }, { "leave", leave }, { "handleType", stripPrefix( handle.first, "Vk" ) }, - { "initializationList", initializationList } } ); + { "plural", isPlural && !forceSingular ? "s" : "" }, + { "parentName", parentName } } ); } std::string VulkanHppGenerator::generateRAIIHandleConstructorTakeOwnership( std::pair const & handle ) const @@ -9354,135 +9354,6 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorTakeOwnership( std: { "initializationList", initializationList } } ); } -std::string VulkanHppGenerator::generateRAIIHandleConstructorVector( std::pair const & handle, - std::map::const_iterator constructorIt, - std::vector::const_iterator handleParamIt, - std::string const & enter, - std::string const & leave ) const -{ - std::string vectorSize; - auto lenIt = std::find_if( constructorIt->second.params.begin(), - constructorIt->second.params.end(), - [&handleParamIt]( ParamData const & pd ) { return pd.name == handleParamIt->lenExpression; } ); - if ( lenIt == constructorIt->second.params.end() ) - { - std::vector lenParts = tokenize( handleParamIt->lenExpression, "->" ); - assert( lenParts.size() == 2 ); - lenIt = std::find_if( - constructorIt->second.params.begin(), constructorIt->second.params.end(), [&lenParts]( ParamData const & pd ) { return pd.name == lenParts[0]; } ); -#if !defined( NDEBUG ) - assert( lenIt != constructorIt->second.params.end() ); - auto structureIt = m_structs.find( lenIt->type.type ); - assert( structureIt != m_structs.end() ); - assert( isStructMember( lenParts[1], structureIt->second.members ) ); - assert( constructorIt->second.successCodes.size() == 1 ); -#endif - vectorSize = startLowerCase( stripPrefix( lenParts[0], "p" ) ) + "." + lenParts[1]; - } - else - { - auto arrayIt = - std::find_if( constructorIt->second.params.begin(), - constructorIt->second.params.end(), - [&lenIt, &handleParamIt]( ParamData const & pd ) { return ( pd.lenExpression == lenIt->name ) && ( pd.name != handleParamIt->name ); } ); - assert( arrayIt != constructorIt->second.params.end() ); - vectorSize = startLowerCase( stripPrefix( arrayIt->name, "p" ) ) + ".size()"; - } - - std::string handleConstructorArguments = generateRAIIHandleSingularConstructorArguments( handle, constructorIt ); - std::string handleType = stripPrefix( handle.first, "Vk" ); - std::string successCodePassToElement = ( 1 < constructorIt->second.successCodes.size() ) ? ", result" : ""; - - const std::string constructorTemplate = - R"( -${enter} ${handleType}s( ${constructorArguments} ) - { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = ${parentName}.getDispatcher(); - std::vector<${vectorElementType}> ${vectorName}( ${vectorSize} ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->${constructorCall}( ${callArguments} ) ); - if ( ${successCheck} ) - { - this->reserve( ${vectorSize} ); - for ( auto const & ${handleName} : ${vectorName} ) - { - this->emplace_back( ${parentName}, ${handleConstructorArguments}${successCodePassToElement} ); - } - } - else - { - detail::throwResultException( result, "${constructorCall}" ); - } - } -${leave})"; - - return replaceWithMap( constructorTemplate, - { { "callArguments", generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, {}, false ) }, - { "constructorArguments", generateRAIIHandleConstructorArguments( handle, constructorIt, false, false ) }, - { "constructorCall", constructorIt->first }, - { "enter", enter }, - { "handleConstructorArguments", handleConstructorArguments }, - { "handleName", startLowerCase( handleType ) }, - { "handleType", handleType }, - { "leave", leave }, - { "parentName", constructorIt->second.params.front().name }, - { "successCheck", generateSuccessCheck( constructorIt->second.successCodes ) }, - { "successCodePassToElement", successCodePassToElement }, - { "vectorElementType", handleParamIt->type.type }, - { "vectorName", startLowerCase( stripPrefix( handleParamIt->name, "p" ) ) }, - { "vectorSize", vectorSize } } ); -} - -std::string - VulkanHppGenerator::generateRAIIHandleConstructorVectorSingular( std::pair const & handle, - std::map::const_iterator constructorIt, - std::vector::const_iterator handleParamIt, - std::string const & enter, - std::string const & leave ) const -{ - size_t returnParam = static_cast( std::distance( constructorIt->second.params.begin(), handleParamIt ) ); - std::map vectorParams = determineVectorParams( constructorIt->second.params ); - std::set singularParams = determineSingularParams( returnParam, vectorParams ); - - std::string callArguments = generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, singularParams, true ); - std::string initializationList = generateRAIIHandleConstructorInitializationList( handle, constructorIt, handle.second.destructorIt, false ); - assert( !initializationList.empty() ); - std::string resultVariable = "VULKAN_HPP_NAMESPACE::Result result"; - std::string failureCheck = generateFailureCheck( constructorIt->second.successCodes ); - std::string result = "result"; - if ( isMultiSuccessCodeConstructor( handle.second.constructorIts ) ) - { - resultVariable = "m_constructorSuccessCode"; - failureCheck = std::regex_replace( failureCheck, std::regex( "result" ), "m_constructorSuccessCode" ); - result = "m_constructorSuccessCode"; - } - - const std::string singularConstructorTemplate = - R"( -${enter} ${handleType}( ${constructorArguments} ) - : ${initializationList}, m_dispatcher( ${firstArgument}.getDispatcher() ) - { - ${resultVariable} = static_cast( getDispatcher()->${constructorCall}( ${callArguments} ) ); - if ( ${failureCheck} ) - { - detail::throwResultException( ${result}, "${constructorCall}" ); - } - } -${leave})"; - - return replaceWithMap( singularConstructorTemplate, - { { "initializationList", initializationList }, - { "callArguments", callArguments }, - { "constructorArguments", generateRAIIHandleConstructorArguments( handle, constructorIt, true, false ) }, - { "constructorCall", constructorIt->first }, - { "enter", enter }, - { "firstArgument", constructorIt->second.params[0].name }, - { "failureCheck", failureCheck }, - { "leave", leave }, - { "handleType", stripPrefix( handle.first, "Vk" ) }, - { "result", result }, - { "resultVariable", resultVariable } } ); -} - std::pair VulkanHppGenerator::generateRAIIHandleConstructorVoid( std::pair const & handle, std::map::const_iterator constructorIt, std::string const & enter, @@ -9496,46 +9367,12 @@ std::pair VulkanHppGenerator::generateRAIIHandleConstr std::map vectorParams = determineVectorParams( constructorIt->second.params ); if ( vectorParams.empty() ) { - return std::make_pair( generateRAIIHandleConstructorVoid1Return0Vector( handle, constructorIt, enter, leave ), "" ); + return std::make_pair( generateRAIIHandleConstructorByCall( handle, constructorIt, enter, leave, false, false ), "" ); } } return std::make_pair( "", "" ); } -std::string - VulkanHppGenerator::generateRAIIHandleConstructorVoid1Return0Vector( std::pair const & handle, - std::map::const_iterator constructorIt, - std::string const & enter, - std::string const & leave ) const -{ - std::string callArguments = generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, {}, true ); - std::string constructorArguments = generateRAIIHandleConstructorArguments( handle, constructorIt, false, false ); - std::string initializationList = generateRAIIHandleConstructorInitializationList( handle, constructorIt, handle.second.destructorIt, false ); - if ( !initializationList.empty() ) - { - initializationList += ", "; - } - - const std::string constructorTemplate = - R"( -${enter} ${handleType}( ${constructorArguments} ) - : ${initializationList}m_dispatcher( ${firstArgument}.getDispatcher() ) - { - getDispatcher()->${constructorCall}( ${callArguments} ); - } -${leave})"; - - return replaceWithMap( constructorTemplate, - { { "callArguments", callArguments }, - { "constructorArguments", constructorArguments }, - { "constructorCall", constructorIt->first }, - { "enter", enter }, - { "firstArgument", constructorIt->second.params[0].name }, - { "leave", leave }, - { "handleType", stripPrefix( handle.first, "Vk" ) }, - { "initializationList", initializationList } } ); -} - std::string VulkanHppGenerator::generateRAIIHandleContext( std::pair const & handle, std::set const & specialFunctions ) const { @@ -9861,10 +9698,17 @@ ${raiiHandles} return replaceWithMap( raiiHandlesTemplate, { { "forwardDeclarations", forwardDeclarations }, { "raiiHandles", raiiHandles } } ); } -std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( std::pair const & handle, - std::map::const_iterator constructorIt ) const +std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( std::pair const & handle, + std::vector const & params, + bool singular ) const { - std::string arguments = startLowerCase( stripPrefix( handle.first, "Vk" ) ); + std::string arguments = startLowerCase( stripPrefix( params.back().name, "p" ) ); + if ( singular ) + { + arguments = stripPluralS( arguments ); + } + assert( params.back().type.type.starts_with( "Vk" ) ); + arguments = "*reinterpret_cast<" + params.back().type.type + " *>( &" + arguments + " )"; if ( handle.second.destructorIt != m_commands.end() ) { auto [parentType, parentName] = getParentTypeAndName( handle ); @@ -9876,9 +9720,7 @@ std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( handle.second.destructorIt->second.params.end(), [&destructorParam]( ParamData const & pd ) { return pd.lenExpression == destructorParam.name; } ) ) { - if ( std::any_of( constructorIt->second.params.begin(), - constructorIt->second.params.end(), - [&destructorParam]( ParamData const & pd ) { return pd.type.type == destructorParam.type.type; } ) ) + if ( std::any_of( params.begin(), params.end(), [&destructorParam]( ParamData const & pd ) { return pd.type.type == destructorParam.type.type; } ) ) { if ( isHandleType( destructorParam.type.type ) ) { @@ -9896,9 +9738,9 @@ std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( #if !defined( NDEBUG ) bool found = false; #endif - for ( auto const & constructorParam : constructorIt->second.params ) + for ( auto const & param : params ) { - auto structureIt = m_structs.find( constructorParam.type.type ); + auto structureIt = m_structs.find( param.type.type ); if ( structureIt != m_structs.end() ) { auto memberIt = findStructMemberItByType( destructorParam.type.type, structureIt->second.members ); @@ -9907,8 +9749,8 @@ std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( #if !defined( NDEBUG ) found = true; #endif - assert( !constructorParam.type.isValue() ); - std::string argument = startLowerCase( stripPrefix( constructorParam.name, "p" ) ) + "." + memberIt->name; + assert( !param.type.isValue() ); + std::string argument = startLowerCase( stripPrefix( param.name, "p" ) ) + "." + memberIt->name; if ( isHandleType( memberIt->type.type ) ) { argument = "static_cast<" + memberIt->type.type + ">( " + argument + " )"; @@ -9926,107 +9768,6 @@ std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( return arguments; } -std::string VulkanHppGenerator::generateRAIIHandleVectorSizeCheck( std::string const & name, - CommandData const & commandData, - size_t initialSkipCount, - std::map> const & countToVectorMap, - std::set const & skippedParams ) const -{ - std::string const throwTemplate = - R"#( if ( ${zeroSizeCheck}${firstVectorName}.size() != ${secondVectorName}.size() ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}: ${firstVectorName}.size() != ${secondVectorName}.size()" ); - })#"; - - std::string const throwTemplateVoid = - R"#( if ( ${zeroSizeCheck}${firstVectorName}.size() * sizeof( ${firstDataType} ) != ${secondVectorName}.size() * sizeof( ${secondDataType} ) ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}: ${firstVectorName}.size() * sizeof( ${firstDataType} ) != ${secondVectorName}.size() * sizeof( ${secondDataType} )" ); - })#"; - - std::string const throwTemplateSingle = R"#( if ( ${vectorName}.size() != ${sizeValue} ) - { - throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}: ${vectorName}.size() != ${sizeValue}" ); - })#"; - - std::string className = stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ); - std::string commandName = generateCommandName( name, commandData.params, initialSkipCount ); - - std::string sizeChecks; - for ( auto const & cvm : countToVectorMap ) - { - size_t defaultStartIndex = determineDefaultStartIndex( commandData.params, skippedParams ); - std::string firstVectorName = startLowerCase( stripPrefix( commandData.params[cvm.second[0]].name, "p" ) ); - - if ( cvm.second.size() == 1 ) - { - std::string sizeValue; - if ( isLenByStructMember( commandData.params[cvm.second[0]].lenExpression, commandData.params[cvm.first] ) ) - { - std::vector lenParts = tokenize( commandData.params[cvm.second[0]].lenExpression, "->" ); - assert( lenParts.size() == 2 ); - sizeValue = startLowerCase( stripPrefix( lenParts[0], "p" ) ) + "." + lenParts[1]; - } - else - { - assert( !commandData.params[cvm.second[0]].lenParams.empty() ); - if ( commandData.params[cvm.first].type.type == "VkSampleCountFlagBits" ) - { - assert( commandData.params[cvm.second[0]].lenExpression == "(" + commandData.params[cvm.second[0]].lenParams[0].first + " + 31) / 32" ); - sizeValue = "( static_cast( " + commandData.params[cvm.second[0]].lenParams[0].first + " ) + 31 ) / 32"; - } - else - { - sizeValue = commandData.params[cvm.second[0]].lenExpression; - } - } - sizeChecks += replaceWithMap( - throwTemplateSingle, { { "className", className }, { "commandName", commandName }, { "sizeValue", sizeValue }, { "vectorName", firstVectorName } } ); - } - else - { - for ( size_t i = 1; i < cvm.second.size(); i++ ) - { - std::string secondVectorName = startLowerCase( stripPrefix( commandData.params[cvm.second[i]].name, "p" ) ); - bool withZeroSizeCheck = commandData.params[cvm.second[i]].optional && ( defaultStartIndex <= cvm.second[i] ); - if ( commandData.params[cvm.second[0]].type.type == "void" ) - { - assert( commandData.params[cvm.second[i]].type.type == "void" ); - std::string firstDataType = stripPrefix( commandData.params[cvm.second[0]].name, "p" ) + "Type"; - std::string secondDataType = stripPrefix( commandData.params[cvm.second[i]].name, "p" ) + "Type"; - sizeChecks += replaceWithMap( throwTemplateVoid, - { { "firstDataType", firstDataType }, - { "firstVectorName", firstVectorName }, - { "className", className }, - { "commandName", commandName }, - { "secondDataType", secondDataType }, - { "secondVectorName", secondVectorName }, - { "zeroSizeCheck", withZeroSizeCheck ? ( "!" + secondVectorName + ".empty() && " ) : "" } } ); - } - else - { - sizeChecks += replaceWithMap( throwTemplate, - { { "firstVectorName", firstVectorName }, - { "className", className }, - { "commandName", commandName }, - { "secondVectorName", secondVectorName }, - { "zeroSizeCheck", withZeroSizeCheck ? ( "!" + secondVectorName + ".empty() && " ) : "" } } ); - } - if ( i + 1 < cvm.second.size() ) - { - sizeChecks += "\n"; - } - } - } - } - if ( !sizeChecks.empty() ) - { - sizeChecks += "\n"; - } - - return sizeChecks; -} - template std::string VulkanHppGenerator::generateReplacedExtensionsList( Predicate p, Extraction e ) const { @@ -10074,7 +9815,7 @@ std::string VulkanHppGenerator::generateResultCheck( std::string successCodeList = generateSuccessCodeList( commandData.successCodes, enumerating ); std::string const resultCheckTemplate = - R"(resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::${className}${classSeparator}${commandName}"${successCodeList} );)"; + R"(resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::${className}${classSeparator}${commandName}"${successCodeList} );)"; resultCheck = replaceWithMap( resultCheckTemplate, @@ -10083,6 +9824,38 @@ std::string VulkanHppGenerator::generateResultCheck( return resultCheck; } +std::string VulkanHppGenerator::generateResultCheckExpected( std::vector const & successCodes, + std::string const & className, + std::string const & commandName ) const +{ + std::string resultCheck; + if ( !successCodes.empty() ) + { + std::string condition = "result != " + generateSuccessCode( successCodes[0] ); + if ( 1 < successCodes.size() ) + { + condition = "( " + condition + " )"; + for ( size_t i = 1; i < successCodes.size(); ++i ) + { + condition += " && ( result != " + generateSuccessCode( successCodes[i] ) + " )"; + } + } + + std::string const resultCheckTemplate = R"(if ( ${condition} ) +{ +#if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +#else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "${className}::${commandName}" ); +#endif +} +)"; + + resultCheck = replaceWithMap( resultCheckTemplate, { { "className", className }, { "commandName", commandName }, { "condition", condition } } ); + } + return resultCheck; +} + // Intended only for `enum class Result`! std::string VulkanHppGenerator::generateResultExceptions() const { @@ -10121,6 +9894,7 @@ std::string VulkanHppGenerator::generateReturnStatement( std::string const & com CommandData const & commandData, std::string const & returnVariable, std::string const & returnType, + std::string const & decoratedReturnType, std::string const & dataType, size_t initialSkipCount, size_t returnParam, @@ -10148,26 +9922,27 @@ std::string VulkanHppGenerator::generateReturnStatement( std::string const & com if ( returnVariable.empty() ) { assert( !unique ); - returnStatement = "return createResultValueType( static_cast( result ) );"; + returnStatement = "return createResultValueType( result );"; } else if ( unique ) { assert( returnParam != INVALID_INDEX ); - returnStatement = "return createResultValueType( static_cast( result ), "; + returnStatement = "return createResultValueType( result, "; if ( dataType.starts_with( "std::" ) ) { returnStatement += "std::move( unique" + startUpperCase( returnVariable ) + " )"; } else { - returnStatement += "UniqueHandle<" + dataType + ", Dispatch>( " + returnVariable + ", " + - generateObjectDeleter( commandName, commandData, initialSkipCount, returnParam ) + " )"; + assert( dataType.starts_with( "VULKAN_HPP_NAMESPACE::" ) ); + returnStatement += + returnType + "( " + returnVariable + ", " + generateObjectDeleter( commandName, commandData, initialSkipCount, returnParam ) + " )"; } returnStatement += " );"; } else { - returnStatement = "return createResultValueType( static_cast( result ), " + returnVariable + " );"; + returnStatement = "return createResultValueType( result, " + returnVariable + " );"; } } } @@ -10181,8 +9956,8 @@ std::string VulkanHppGenerator::generateReturnStatement( std::string const & com else if ( unique ) { assert( returnParam != INVALID_INDEX ); - assert( returnType.starts_with( "ResultValue<" ) && returnType.ends_with( ">" ) ); - returnStatement = "return " + returnType + "( static_cast( result ), "; + assert( decoratedReturnType.starts_with( "ResultValue<" ) && decoratedReturnType.ends_with( ">" ) ); + returnStatement = "return " + decoratedReturnType + "( static_cast( result ), "; if ( dataType.starts_with( "std::" ) ) { returnStatement += "std::move( unique" + startUpperCase( returnVariable ) + " )"; @@ -10196,9 +9971,9 @@ std::string VulkanHppGenerator::generateReturnStatement( std::string const & com } else { - assert( returnType.starts_with( raii ? "std::pair" ) ); + assert( decoratedReturnType.starts_with( raii ? "std::pair" ) ); returnStatement = - "return " + ( raii ? "std::make_pair" : returnType ) + "( static_cast( result ), " + returnVariable + " );"; + "return " + ( raii ? "std::make_pair" : decoratedReturnType ) + "( static_cast( result ), " + returnVariable + " );"; } } } @@ -10220,8 +9995,7 @@ std::string VulkanHppGenerator::generateReturnStatement( std::string const & com return returnStatement; } -std::string VulkanHppGenerator::generateReturnType( CommandData const & commandData, - std::vector const & returnParams, +std::string VulkanHppGenerator::generateReturnType( std::vector const & returnParams, std::map const & vectorParams, CommandFlavourFlags flavourFlags, bool raii, @@ -10233,38 +10007,40 @@ std::string VulkanHppGenerator::generateReturnType( CommandData const & bool unique = flavourFlags & CommandFlavourFlagBits::unique; assert( !( chained && unique ) ); - std::string dataType; + std::string returnType; switch ( returnParams.size() ) { - case 0: dataType = "void"; break; + case 0: returnType = "void"; break; case 1: if ( chained ) { assert( vectorParams.empty() ); - assert( isStructureChainAnchor( commandData.params[returnParams[0]].type.type ) ); - dataType = "VULKAN_HPP_NAMESPACE::StructureChain"; + returnType = "VULKAN_HPP_NAMESPACE::StructureChain"; } else if ( unique ) { - assert( isHandleType( commandData.params[returnParams[0]].type.type ) ); if ( vectorParams.contains( returnParams[0] ) && !singular ) { - dataType = "std::vector, " + stripPrefix( dataTypes[0], "VULKAN_HPP_NAMESPACE::" ) + "Allocator>"; + returnType = "std::vector, " + stripPrefix( dataTypes[0], "VULKAN_HPP_NAMESPACE::" ) + "Allocator>"; } else { - dataType = "UniqueHandle<" + dataTypes[0] + ", Dispatch>"; + returnType = "UniqueHandle<" + dataTypes[0] + ", Dispatch>"; } } else { if ( vectorParams.contains( returnParams[0] ) && !singular ) { - dataType = "std::vector<" + dataTypes[0] + ( raii ? "" : ( ", " + stripPrefix( dataTypes[0], "VULKAN_HPP_NAMESPACE::" ) + "Allocator" ) ) + ">"; + returnType = "std::vector<" + dataTypes[0] + ( raii ? "" : ( ", " + stripPrefix( dataTypes[0], "VULKAN_HPP_NAMESPACE::" ) + "Allocator" ) ) + ">"; + } + else if ( dataTypes[0].starts_with( "Vk" ) ) + { + returnType = "VULKAN_HPP_NAMESPACE::" + stripPrefix( dataTypes[0], "Vk" ); } else { - dataType = dataTypes[0]; + returnType = dataTypes[0]; } } break; @@ -10276,8 +10052,7 @@ std::string VulkanHppGenerator::generateReturnType( CommandData const & auto vectorIt = vectorParams.find( returnParams[1] ); #endif assert( ( vectorIt != vectorParams.end() ) && ( vectorIt->second.lenParam == returnParams[0] ) ); - assert( isStructureChainAnchor( commandData.params[returnParams[1]].type.type ) ); - dataType = std::string( "std::vector"; + returnType = std::string( "std::vector"; } else { @@ -10285,23 +10060,31 @@ std::string VulkanHppGenerator::generateReturnType( CommandData const & { if ( singular ) { - dataType = "std::pair<" + dataTypes[0] + ", " + dataTypes[1] + ">"; + returnType = "std::pair<" + dataTypes[0] + ", " + dataTypes[1] + ">"; } else { - dataType = + returnType = "std::pair, " + dataTypes[1] + ">"; } } else if ( vectorParams.contains( returnParams[1] ) ) { assert( vectorParams.find( returnParams[1] )->second.lenParam == returnParams[0] ); - dataType = "std::vector<" + dataTypes[1] + - ( raii ? "" : ( ", " + startUpperCase( stripPrefix( dataTypes[1], "VULKAN_HPP_NAMESPACE::" ) ) + "Allocator" ) ) + ">"; + if ( dataTypes[1].starts_with( "Vk" ) ) + { + std::string type = stripPrefix( dataTypes[1], "Vk" ); + returnType = "std::vector"; + } + else + { + returnType = "std::vector<" + dataTypes[1] + + ( raii ? "" : ( ", " + startUpperCase( stripPrefix( dataTypes[1], "VULKAN_HPP_NAMESPACE::" ) ) + "Allocator" ) ) + ">"; + } } else { - dataType = "std::pair<" + dataTypes[0] + ", " + dataTypes[1] + ">"; + returnType = "std::pair<" + dataTypes[0] + ", " + dataTypes[1] + ">"; } } break; @@ -10315,8 +10098,8 @@ std::string VulkanHppGenerator::generateReturnType( CommandData const & assert( ( vectorIt != vectorParams.end() ) && ( vectorIt->second.lenParam == returnParams[1] ) ); assert( !vectorParams.contains( returnParams[0] ) ); #endif - dataType = "std::pair, std::vector<" + dataTypes[2] + - ( raii ? "" : ( ", " + startUpperCase( dataTypes[2] ) + "Allocator" ) ) + ">>"; + returnType = "std::pair, std::vector<" + dataTypes[2] + + ( raii ? "" : ( ", " + startUpperCase( dataTypes[2] ) + "Allocator" ) ) + ">>"; } else { @@ -10328,8 +10111,9 @@ std::string VulkanHppGenerator::generateReturnType( CommandData const & vectorIt = vectorParams.find( returnParams[2] ); assert( ( vectorIt != vectorParams.end() ) && ( vectorIt->second.lenParam == returnParams[0] ) ); #endif - dataType = "std::pair, std::vector<" + dataTypes[2] + ( raii ? "" : ( ", " + stripPrefix( dataTypes[2], "VULKAN_HPP_NAMESPACE::" ) + "Allocator" ) ) + ">>"; + returnType = "std::pair, std::vector<" + dataTypes[2] + + ( raii ? "" : ( ", " + stripPrefix( dataTypes[2], "VULKAN_HPP_NAMESPACE::" ) + "Allocator" ) ) + ">>"; } else { @@ -10338,56 +10122,14 @@ std::string VulkanHppGenerator::generateReturnType( CommandData const & assert( ( vectorIt != vectorParams.end() ) && ( vectorIt->second.lenParam == returnParams[1] ) ); assert( !vectorParams.contains( returnParams[0] ) ); #endif - dataType = "std::pair<" + dataTypes[0] + ", std::vector<" + dataTypes[2] + - ( raii ? "" : ( ", " + startUpperCase( stripPrefix( dataTypes[2], "VULKAN_HPP_NAMESPACE::" ) ) + "Allocator" ) ) + ">>"; + returnType = "std::pair<" + dataTypes[0] + ", std::vector<" + dataTypes[2] + + ( raii ? "" : ( ", " + startUpperCase( stripPrefix( dataTypes[2], "VULKAN_HPP_NAMESPACE::" ) ) + "Allocator" ) ) + ">>"; } } break; default: assert( false ); } - std::string returnType; - if ( ( 1 < commandData.successCodes.size() ) && returnParams.empty() && !chained ) - { - assert( ( commandData.returnType == "VkResult" ) && !unique ); - returnType = "VULKAN_HPP_NAMESPACE::Result"; - } - else if ( ( commandData.returnType != "VkResult" ) && ( commandData.returnType != "void" ) ) - { - assert( returnParams.empty() && !chained && !unique ); - if ( commandData.returnType.starts_with( "Vk" ) ) - { - returnType = generateNamespacedType( commandData.returnType ); - } - else - { - returnType = commandData.returnType; - } - } - else if ( ( commandData.returnType == "void" ) || - ( ( commandData.returnType == "VkResult" ) && ( commandData.successCodes.size() == 1 ) && ( commandData.errorCodes.empty() || raii ) ) ) - { - assert( !unique ); - assert( ( commandData.returnType != "void" ) || ( returnParams.size() <= 2 ) ); - returnType = dataType; - } - else - { - assert( commandData.returnType == "VkResult" ); - assert( !commandData.successCodes.empty() && ( commandData.successCodes[0] == "VK_SUCCESS" ) ); - if ( ( 1 < commandData.successCodes.size() ) && ( ( returnParams.size() == 1 ) || ( ( returnParams.size() == 2 ) && vectorParams.empty() ) ) ) - { - assert( !commandData.errorCodes.empty() ); - returnType = ( raii ? "std::pair"; - } - else - { - assert( - ( ( commandData.successCodes.size() == 1 ) || ( ( commandData.successCodes.size() == 2 ) && ( commandData.successCodes[1] == "VK_INCOMPLETE" ) ) ) && - ( returnParams.size() <= 3 ) ); - returnType = raii ? dataType : ( "typename ResultValueType<" + dataType + ">::type" ); - } - } return returnType; } @@ -11682,7 +11424,7 @@ std::string VulkanHppGenerator::generateTypenameCheck( std::vector const ( ( flavourFlags & CommandFlavourFlagBits::chained ) && std::any_of( chainedReturnParams.begin(), chainedReturnParams.end(), [&returnParams, i]( size_t crp ) { return crp == returnParams[i]; } ) ) ? "StructureChain" - : stripPrefix( dataTypes[i], "VULKAN_HPP_NAMESPACE::" ); + : dataTypes[i]; std::string extendedElementType = elementType; if ( flavourFlags & CommandFlavourFlagBits::unique ) { @@ -11695,7 +11437,7 @@ std::string VulkanHppGenerator::generateTypenameCheck( std::vector const } else { - typenameCheck += ", typename B" + index + " = " + startUpperCase( elementType ) + "Allocator"; + typenameCheck += ", typename B" + index + " = " + startUpperCase( stripPrefix( elementType, "VULKAN_HPP_NAMESPACE::" ) ) + "Allocator"; } enableIf += enableIf.empty() ? ", typename std::enable_if<" : " && "; enableIf += "std::is_same::value"; diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index f3ac261..b09fdb1 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -498,19 +498,17 @@ private: bool nonConstPointerAsNullptr, std::set const & singularParams, std::set const & templatedParams, - bool raiiHandleMemberFunction, + bool raii, + bool raiiFactory, CommandFlavourFlags flavourFlags ) const; - std::string generateCallArgumentsRAIIFactory( std::vector const & params, - size_t initialSkipCount, - std::set const & skippedParams, - std::set const & singularParams ) const; std::string generateCallArgumentsStandard( std::string const & handle, std::vector const & params ) const; std::string generateCallArgumentEnhanced( std::vector const & params, size_t paramIndex, bool nonConstPointerAsNullptr, std::set const & singularParams, std::set const & templatedParams, - CommandFlavourFlags flavourFlags ) const; + CommandFlavourFlags flavourFlags, + bool raiiFactory ) const; std::string generateCallArgumentEnhancedConstPointer( ParamData const & param, size_t paramIndex, std::set const & singularParams, @@ -522,7 +520,8 @@ private: std::string generateCallArgumentEnhancedValue( std::vector const & params, size_t paramIndex, std::set const & singularParams, - CommandFlavourFlags flavourFlags ) const; + CommandFlavourFlags flavourFlags, + bool raiiFactory ) const; std::string generateCallSequence( std::string const & name, CommandData const & commandData, std::vector const & returnParams, @@ -532,7 +531,8 @@ private: std::set const & templatedParams, std::vector const & chainedReturnParams, CommandFlavourFlags flavourFlags, - bool raii ) const; + bool raii, + bool raiiFactory ) const; std::string generateChainTemplates( std::vector const & returnParams, bool chained ) const; std::string generateCommand( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const; std::string generateCommandDefinitions() const; @@ -662,7 +662,7 @@ private: CommandFlavourFlags flavourFlags, bool raii, std::vector const & dataTypes, - std::string const & dataType, + std::string const & returnType, std::string const & returnVariable ) const; std::string generateDataDeclarations3Returns( CommandData const & commandData, std::vector const & returnParams, @@ -684,6 +684,12 @@ private: std::set const & templatedParams, bool singular ) const; std::string generateDebugReportObjectType( std::string const & objectType ) const; + std::string generateDecoratedReturnType( CommandData const & commandData, + std::vector const & returnParams, + std::map const & vectorParams, + CommandFlavourFlags flavourFlags, + bool raii, + std::string const & returnType ) const; std::string generateDispatchLoaderDynamic() const; // uses vkGet*ProcAddress to get function pointers std::string generateDispatchLoaderStatic() const; // uses exported symbols from loader std::string generateDestroyCommand( std::string const & name, CommandData const & commandData ) const; @@ -711,7 +717,6 @@ private: std::string generateExtensionReplacedTest( Predicate p ) const; std::string generateExtensionsList( std::string const & type ) const; std::string generateExtensionTypeTest( std::string const & type ) const; - std::string generateFailureCheck( std::vector const & successCodes ) const; std::string generateFormatTraits() const; std::string generateFunctionPointerCheck( std::string const & function, std::set const & requiredBy ) const; std::string generateHandle( std::pair const & handle, std::set & listedHandles ) const; @@ -742,6 +747,13 @@ private: std::string generateRAIICommandDefinitions( std::vector const & requireData, std::set & listedCommands, std::string const & title ) const; std::string generateRAIIDispatchers() const; + std::string generateRAIIFactoryReturnStatements( std::vector const & params, + std::vector const & successCodes, + std::string const & vkType, + bool enumerating, + std::string const & returnType, + std::string const & returnVariable, + bool singular ) const; std::string generateRAIIHandle( std::pair const & handle, std::set & listedHandles, std::set const & specialFunctions ) const; @@ -769,6 +781,12 @@ private: std::map::const_iterator constructorIt, std::string const & enter, std::string const & leave ) const; + std::string generateRAIIHandleConstructorByCall( std::pair const & handle, + std::map::const_iterator constructorIt, + std::string const & enter, + std::string const & leave, + bool isPlural, + bool forceSingular ) const; std::pair generateRAIIHandleConstructor1Return2Vector( std::pair const & handle, std::map::const_iterator constructorIt, std::string const & enter, @@ -781,17 +799,6 @@ private: std::map::const_iterator constructorIt, bool singular, bool takesOwnership ) const; - std::string generateRAIIHandleConstructorCallArguments( std::pair const & handle, - std::map::const_iterator constructorIt, - bool nonConstPointerAsNullptr, - std::set const & singularParams, - bool allocatorIsMemberVariable ) const; - std::string generateRAIIHandleConstructorEnumerate( std::pair const & handle, - std::map::const_iterator constructorIt, - std::vector::const_iterator handleParamIt, - std::vector::const_iterator lenParamIt, - std::string const & enter, - std::string const & leave ) const; std::string generateRAIIHandleConstructorInitializationList( std::pair const & handle, std::map::const_iterator constructorIt, std::map::const_iterator destructorIt, @@ -801,29 +808,11 @@ private: std::map::const_iterator constructorIt, std::string const & enter, std::string const & leave ) const; - std::string generateRAIIHandleConstructorResultSingleSuccessWithErrors1Return0Vector( std::pair const & handle, - std::map::const_iterator constructorIt, - std::string const & enter, - std::string const & leave ) const; - std::string generateRAIIHandleConstructorTakeOwnership( std::pair const & handle ) const; - std::string generateRAIIHandleConstructorVector( std::pair const & handle, - std::map::const_iterator constructorIt, - std::vector::const_iterator handleParamIt, - std::string const & enter, - std::string const & leave ) const; - std::string generateRAIIHandleConstructorVectorSingular( std::pair const & handle, - std::map::const_iterator constructorIt, - std::vector::const_iterator handleParamIt, - std::string const & enter, - std::string const & leave ) const; + std::string generateRAIIHandleConstructorTakeOwnership( std::pair const & handle ) const; std::pair generateRAIIHandleConstructorVoid( std::pair const & handle, std::map::const_iterator constructorIt, std::string const & enter, std::string const & leave ) const; - std::string generateRAIIHandleConstructorVoid1Return0Vector( std::pair const & handle, - std::map::const_iterator constructorIt, - std::string const & enter, - std::string const & leave ) const; std::string generateRAIIHandleContext( std::pair const & handle, std::set const & specialFunctions ) const; std::string generateRAIIHandleDestructorCallArguments( std::string const & handleType, std::map::const_iterator destructorIt ) const; @@ -831,31 +820,29 @@ private: generateRAIIHandleDetails( std::pair const & handle ) const; std::string generateRAIIHandleForwardDeclarations( std::vector const & requireData, std::string const & title ) const; std::string generateRAIIHandles() const; - std::string generateRAIIHandleSingularConstructorArguments( std::pair const & handle, - std::map::const_iterator constructorIt ) const; - std::string generateRAIIHandleVectorSizeCheck( std::string const & name, - CommandData const & commandData, - size_t initialSkipCount, - std::map> const & countToVectorMap, - std::set const & skippedParams ) const; + std::string generateRAIIHandleSingularConstructorArguments( std::pair const & handle, + std::vector const & params, + bool singular ) const; template std::string generateReplacedExtensionsList( Predicate p, Extraction e ) const; std::string generateResultAssignment( CommandData const & commandData ) const; std::string generateResultCheck( CommandData const & commandData, std::string const & className, std::string const & classSeparator, std::string commandName, bool enumerating ) const; + std::string + generateResultCheckExpected( std::vector const & successCodes, std::string const & className, std::string const & commandName ) const; std::string generateResultExceptions() const; std::string generateReturnStatement( std::string const & commandName, CommandData const & commandData, std::string const & returnVariable, std::string const & returnType, + std::string const & decoratedReturnType, std::string const & dataType, size_t initialSkipCount, size_t returnParam, CommandFlavourFlags flavourFlags, bool enumerating, bool raii ) const; - std::string generateReturnType( CommandData const & commandData, - std::vector const & returnParams, + std::string generateReturnType( std::vector const & returnParams, std::map const & vectorParams, CommandFlavourFlags flavourFlags, bool raii, diff --git a/snippets/includes.hpp b/snippets/includes.hpp index 2aeb0f2..9f80577 100644 --- a/snippets/includes.hpp +++ b/snippets/includes.hpp @@ -1,20 +1,17 @@ -#ifndef VULKAN_HPP -#define VULKAN_HPP - #include -#include // ArrayWrapperND -#include // std::string -#include // strnlen +#include // ArrayWrapperND +#include // strnlen +#include // std::string #include #include #if 17 <= VULKAN_HPP_CPP_VERSION -# include // std::string_view +# include #endif #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) -# include // std::tie -# include // std::vector +# include // std::tie +# include // std::vector #endif #if !defined( VULKAN_HPP_NO_EXCEPTIONS ) @@ -26,7 +23,7 @@ #endif #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1 -# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined(__Fuchsia__) +# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ ) # include # elif defined( _WIN32 ) typedef struct HINSTANCE__ * HINSTANCE; diff --git a/snippets/macros.hpp b/snippets/macros.hpp index 55380eb..648ae44 100644 --- a/snippets/macros.hpp +++ b/snippets/macros.hpp @@ -58,7 +58,7 @@ #endif #if !defined( VULKAN_HPP_STATIC_ASSERT ) -# define VULKAN_HPP_STATIC_ASSERT static_assert +# define VULKAN_HPP_STATIC_ASSERT static_assert #endif #if !defined( VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL ) @@ -85,8 +85,8 @@ # endif #endif -#if defined(__GNUC__) -# define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ ) +#if defined( __GNUC__ ) +# define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ ) #endif #if !defined( VULKAN_HPP_HAS_UNRESTRICTED_UNIONS ) @@ -134,7 +134,7 @@ # else # define VULKAN_HPP_CONSTEXPR_14 # endif -# if ( 201907 <= __cpp_constexpr ) && ( !defined(__GNUC__) || ( 110400 < GCC_VERSION ) ) +# if ( 201907 <= __cpp_constexpr ) && ( !defined( __GNUC__ ) || ( 110400 < GCC_VERSION ) ) # define VULKAN_HPP_CONSTEXPR_20 constexpr # else # define VULKAN_HPP_CONSTEXPR_20 @@ -194,12 +194,12 @@ #define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text ) #define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE ) -#if !defined(VULKAN_HPP_DISPATCH_LOADER_DYNAMIC) -# if defined( VK_NO_PROTOTYPES ) -# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 -# else -# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0 -# endif +#if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) +# if defined( VK_NO_PROTOTYPES ) +# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 +# else +# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0 +# endif #endif #if !defined( VULKAN_HPP_STORAGE_API ) @@ -233,11 +233,12 @@ namespace VULKAN_HPP_NAMESPACE #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER ) # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic -# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \ - namespace VULKAN_HPP_NAMESPACE \ - { \ +# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \ + namespace VULKAN_HPP_NAMESPACE \ + { \ VULKAN_HPP_STORAGE_API ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic; \ } + namespace VULKAN_HPP_NAMESPACE { extern VULKAN_HPP_STORAGE_API VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic; @@ -265,3 +266,20 @@ namespace VULKAN_HPP_NAMESPACE # define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr # define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER #endif + +#if !defined( VULKAN_HPP_EXPECTED ) && ( 23 <= VULKAN_HPP_CPP_VERSION ) && defined( __cpp_lib_expected ) +# include +# define VULKAN_HPP_EXPECTED std::expected +# define VULKAN_HPP_UNEXPECTED std::unexpected +#endif + +#if !defined( VULKAN_HPP_RAII_NAMESPACE ) +# define VULKAN_HPP_RAII_NAMESPACE raii +#endif + +#if defined( VULKAN_HPP_NO_EXCEPTIONS ) && defined( VULKAN_HPP_EXPECTED ) +# define VULKAN_HPP_RAII_NO_EXCEPTIONS +# define VULKAN_HPP_RAII_CREATE_NOEXCEPT noexcept +#else +# define VULKAN_HPP_RAII_CREATE_NOEXCEPT +#endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 724262e..eb85a06 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -31,6 +31,10 @@ add_subdirectory( FormatTraits ) add_subdirectory( Handles ) add_subdirectory( Hash ) add_subdirectory( NoExceptions ) +if( ( "cxx_std_23" IN_LIST CMAKE_CXX_COMPILE_FEATURES ) AND NOT ( ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) AND ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0 ) ) ) +# This test is for C++23 only... but clang++13 and clang++14 seem to have a problem with it + add_subdirectory( NoExceptionsRAII ) +endif() add_subdirectory( StridedArrayProxy ) add_subdirectory( StructureChain ) add_subdirectory( UniqueHandle ) diff --git a/tests/NoExceptionsRAII/CMakeLists.txt b/tests/NoExceptionsRAII/CMakeLists.txt new file mode 100644 index 0000000..b95f5c0 --- /dev/null +++ b/tests/NoExceptionsRAII/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +vulkan_hpp__setup_test( NAME NoExceptionsRAII LIBRARIES utils CXX_STANDARD 23) + +if( UNIX ) + target_link_libraries( NoExceptionsRAII PRIVATE ${CMAKE_DL_LIBS} ) +endif () diff --git a/tests/NoExceptionsRAII/NoExceptionsRAII.cpp b/tests/NoExceptionsRAII/NoExceptionsRAII.cpp new file mode 100644 index 0000000..528f948 --- /dev/null +++ b/tests/NoExceptionsRAII/NoExceptionsRAII.cpp @@ -0,0 +1,75 @@ +// Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// VulkanHpp Samples : NoExceptionsRAII +// Compile test with VULKAN_HPP_NO_EXCEPTIONS set and using raii-classes +// Note: this is _no_ functional test!! Don't ever code this way!! + +#define VULKAN_HPP_NO_EXCEPTIONS + +// for this test, we need to include vulkan_hpp_macros.hpp first to determine if VULKAN_HPP_RAII_NO_EXCEPTIONS is defined in this context +#include + +// only if VULKAN_HPP_RAII_NO_EXCEPTIONS really is defined, this test is meaningfull and needs to compile and run. +#if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +#include + +static char const * AppName = "NoExceptions"; +static char const * EngineName = "Vulkan.hpp"; +#endif + +int main( int /*argc*/, char ** /*argv*/ ) +{ +#if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + vk::raii::Context context; + + vk::ApplicationInfo appInfo( AppName, 1, EngineName, 1, VK_API_VERSION_1_1 ); + auto instance = context.createInstance( { {}, &appInfo } ); + assert( instance.has_value() ); + + auto physicalDevices = instance->enumeratePhysicalDevices(); + assert( physicalDevices.has_value() ); + auto physicalDevice = std::move( physicalDevices->front() ); + + // get the QueueFamilyProperties of the first PhysicalDevice + std::vector queueFamilyProperties = physicalDevice.getQueueFamilyProperties(); + + // get the first index into queueFamiliyProperties which supports graphics + size_t graphicsQueueFamilyIndex = + std::distance( queueFamilyProperties.begin(), + std::find_if( queueFamilyProperties.begin(), + queueFamilyProperties.end(), + []( vk::QueueFamilyProperties const & qfp ) { return qfp.queueFlags & vk::QueueFlagBits::eGraphics; } ) ); + assert( graphicsQueueFamilyIndex < queueFamilyProperties.size() ); + + // create a Device + float queuePriority = 0.0f; + vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), static_cast( graphicsQueueFamilyIndex ), 1, &queuePriority ); + auto device = physicalDevice.createDevice( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ) ); + assert( device.has_value() ); + + // create a CommandPool to allocate a CommandBuffer from + auto commandPool = + device->createCommandPool( vk::CommandPoolCreateInfo( vk::CommandPoolCreateFlags(), deviceQueueCreateInfo.queueFamilyIndex ) ); + assert( commandPool.has_value() ); + + // allocate a CommandBuffer from the CommandPool + auto commandBuffers = device->allocateCommandBuffers( vk::CommandBufferAllocateInfo( **commandPool, vk::CommandBufferLevel::ePrimary, 1 ) ); + assert( commandBuffers.has_value() ); + + auto commandBuffer = std::move( commandBuffers->front() ); +#endif + + return 0; +} diff --git a/vk_raii_ProgrammingGuide.md b/vk_raii_ProgrammingGuide.md index 99a678d..a99d1e4 100644 --- a/vk_raii_ProgrammingGuide.md +++ b/vk_raii_ProgrammingGuide.md @@ -25,6 +25,24 @@ you would create a `vk::raii::Device` That `vk::raii::Device` is automatically destroyed, when its scope is left. +Alternatively, you can use a creation function to create a `vk::raii::Device`: + + // create a vk::raii::Device, given a vk::raii::PhysicalDevice physicalDevice and a vk::DeviceCreateInfo deviceCreateInfo + vk::raii::Device device = physicalDevice.createDevice( deviceCreateInfo ); + +Finally, if you have defined `VULKAN_HPP_NO_EXCPETIONS` and compile for at least C++23, the constructors as described above are not available (they would potentially throw an exception which is not allowed then) but you have to use the construction functions. Those functions then do not return the created object, but a `std::expected`: + + // create a vk::raii::Device, given a vk::raii::PhysicalDevice physicalDevice and a vk::DeviceCreateInfo deviceCreateInfo + // when VULKAN_HPP_NO_EXCPETIONS is defined and your using at least C++23 + auto deviceExpected = physicalDevice.createDevice( deviceCreateInfo ); + if ( deviceExpected.has_value() ) + { + device = std::move( *deviceExpected ); + } + +In the code snippets in this text, I will consistently use the constructor-approach. + + Other than the `vk::Device`, you can assign the `vk::raii::Device` to a smart pointer: // create a smart-pointer to a vk::raii::Device, given a smart-pointer to a vk::raii::PhysicalDevice pPhysicalDevice and a vk::DeviceCreateInfo deviceCreateInfo @@ -83,8 +101,6 @@ The `vk::raii::Instance` now holds all the instance-related functions. For examp // get all vk::PhysicalDeviceGroupProperties from a vk::raii::Instance instance std::vector physicalDeviceGroupProperties = instance.enumeratePhysicalDeviceGroups(); -Actually, "all the instance-related functions", as stated above, might be a bit misleading. There are just very few public functions available with the `vk::raii::Instance`, as most of the instance-related functions are creation functions that are not wrapped publicly but used internally when instantiating other vk::raii-objects. - ### 02 Enumerate the vk::raii::PhysicalDevices Enumerating the physical devices of an instance is slightly different in vk::raii namespace as you might be used to from the vk-namespace or the pure C-API. As there might be multiple physical devices attached, you would instantiate a `vk::raii::PhysicalDevices` (note the trailing 's' here!), which essentially is a `std::vector` of `vk::raii::PhysicalDevice`s (note the trailing 's' here!): diff --git a/vulkan/vulkan.cppm b/vulkan/vulkan.cppm index 1ba2ff4..d06aaa2 100644 --- a/vulkan/vulkan.cppm +++ b/vulkan/vulkan.cppm @@ -4616,7 +4616,7 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::isObsoletedExtension; using VULKAN_HPP_NAMESPACE::isPromotedExtension; -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) && !defined( VULKAN_HPP_NO_EXCEPTIONS ) +#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) namespace VULKAN_HPP_RAII_NAMESPACE { //====================== diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 0dc5dc3..023877d 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -16,7 +16,7 @@ #include #if 17 <= VULKAN_HPP_CPP_VERSION -# include // std::string_view +# include #endif #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) @@ -16303,7 +16303,7 @@ namespace VULKAN_HPP_NAMESPACE # elif defined( __APPLE__ ) m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); # elif defined( _WIN32 ) - m_library = ::LoadLibraryA( "vulkan-1.dll" ); + m_library = ::LoadLibraryA( "vulkan-1.dll" ); # else # error unsupported platform # endif diff --git a/vulkan/vulkan_funcs.hpp b/vulkan/vulkan_funcs.hpp index a35d5e1..6bd8f88 100644 --- a/vulkan/vulkan_funcs.hpp +++ b/vulkan/vulkan_funcs.hpp @@ -37,13 +37,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Instance instance; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &instance ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::createInstance" ); + reinterpret_cast( &instance ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::createInstance" ); - return createResultValueType( static_cast( result ), instance ); + return createResultValueType( result, instance ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -54,13 +54,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Instance instance; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &instance ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::createInstanceUnique" ); + reinterpret_cast( &instance ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::createInstanceUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( instance, ObjectDestroy( allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -102,29 +102,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDevices; uint32_t physicalDeviceCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceCount ) + result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) { physicalDevices.resize( physicalDeviceCount ); - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ); + result = static_cast( + d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); if ( physicalDeviceCount < physicalDevices.size() ) { physicalDevices.resize( physicalDeviceCount ); } - return createResultValueType( static_cast( result ), physicalDevices ); + return createResultValueType( result, physicalDevices ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d ) const { @@ -132,23 +133,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDevices( physicalDeviceAllocator ); uint32_t physicalDeviceCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceCount ) + result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) { physicalDevices.resize( physicalDeviceCount ); - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ); + result = static_cast( + d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); if ( physicalDeviceCount < physicalDevices.size() ) { physicalDevices.resize( physicalDeviceCount ); } - return createResultValueType( static_cast( result ), physicalDevices ); + return createResultValueType( result, physicalDevices ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -228,16 +230,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, + static_cast( format ), + static_cast( type ), + static_cast( tiling ), + static_cast( usage ), + static_cast( flags ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); - return createResultValueType( static_cast( result ), imageFormatProperties ); + return createResultValueType( result, imageFormatProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -298,7 +301,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator, Dispatch const & d ) const { @@ -401,14 +404,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Device device; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDevice" ); + reinterpret_cast( &device ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDevice" ); - return createResultValueType( static_cast( result ), device ); + return createResultValueType( result, device ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -421,15 +424,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Device device; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDeviceUnique" ); + reinterpret_cast( &device ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDeviceUnique" ); - return createResultValueType( static_cast( result ), - UniqueHandle( device, ObjectDestroy( allocator, d ) ) ); + return createResultValueType( result, UniqueHandle( device, ObjectDestroy( allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -472,30 +474,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkEnumerateInstanceExtensionProperties( + layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, @@ -505,24 +508,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( extensionPropertiesAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkEnumerateInstanceExtensionProperties( + layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -546,30 +550,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateDeviceExtensionProperties( - m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkEnumerateDeviceExtensionProperties( + m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, @@ -579,24 +584,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( extensionPropertiesAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateDeviceExtensionProperties( - m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkEnumerateDeviceExtensionProperties( + m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -618,29 +624,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d ) { @@ -648,23 +655,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( layerPropertiesAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -686,29 +694,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d ) const { @@ -716,23 +725,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( layerPropertiesAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -775,10 +785,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueSubmit( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkQueueSubmit( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -795,10 +806,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueWaitIdle( m_queue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueueWaitIdle( m_queue ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -815,10 +826,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkDeviceWaitIdle( m_device ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkDeviceWaitIdle( m_device ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -845,14 +856,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceMemory memory; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &memory ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemory" ); + reinterpret_cast( &memory ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemory" ); - return createResultValueType( static_cast( result ), memory ); + return createResultValueType( result, memory ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -865,14 +876,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceMemory memory; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &memory ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemoryUnique" ); + reinterpret_cast( &memory ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemoryUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( memory, ObjectFree( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -951,16 +962,16 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - void * pData; - VkResult result = d.vkMapMemory( m_device, - static_cast( memory ), - static_cast( offset ), - static_cast( size ), - static_cast( flags ), - &pData ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory" ); + void * pData; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMapMemory( m_device, + static_cast( memory ), + static_cast( offset ), + static_cast( size ), + static_cast( flags ), + &pData ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory" ); - return createResultValueType( static_cast( result ), pData ); + return createResultValueType( result, pData ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -988,10 +999,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1013,10 +1025,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1061,11 +1074,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), static_cast( memoryOffset ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -1087,11 +1100,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), static_cast( memoryOffset ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -1181,7 +1194,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, SparseImageMemoryRequirementsAllocator & sparseImageMemoryRequirementsAllocator, @@ -1272,7 +1285,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, @@ -1331,11 +1344,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkQueueBindSparse( m_queue, bindInfo.size(), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::bindSparse" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkQueueBindSparse( m_queue, bindInfo.size(), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::bindSparse" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1359,15 +1372,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFence" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFence" ); - return createResultValueType( static_cast( result ), fence ); + return createResultValueType( result, fence ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1377,15 +1390,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFenceUnique" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFenceUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -1453,10 +1466,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkResetFences( m_device, fences.size(), reinterpret_cast( fences.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkResetFences( m_device, fences.size(), reinterpret_cast( fences.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1473,10 +1487,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkGetFenceStatus( m_device, static_cast( fence ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceStatus", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetFenceStatus( m_device, static_cast( fence ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return static_cast( result ); } @@ -1504,11 +1517,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkWaitForFences( m_device, fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkWaitForFences( m_device, fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } @@ -1537,14 +1549,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Semaphore semaphore; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &semaphore ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphore" ); + reinterpret_cast( &semaphore ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphore" ); - return createResultValueType( static_cast( result ), semaphore ); + return createResultValueType( result, semaphore ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1557,16 +1569,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Semaphore semaphore; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &semaphore ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreUnique" ); + reinterpret_cast( &semaphore ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( semaphore, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( semaphore, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1637,15 +1648,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Event event; - VkResult result = + VULKAN_HPP_NAMESPACE::Event event; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createEvent" ); + reinterpret_cast( &event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createEvent" ); - return createResultValueType( static_cast( result ), event ); + return createResultValueType( result, event ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1655,15 +1666,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Event event; - VkResult result = + VULKAN_HPP_NAMESPACE::Event event; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createEventUnique" ); + reinterpret_cast( &event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createEventUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( event, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -1728,10 +1739,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkGetEventStatus( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getEventStatus", - { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetEventStatus( m_device, static_cast( event ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEventStatus", { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); return static_cast( result ); } @@ -1751,10 +1761,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSetEvent( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setEvent" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetEvent( m_device, static_cast( event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setEvent" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -1771,10 +1781,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkResetEvent( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetEvent" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkResetEvent( m_device, static_cast( event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetEvent" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -1801,14 +1811,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::QueryPool queryPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &queryPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPool" ); + reinterpret_cast( &queryPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPool" ); - return createResultValueType( static_cast( result ), queryPool ); + return createResultValueType( result, queryPool ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1821,16 +1831,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::QueryPool queryPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &queryPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPoolUnique" ); + reinterpret_cast( &queryPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPoolUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( queryPool, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( queryPool, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1917,15 +1926,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetQueryPoolResults( m_device, - static_cast( queryPool ), - firstQuery, - queryCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetQueryPoolResults( m_device, + static_cast( queryPool ), + firstQuery, + queryCount, + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ), + static_cast( stride ), + static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResults", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); @@ -1942,18 +1951,17 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetQueryPoolResults( m_device, - static_cast( queryPool ), - firstQuery, - queryCount, - sizeof( DataType ), - reinterpret_cast( &data ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResult", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetQueryPoolResults( m_device, + static_cast( queryPool ), + firstQuery, + queryCount, + sizeof( DataType ), + reinterpret_cast( &data ), + static_cast( stride ), + static_cast( flags ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResult", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return ResultValue( static_cast( result ), data ); } @@ -1980,14 +1988,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Buffer buffer; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &buffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBuffer" ); + reinterpret_cast( &buffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBuffer" ); - return createResultValueType( static_cast( result ), buffer ); + return createResultValueType( result, buffer ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1998,14 +2006,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Buffer buffer; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &buffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferUnique" ); + reinterpret_cast( &buffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( buffer, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -2080,14 +2088,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::BufferView view; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferView" ); + reinterpret_cast( &view ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferView" ); - return createResultValueType( static_cast( result ), view ); + return createResultValueType( result, view ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2100,14 +2108,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::BufferView view; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferViewUnique" ); + reinterpret_cast( &view ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferViewUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( view, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -2179,15 +2187,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Image image; - VkResult result = + VULKAN_HPP_NAMESPACE::Image image; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &image ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImage" ); + reinterpret_cast( &image ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImage" ); - return createResultValueType( static_cast( result ), image ); + return createResultValueType( result, image ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2197,15 +2205,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Image image; - VkResult result = + VULKAN_HPP_NAMESPACE::Image image; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &image ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageUnique" ); + reinterpret_cast( &image ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( image, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -2310,14 +2318,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageView view; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageView" ); + reinterpret_cast( &view ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageView" ); - return createResultValueType( static_cast( result ), view ); + return createResultValueType( result, view ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2330,14 +2338,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageView view; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageViewUnique" ); + reinterpret_cast( &view ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageViewUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( view, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -2412,14 +2420,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ShaderModule shaderModule; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &shaderModule ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderModule" ); + reinterpret_cast( &shaderModule ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderModule" ); - return createResultValueType( static_cast( result ), shaderModule ); + return createResultValueType( result, shaderModule ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2432,16 +2440,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ShaderModule shaderModule; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &shaderModule ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderModuleUnique" ); + reinterpret_cast( &shaderModule ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderModuleUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( shaderModule, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( shaderModule, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -2515,14 +2522,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCache" ); + reinterpret_cast( &pipelineCache ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCache" ); - return createResultValueType( static_cast( result ), pipelineCache ); + return createResultValueType( result, pipelineCache ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2535,16 +2542,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCacheUnique" ); + reinterpret_cast( &pipelineCache ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCacheUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( pipelineCache, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( pipelineCache, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -2614,23 +2620,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector data; size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = + static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template data( uint8_tAllocator ); size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = + static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -2684,11 +2694,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkMergePipelineCaches( - m_device, static_cast( dstCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mergePipelineCaches" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMergePipelineCaches( + m_device, static_cast( dstCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mergePipelineCaches" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -2720,14 +2730,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2737,7 +2747,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -2748,14 +2758,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2772,14 +2782,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipeline", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2797,14 +2807,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; @@ -2821,7 +2831,7 @@ namespace VULKAN_HPP_NAMESPACE template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -2832,14 +2842,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); @@ -2863,14 +2873,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelineUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2909,14 +2919,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2926,7 +2936,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -2937,14 +2947,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2961,14 +2971,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipeline", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2986,14 +2996,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; @@ -3010,7 +3020,7 @@ namespace VULKAN_HPP_NAMESPACE template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -3021,14 +3031,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); @@ -3052,14 +3062,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelineUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -3139,14 +3149,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayout" ); + reinterpret_cast( &pipelineLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayout" ); - return createResultValueType( static_cast( result ), pipelineLayout ); + return createResultValueType( result, pipelineLayout ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3159,16 +3169,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayoutUnique" ); + reinterpret_cast( &pipelineLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayoutUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( pipelineLayout, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( pipelineLayout, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3240,14 +3249,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Sampler sampler; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &sampler ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSampler" ); + reinterpret_cast( &sampler ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSampler" ); - return createResultValueType( static_cast( result ), sampler ); + return createResultValueType( result, sampler ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3258,14 +3267,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Sampler sampler; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &sampler ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerUnique" ); + reinterpret_cast( &sampler ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( sampler, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -3340,14 +3349,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; - VkResult result = d.vkCreateDescriptorSetLayout( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &setLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayout" ); + reinterpret_cast( &setLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayout" ); - return createResultValueType( static_cast( result ), setLayout ); + return createResultValueType( result, setLayout ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3360,16 +3369,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; - VkResult result = d.vkCreateDescriptorSetLayout( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &setLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayoutUnique" ); + reinterpret_cast( &setLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayoutUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( setLayout, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( setLayout, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3447,14 +3455,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPool" ); + reinterpret_cast( &descriptorPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPool" ); - return createResultValueType( static_cast( result ), descriptorPool ); + return createResultValueType( result, descriptorPool ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3467,16 +3475,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPoolUnique" ); + reinterpret_cast( &descriptorPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPoolUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( descriptorPool, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( descriptorPool, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3567,17 +3574,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); - return createResultValueType( static_cast( result ), descriptorSets ); + return createResultValueType( result, descriptorSets ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, @@ -3586,11 +3593,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector descriptorSets( allocateInfo.descriptorSetCount, descriptorSetAllocator ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); - return createResultValueType( static_cast( result ), descriptorSets ); + return createResultValueType( result, descriptorSets ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3602,9 +3609,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); std::vector, DescriptorSetAllocator> uniqueDescriptorSets; uniqueDescriptorSets.reserve( allocateInfo.descriptorSetCount ); PoolFree deleter( *this, allocateInfo.descriptorPool, d ); @@ -3612,13 +3619,13 @@ namespace VULKAN_HPP_NAMESPACE { uniqueDescriptorSets.push_back( UniqueHandle( descriptorSet, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueDescriptorSets ) ); + return createResultValueType( result, std::move( uniqueDescriptorSets ) ); } template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, DescriptorSetAllocator>>::type Device::allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, @@ -3628,9 +3635,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); std::vector, DescriptorSetAllocator> uniqueDescriptorSets( descriptorSetAllocator ); uniqueDescriptorSets.reserve( allocateInfo.descriptorSetCount ); PoolFree deleter( *this, allocateInfo.descriptorPool, d ); @@ -3638,7 +3645,7 @@ namespace VULKAN_HPP_NAMESPACE { uniqueDescriptorSets.push_back( UniqueHandle( descriptorSet, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueDescriptorSets ) ); + return createResultValueType( result, std::move( uniqueDescriptorSets ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3746,14 +3753,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &framebuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebuffer" ); + reinterpret_cast( &framebuffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebuffer" ); - return createResultValueType( static_cast( result ), framebuffer ); + return createResultValueType( result, framebuffer ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3766,16 +3773,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &framebuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebufferUnique" ); + reinterpret_cast( &framebuffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebufferUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( framebuffer, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( framebuffer, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3849,14 +3855,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass" ); - return createResultValueType( static_cast( result ), renderPass ); + return createResultValueType( result, renderPass ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3869,16 +3875,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPassUnique" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPassUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3975,14 +3980,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CommandPool commandPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &commandPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPool" ); + reinterpret_cast( &commandPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPool" ); - return createResultValueType( static_cast( result ), commandPool ); + return createResultValueType( result, commandPool ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3995,16 +4000,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CommandPool commandPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &commandPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPoolUnique" ); + reinterpret_cast( &commandPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPoolUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( commandPool, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( commandPool, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -4071,10 +4075,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetCommandPool" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetCommandPool" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -4096,17 +4101,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); - return createResultValueType( static_cast( result ), commandBuffers ); + return createResultValueType( result, commandBuffers ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, @@ -4115,11 +4120,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector commandBuffers( allocateInfo.commandBufferCount, commandBufferAllocator ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); - return createResultValueType( static_cast( result ), commandBuffers ); + return createResultValueType( result, commandBuffers ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -4131,9 +4136,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); std::vector, CommandBufferAllocator> uniqueCommandBuffers; uniqueCommandBuffers.reserve( allocateInfo.commandBufferCount ); PoolFree deleter( *this, allocateInfo.commandPool, d ); @@ -4141,13 +4146,13 @@ namespace VULKAN_HPP_NAMESPACE { uniqueCommandBuffers.push_back( UniqueHandle( commandBuffer, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueCommandBuffers ) ); + return createResultValueType( result, std::move( uniqueCommandBuffers ) ); } template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, CommandBufferAllocator>>::type Device::allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, @@ -4157,9 +4162,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); std::vector, CommandBufferAllocator> uniqueCommandBuffers( commandBufferAllocator ); uniqueCommandBuffers.reserve( allocateInfo.commandBufferCount ); PoolFree deleter( *this, allocateInfo.commandPool, d ); @@ -4167,7 +4172,7 @@ namespace VULKAN_HPP_NAMESPACE { uniqueCommandBuffers.push_back( UniqueHandle( commandBuffer, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueCommandBuffers ) ); + return createResultValueType( result, std::move( uniqueCommandBuffers ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -4235,10 +4240,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -4255,10 +4261,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkEndCommandBuffer( m_commandBuffer ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkEndCommandBuffer( m_commandBuffer ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -4276,10 +4282,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -5192,11 +5199,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint32_t apiVersion; - VkResult result = d.vkEnumerateInstanceVersion( &apiVersion ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceVersion" ); + uint32_t apiVersion; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkEnumerateInstanceVersion( &apiVersion ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceVersion" ); - return createResultValueType( static_cast( result ), apiVersion ); + return createResultValueType( result, apiVersion ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5216,10 +5223,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindBufferMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindBufferMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5239,10 +5247,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindImageMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindImageMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5314,30 +5323,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroups( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + result = static_cast( d.vkEnumeratePhysicalDeviceGroups( + m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); + return createResultValueType( result, physicalDeviceGroupProperties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroups( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const @@ -5346,25 +5355,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties( physicalDeviceGroupPropertiesAllocator ); - uint32_t physicalDeviceGroupCount; - VkResult result; + uint32_t physicalDeviceGroupCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroups( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + result = static_cast( d.vkEnumeratePhysicalDeviceGroups( + m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); + return createResultValueType( result, physicalDeviceGroupProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5487,7 +5496,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -5640,12 +5649,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, + reinterpret_cast( &imageFormatInfo ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - return createResultValueType( static_cast( result ), imageFormatProperties ); + return createResultValueType( result, imageFormatProperties ); } template @@ -5656,12 +5666,13 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, + reinterpret_cast( &imageFormatInfo ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5700,7 +5711,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d ) const { @@ -5865,7 +5876,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, @@ -5948,14 +5959,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversion( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversion" ); + reinterpret_cast( &ycbcrConversion ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversion" ); - return createResultValueType( static_cast( result ), ycbcrConversion ); + return createResultValueType( result, ycbcrConversion ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -5968,16 +5979,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversion( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionUnique" ); + reinterpret_cast( &ycbcrConversion ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( ycbcrConversion, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( ycbcrConversion, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6056,14 +6066,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; - VkResult result = d.vkCreateDescriptorUpdateTemplate( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorUpdateTemplate ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplate" ); + reinterpret_cast( &descriptorUpdateTemplate ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplate" ); - return createResultValueType( static_cast( result ), descriptorUpdateTemplate ); + return createResultValueType( result, descriptorUpdateTemplate ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -6076,14 +6086,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; - VkResult result = d.vkCreateDescriptorUpdateTemplate( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorUpdateTemplate ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateUnique" ); + reinterpret_cast( &descriptorUpdateTemplate ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( descriptorUpdateTemplate, ObjectDestroy( *this, allocator, d ) ) ); } @@ -6356,14 +6366,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2" ); - return createResultValueType( static_cast( result ), renderPass ); + return createResultValueType( result, renderPass ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -6376,16 +6386,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2Unique" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2Unique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6479,11 +6488,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint64_t value; - VkResult result = d.vkGetSemaphoreCounterValue( m_device, static_cast( semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValue" ); + uint64_t value; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetSemaphoreCounterValue( m_device, static_cast( semaphore ), &value ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValue" ); - return createResultValueType( static_cast( result ), value ); + return createResultValueType( result, value ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6503,10 +6513,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkWaitSemaphores( m_device, reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkWaitSemaphores( m_device, reinterpret_cast( &waitInfo ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } @@ -6527,10 +6537,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSignalSemaphore( m_device, reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkSignalSemaphore( m_device, reinterpret_cast( &signalInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6619,30 +6630,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties; uint32_t toolCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } - return createResultValueType( static_cast( result ), toolProperties ); + return createResultValueType( result, toolProperties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getToolProperties( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d ) const @@ -6651,25 +6662,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties( physicalDeviceToolPropertiesAllocator ); - uint32_t toolCount; - VkResult result; + uint32_t toolCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } - return createResultValueType( static_cast( result ), toolProperties ); + return createResultValueType( result, toolProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6696,14 +6707,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlot( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlot" ); + reinterpret_cast( &privateDataSlot ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlot" ); - return createResultValueType( static_cast( result ), privateDataSlot ); + return createResultValueType( result, privateDataSlot ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -6716,16 +6727,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlot( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotUnique" ); + reinterpret_cast( &privateDataSlot ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( privateDataSlot, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( privateDataSlot, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6800,11 +6810,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkSetPrivateData( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkSetPrivateData( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -6945,10 +6955,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueSubmit2( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkQueueSubmit2( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7402,7 +7413,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -7497,11 +7508,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Bool32 supported; - VkResult result = d.vkGetPhysicalDeviceSurfaceSupportKHR( - m_physicalDevice, queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceSupportKHR( + m_physicalDevice, queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); - return createResultValueType( static_cast( result ), supported ); + return createResultValueType( result, supported ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7523,11 +7534,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( - m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( + m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); - return createResultValueType( static_cast( result ), surfaceCapabilities ); + return createResultValueType( result, surfaceCapabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7551,30 +7562,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( - m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( + m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } - return createResultValueType( static_cast( result ), surfaceFormats ); + return createResultValueType( result, surfaceFormats ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator, @@ -7584,24 +7596,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats( surfaceFormatKHRAllocator ); uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( - m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( + m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } - return createResultValueType( static_cast( result ), surfaceFormats ); + return createResultValueType( result, surfaceFormats ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7625,30 +7638,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes; uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( + d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( - m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( + m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } - return createResultValueType( static_cast( result ), presentModes ); + return createResultValueType( result, presentModes ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, PresentModeKHRAllocator & presentModeKHRAllocator, @@ -7658,24 +7672,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes( presentModeKHRAllocator ); uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( + d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( - m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( + m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } - return createResultValueType( static_cast( result ), presentModes ); + return createResultValueType( result, presentModes ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7704,14 +7719,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHR" ); + reinterpret_cast( &swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHR" ); - return createResultValueType( static_cast( result ), swapchain ); + return createResultValueType( result, swapchain ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -7724,16 +7739,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHRUnique" ); + reinterpret_cast( &swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7804,27 +7818,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector swapchainImages; uint32_t swapchainImageCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) + result = static_cast( + d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); - result = d.vkGetSwapchainImagesKHR( - m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ); + result = static_cast( d.vkGetSwapchainImagesKHR( + m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { swapchainImages.resize( swapchainImageCount ); } - return createResultValueType( static_cast( result ), swapchainImages ); + return createResultValueType( result, swapchainImages ); } - template ::value, int>::type> + template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, ImageAllocator & imageAllocator, Dispatch const & d ) const { @@ -7832,24 +7850,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector swapchainImages( imageAllocator ); uint32_t swapchainImageCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) + result = static_cast( + d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); - result = d.vkGetSwapchainImagesKHR( - m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ); + result = static_cast( d.vkGetSwapchainImagesKHR( + m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { swapchainImages.resize( swapchainImageCount ); } - return createResultValueType( static_cast( result ), swapchainImages ); + return createResultValueType( result, swapchainImages ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7876,10 +7895,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint32_t imageIndex; - VkResult result = d.vkAcquireNextImageKHR( - m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ); - resultCheck( static_cast( result ), + uint32_t imageIndex; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireNextImageKHR( + m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImageKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, @@ -7905,10 +7924,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } @@ -7931,11 +7950,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; - VkResult result = - d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); - return createResultValueType( static_cast( result ), deviceGroupPresentCapabilities ); + return createResultValueType( result, deviceGroupPresentCapabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7957,11 +7976,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = d.vkGetDeviceGroupSurfacePresentModesKHR( - m_device, static_cast( surface ), reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceGroupSurfacePresentModesKHR( + m_device, static_cast( surface ), reinterpret_cast( &modes ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); - return createResultValueType( static_cast( result ), modes ); + return createResultValueType( result, modes ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7985,27 +8004,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector rects; uint32_t rectCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) + result = static_cast( + d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); - result = d.vkGetPhysicalDevicePresentRectanglesKHR( - m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); + result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( + m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { rects.resize( rectCount ); } - return createResultValueType( static_cast( result ), rects ); + return createResultValueType( result, rects ); } - template ::value, int>::type> + template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Rect2DAllocator & rect2DAllocator, Dispatch const & d ) const { @@ -8013,24 +8036,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector rects( rect2DAllocator ); uint32_t rectCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) + result = static_cast( + d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); - result = d.vkGetPhysicalDevicePresentRectanglesKHR( - m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); + result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( + m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { rects.resize( rectCount ); } - return createResultValueType( static_cast( result ), rects ); + return createResultValueType( result, rects ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8050,9 +8074,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint32_t imageIndex; - VkResult result = d.vkAcquireNextImage2KHR( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ); - resultCheck( static_cast( result ), + uint32_t imageIndex; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkAcquireNextImage2KHR( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, @@ -8084,29 +8109,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator, Dispatch const & d ) const { @@ -8114,23 +8140,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayPropertiesKHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8154,30 +8181,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlanePropertiesKHR( DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, Dispatch const & d ) const @@ -8186,24 +8213,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayPlanePropertiesKHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8227,29 +8254,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector displays; uint32_t displayCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ); - if ( ( result == VK_SUCCESS ) && displayCount ) + result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) { displays.resize( displayCount ); - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ); + result = static_cast( + d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); VULKAN_HPP_ASSERT( displayCount <= displays.size() ); if ( displayCount < displays.size() ) { displays.resize( displayCount ); } - return createResultValueType( static_cast( result ), displays ); + return createResultValueType( result, displays ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, DisplayKHRAllocator & displayKHRAllocator, Dispatch const & d ) const { @@ -8257,23 +8285,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector displays( displayKHRAllocator ); uint32_t displayCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ); - if ( ( result == VK_SUCCESS ) && displayCount ) + result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) { displays.resize( displayCount ); - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ); + result = static_cast( + d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); VULKAN_HPP_ASSERT( displayCount <= displays.size() ); if ( displayCount < displays.size() ) { displays.resize( displayCount ); } - return createResultValueType( static_cast( result ), displays ); + return createResultValueType( result, displays ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8298,30 +8327,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetDisplayModePropertiesKHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetDisplayModePropertiesKHR( + m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, @@ -8332,24 +8362,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayModePropertiesKHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetDisplayModePropertiesKHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetDisplayModePropertiesKHR( + m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8379,15 +8410,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &mode ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHR" ); + reinterpret_cast( &mode ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHR" ); - return createResultValueType( static_cast( result ), mode ); + return createResultValueType( result, mode ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8401,17 +8432,16 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &mode ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHRUnique" ); + reinterpret_cast( &mode ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( mode, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( mode, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8436,11 +8466,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; - VkResult result = d.vkGetDisplayPlaneCapabilitiesKHR( - m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDisplayPlaneCapabilitiesKHR( + m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); - return createResultValueType( static_cast( result ), capabilities ); + return createResultValueType( result, capabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8467,14 +8497,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDisplayPlaneSurfaceKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHR" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHR" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8487,16 +8517,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDisplayPlaneSurfaceKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHRUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8528,21 +8557,21 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); + reinterpret_cast( swapchains.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); - return createResultValueType( static_cast( result ), swapchains ); + return createResultValueType( result, swapchains ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -8552,15 +8581,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector swapchains( createInfos.size(), swapchainKHRAllocator ); - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); + reinterpret_cast( swapchains.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); - return createResultValueType( static_cast( result ), swapchains ); + return createResultValueType( result, swapchains ); } template @@ -8572,15 +8601,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHR" ); + reinterpret_cast( &swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHR" ); - return createResultValueType( static_cast( result ), swapchain ); + return createResultValueType( result, swapchain ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8594,13 +8623,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); + reinterpret_cast( swapchains.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); std::vector, SwapchainKHRAllocator> uniqueSwapchains; uniqueSwapchains.reserve( createInfos.size() ); ObjectDestroy deleter( *this, allocator, d ); @@ -8608,13 +8637,13 @@ namespace VULKAN_HPP_NAMESPACE { uniqueSwapchains.push_back( UniqueHandle( swapchain, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueSwapchains ) ); + return createResultValueType( result, std::move( uniqueSwapchains ) ); } template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, SwapchainKHRAllocator>>::type Device::createSharedSwapchainsKHRUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -8625,13 +8654,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); + reinterpret_cast( swapchains.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); std::vector, SwapchainKHRAllocator> uniqueSwapchains( swapchainKHRAllocator ); uniqueSwapchains.reserve( createInfos.size() ); ObjectDestroy deleter( *this, allocator, d ); @@ -8639,7 +8668,7 @@ namespace VULKAN_HPP_NAMESPACE { uniqueSwapchains.push_back( UniqueHandle( swapchain, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueSwapchains ) ); + return createResultValueType( result, std::move( uniqueSwapchains ) ); } template @@ -8651,17 +8680,16 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHRUnique" ); + reinterpret_cast( &swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8692,14 +8720,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createXlibSurfaceKHR" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createXlibSurfaceKHR" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8712,16 +8740,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createXlibSurfaceKHRUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createXlibSurfaceKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8774,14 +8801,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createXcbSurfaceKHR" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createXcbSurfaceKHR" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8794,16 +8821,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createXcbSurfaceKHRUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createXcbSurfaceKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8860,14 +8886,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateWaylandSurfaceKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createWaylandSurfaceKHR" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createWaylandSurfaceKHR" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8880,16 +8906,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateWaylandSurfaceKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createWaylandSurfaceKHRUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createWaylandSurfaceKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8943,14 +8968,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateAndroidSurfaceKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createAndroidSurfaceKHR" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createAndroidSurfaceKHR" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8963,16 +8988,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateAndroidSurfaceKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createAndroidSurfaceKHRUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createAndroidSurfaceKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9004,14 +9028,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createWin32SurfaceKHR" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createWin32SurfaceKHR" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -9024,16 +9048,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createWin32SurfaceKHRUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createWin32SurfaceKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9072,14 +9095,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback; - VkResult result = d.vkCreateDebugReportCallbackEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &callback ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugReportCallbackEXT" ); + reinterpret_cast( &callback ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugReportCallbackEXT" ); - return createResultValueType( static_cast( result ), callback ); + return createResultValueType( result, callback ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -9092,16 +9115,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback; - VkResult result = d.vkCreateDebugReportCallbackEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &callback ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugReportCallbackEXTUnique" ); + reinterpret_cast( &callback ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugReportCallbackEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( callback, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( callback, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9218,10 +9240,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9240,10 +9263,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9312,11 +9336,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR capabilities; - VkResult result = d.vkGetPhysicalDeviceVideoCapabilitiesKHR( - m_physicalDevice, reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceVideoCapabilitiesKHR( + m_physicalDevice, reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); - return createResultValueType( static_cast( result ), capabilities ); + return createResultValueType( result, capabilities ); } template @@ -9327,11 +9351,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR & capabilities = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceVideoCapabilitiesKHR( - m_physicalDevice, reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceVideoCapabilitiesKHR( + m_physicalDevice, reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9359,33 +9383,34 @@ namespace VULKAN_HPP_NAMESPACE std::vector videoFormatProperties; uint32_t videoFormatPropertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( - m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && videoFormatPropertyCount ) + result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( + m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { videoFormatProperties.resize( videoFormatPropertyCount ); - result = d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, - reinterpret_cast( &videoFormatInfo ), - &videoFormatPropertyCount, - reinterpret_cast( videoFormatProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, + reinterpret_cast( &videoFormatInfo ), + &videoFormatPropertyCount, + reinterpret_cast( videoFormatProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { videoFormatProperties.resize( videoFormatPropertyCount ); } - return createResultValueType( static_cast( result ), videoFormatProperties ); + return createResultValueType( result, videoFormatProperties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, @@ -9396,27 +9421,28 @@ namespace VULKAN_HPP_NAMESPACE std::vector videoFormatProperties( videoFormatPropertiesKHRAllocator ); uint32_t videoFormatPropertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( - m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && videoFormatPropertyCount ) + result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( + m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { videoFormatProperties.resize( videoFormatPropertyCount ); - result = d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, - reinterpret_cast( &videoFormatInfo ), - &videoFormatPropertyCount, - reinterpret_cast( videoFormatProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, + reinterpret_cast( &videoFormatInfo ), + &videoFormatPropertyCount, + reinterpret_cast( videoFormatProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { videoFormatProperties.resize( videoFormatPropertyCount ); } - return createResultValueType( static_cast( result ), videoFormatProperties ); + return createResultValueType( result, videoFormatProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9443,14 +9469,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateVideoSessionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &videoSession ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionKHR" ); + reinterpret_cast( &videoSession ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionKHR" ); - return createResultValueType( static_cast( result ), videoSession ); + return createResultValueType( result, videoSession ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -9463,16 +9489,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateVideoSessionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &videoSession ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionKHRUnique" ); + reinterpret_cast( &videoSession ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( videoSession, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( videoSession, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9549,19 +9574,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector memoryRequirements; uint32_t memoryRequirementsCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, nullptr ); - if ( ( result == VK_SUCCESS ) && memoryRequirementsCount ) + result = static_cast( + d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && memoryRequirementsCount ) { memoryRequirements.resize( memoryRequirementsCount ); - result = d.vkGetVideoSessionMemoryRequirementsKHR( m_device, - static_cast( videoSession ), - &memoryRequirementsCount, - reinterpret_cast( memoryRequirements.data() ) ); + result = static_cast( + d.vkGetVideoSessionMemoryRequirementsKHR( m_device, + static_cast( videoSession ), + &memoryRequirementsCount, + reinterpret_cast( memoryRequirements.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); if ( memoryRequirementsCount < memoryRequirements.size() ) @@ -9574,7 +9601,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, @@ -9585,20 +9612,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector memoryRequirements( videoSessionMemoryRequirementsKHRAllocator ); - uint32_t memoryRequirementsCount; - VkResult result; + uint32_t memoryRequirementsCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, nullptr ); - if ( ( result == VK_SUCCESS ) && memoryRequirementsCount ) + result = static_cast( + d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && memoryRequirementsCount ) { memoryRequirements.resize( memoryRequirementsCount ); - result = d.vkGetVideoSessionMemoryRequirementsKHR( m_device, - static_cast( videoSession ), - &memoryRequirementsCount, - reinterpret_cast( memoryRequirements.data() ) ); + result = static_cast( + d.vkGetVideoSessionMemoryRequirementsKHR( m_device, + static_cast( videoSession ), + &memoryRequirementsCount, + reinterpret_cast( memoryRequirements.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); if ( memoryRequirementsCount < memoryRequirements.size() ) @@ -9632,13 +9661,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindVideoSessionMemoryKHR( m_device, - static_cast( videoSession ), - bindSessionMemoryInfos.size(), - reinterpret_cast( bindSessionMemoryInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindVideoSessionMemoryKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindVideoSessionMemoryKHR( m_device, + static_cast( videoSession ), + bindSessionMemoryInfos.size(), + reinterpret_cast( bindSessionMemoryInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindVideoSessionMemoryKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9666,14 +9696,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters; - VkResult result = d.vkCreateVideoSessionParametersKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateVideoSessionParametersKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &videoSessionParameters ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionParametersKHR" ); + reinterpret_cast( &videoSessionParameters ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionParametersKHR" ); - return createResultValueType( static_cast( result ), videoSessionParameters ); + return createResultValueType( result, videoSessionParameters ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -9686,14 +9716,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters; - VkResult result = d.vkCreateVideoSessionParametersKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateVideoSessionParametersKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &videoSessionParameters ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionParametersKHRUnique" ); + reinterpret_cast( &videoSessionParameters ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionParametersKHRUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( videoSessionParameters, ObjectDestroy( *this, allocator, d ) ) ); } @@ -9721,12 +9751,13 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkUpdateVideoSessionParametersKHR( m_device, - static_cast( videoSessionParameters ), - reinterpret_cast( &updateInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::updateVideoSessionParametersKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkUpdateVideoSessionParametersKHR( m_device, + static_cast( videoSessionParameters ), + reinterpret_cast( &updateInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::updateVideoSessionParametersKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10055,14 +10086,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CuModuleNVX module; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCuModuleNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &module ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCuModuleNVX" ); + reinterpret_cast( &module ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCuModuleNVX" ); - return createResultValueType( static_cast( result ), module ); + return createResultValueType( result, module ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -10075,14 +10106,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CuModuleNVX module; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCuModuleNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &module ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCuModuleNVXUnique" ); + reinterpret_cast( &module ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCuModuleNVXUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( module, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -10111,14 +10142,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CuFunctionNVX function; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCuFunctionNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &function ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCuFunctionNVX" ); + reinterpret_cast( &function ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCuFunctionNVX" ); - return createResultValueType( static_cast( result ), function ); + return createResultValueType( result, function ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -10131,16 +10162,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CuFunctionNVX function; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCuFunctionNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &function ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCuFunctionNVXUnique" ); + reinterpret_cast( &function ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCuFunctionNVXUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( function, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( function, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10297,11 +10327,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties; - VkResult result = - d.vkGetImageViewAddressNVX( m_device, static_cast( imageView ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewAddressNVX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetImageViewAddressNVX( m_device, static_cast( imageView ), reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewAddressNVX" ); - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10376,33 +10406,33 @@ namespace VULKAN_HPP_NAMESPACE std::vector info; size_t infoSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && infoSize ) + result = static_cast( d.vkGetShaderInfoAMD( m_device, + static_cast( pipeline ), + static_cast( shaderStage ), + static_cast( infoType ), + &infoSize, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && infoSize ) { info.resize( infoSize ); - result = d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - reinterpret_cast( info.data() ) ); + result = static_cast( d.vkGetShaderInfoAMD( m_device, + static_cast( pipeline ), + static_cast( shaderStage ), + static_cast( infoType ), + &infoSize, + reinterpret_cast( info.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); VULKAN_HPP_ASSERT( infoSize <= info.size() ); if ( infoSize < info.size() ) { info.resize( infoSize ); } - return createResultValueType( static_cast( result ), info ); + return createResultValueType( result, info ); } template info( uint8_tAllocator ); size_t infoSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && infoSize ) + result = static_cast( d.vkGetShaderInfoAMD( m_device, + static_cast( pipeline ), + static_cast( shaderStage ), + static_cast( infoType ), + &infoSize, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && infoSize ) { info.resize( infoSize ); - result = d.vkGetShaderInfoAMD( m_device, - static_cast( pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - reinterpret_cast( info.data() ) ); + result = static_cast( d.vkGetShaderInfoAMD( m_device, + static_cast( pipeline ), + static_cast( shaderStage ), + static_cast( infoType ), + &infoSize, + reinterpret_cast( info.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); VULKAN_HPP_ASSERT( infoSize <= info.size() ); if ( infoSize < info.size() ) { info.resize( infoSize ); } - return createResultValueType( static_cast( result ), info ); + return createResultValueType( result, info ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10505,14 +10535,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateStreamDescriptorSurfaceGGP( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateStreamDescriptorSurfaceGGP( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createStreamDescriptorSurfaceGGP" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createStreamDescriptorSurfaceGGP" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -10525,16 +10555,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateStreamDescriptorSurfaceGGP( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateStreamDescriptorSurfaceGGP( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createStreamDescriptorSurfaceGGPUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createStreamDescriptorSurfaceGGPUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10579,7 +10608,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), @@ -10587,10 +10616,10 @@ namespace VULKAN_HPP_NAMESPACE static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), - reinterpret_cast( &externalImageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); + reinterpret_cast( &externalImageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); - return createResultValueType( static_cast( result ), externalImageFormatProperties ); + return createResultValueType( result, externalImageFormatProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10615,12 +10644,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - HANDLE handle; - VkResult result = - d.vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleNV" ); + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleNV" ); - return createResultValueType( static_cast( result ), handle ); + return createResultValueType( result, handle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -10756,12 +10785,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, + reinterpret_cast( &imageFormatInfo ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); - return createResultValueType( static_cast( result ), imageFormatProperties ); + return createResultValueType( result, imageFormatProperties ); } template @@ -10772,12 +10802,13 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, + reinterpret_cast( &imageFormatInfo ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10816,7 +10847,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d ) const { @@ -10982,7 +11013,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, @@ -11084,14 +11115,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createViSurfaceNN" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createViSurfaceNN" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -11104,16 +11135,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createViSurfaceNNUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createViSurfaceNNUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11153,30 +11183,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroupsKHR( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( + m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); + return createResultValueType( result, physicalDeviceGroupProperties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroupsKHR( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const @@ -11185,25 +11215,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties( physicalDeviceGroupPropertiesAllocator ); - uint32_t physicalDeviceGroupCount; - VkResult result; + uint32_t physicalDeviceGroupCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroupsKHR( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( + m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); + return createResultValueType( result, physicalDeviceGroupProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11257,11 +11287,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - HANDLE handle; - VkResult result = d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); - return createResultValueType( static_cast( result ), handle ); + return createResultValueType( result, handle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11287,13 +11318,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; - VkResult result = d.vkGetMemoryWin32HandlePropertiesKHR( m_device, - static_cast( handleType ), - handle, - reinterpret_cast( &memoryWin32HandleProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemoryWin32HandlePropertiesKHR( m_device, + static_cast( handleType ), + handle, + reinterpret_cast( &memoryWin32HandleProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); - return createResultValueType( static_cast( result ), memoryWin32HandleProperties ); + return createResultValueType( result, memoryWin32HandleProperties ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -11316,11 +11348,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - int fd; - VkResult result = d.vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); - return createResultValueType( static_cast( result ), fd ); + return createResultValueType( result, fd ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11343,11 +11376,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; - VkResult result = d.vkGetMemoryFdPropertiesKHR( - m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryFdPropertiesKHR( + m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); - return createResultValueType( static_cast( result ), memoryFdProperties ); + return createResultValueType( result, memoryFdProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11402,11 +11435,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &importSemaphoreWin32HandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &importSemaphoreWin32HandleInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11426,11 +11459,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - HANDLE handle; - VkResult result = d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); - return createResultValueType( static_cast( result ), handle ); + return createResultValueType( result, handle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -11452,10 +11486,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11475,11 +11510,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - int fd; - VkResult result = d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); - return createResultValueType( static_cast( result ), fd ); + return createResultValueType( result, fd ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11606,14 +11642,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; - VkResult result = d.vkCreateDescriptorUpdateTemplateKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorUpdateTemplate ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateKHR" ); + reinterpret_cast( &descriptorUpdateTemplate ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateKHR" ); - return createResultValueType( static_cast( result ), descriptorUpdateTemplate ); + return createResultValueType( result, descriptorUpdateTemplate ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -11626,14 +11662,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; - VkResult result = d.vkCreateDescriptorUpdateTemplateKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorUpdateTemplate ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateKHRUnique" ); + reinterpret_cast( &descriptorUpdateTemplate ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateKHRUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( descriptorUpdateTemplate, ObjectDestroy( *this, allocator, d ) ) ); } @@ -11756,10 +11792,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11781,10 +11818,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getRandROutputDisplayEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getRandROutputDisplayEXT" ); - return createResultValueType( static_cast( result ), display ); + return createResultValueType( result, display ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -11795,10 +11833,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getRandROutputDisplayEXTUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getRandROutputDisplayEXTUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( display, ObjectRelease( *this, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -11826,11 +11865,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( - m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( + m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); - return createResultValueType( static_cast( result ), surfaceCapabilities ); + return createResultValueType( result, surfaceCapabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11854,11 +11893,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -11884,15 +11923,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDeviceEventEXT( + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXT" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXT" ); - return createResultValueType( static_cast( result ), fence ); + return createResultValueType( result, fence ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -11904,15 +11943,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDeviceEventEXT( + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXTUnique" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXTUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -11943,16 +11982,16 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDisplayEventEXT( + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXT" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXT" ); - return createResultValueType( static_cast( result ), fence ); + return createResultValueType( result, fence ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -11965,16 +12004,16 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDisplayEventEXT( + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXTUnique" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXTUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -11998,12 +12037,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint64_t counterValue; - VkResult result = - d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainCounterEXT" ); + uint64_t counterValue; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainCounterEXT" ); - return createResultValueType( static_cast( result ), counterValue ); + return createResultValueType( result, counterValue ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12028,11 +12067,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties; - VkResult result = d.vkGetRefreshCycleDurationGOOGLE( - m_device, static_cast( swapchain ), reinterpret_cast( &displayTimingProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRefreshCycleDurationGOOGLE" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRefreshCycleDurationGOOGLE( + m_device, static_cast( swapchain ), reinterpret_cast( &displayTimingProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRefreshCycleDurationGOOGLE" ); - return createResultValueType( static_cast( result ), displayTimingProperties ); + return createResultValueType( result, displayTimingProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12060,32 +12099,34 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentationTimings; uint32_t presentationTimingCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentationTimingCount ) + result = static_cast( + d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentationTimingCount ) { presentationTimings.resize( presentationTimingCount ); - result = d.vkGetPastPresentationTimingGOOGLE( m_device, - static_cast( swapchain ), - &presentationTimingCount, - reinterpret_cast( presentationTimings.data() ) ); + result = static_cast( + d.vkGetPastPresentationTimingGOOGLE( m_device, + static_cast( swapchain ), + &presentationTimingCount, + reinterpret_cast( presentationTimings.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); if ( presentationTimingCount < presentationTimings.size() ) { presentationTimings.resize( presentationTimingCount ); } - return createResultValueType( static_cast( result ), presentationTimings ); + return createResultValueType( result, presentationTimings ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, @@ -12096,27 +12137,29 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentationTimings( pastPresentationTimingGOOGLEAllocator ); - uint32_t presentationTimingCount; - VkResult result; + uint32_t presentationTimingCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentationTimingCount ) + result = static_cast( + d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentationTimingCount ) { presentationTimings.resize( presentationTimingCount ); - result = d.vkGetPastPresentationTimingGOOGLE( m_device, - static_cast( swapchain ), - &presentationTimingCount, - reinterpret_cast( presentationTimings.data() ) ); + result = static_cast( + d.vkGetPastPresentationTimingGOOGLE( m_device, + static_cast( swapchain ), + &presentationTimingCount, + reinterpret_cast( presentationTimings.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); if ( presentationTimingCount < presentationTimings.size() ) { presentationTimings.resize( presentationTimingCount ); } - return createResultValueType( static_cast( result ), presentationTimings ); + return createResultValueType( result, presentationTimings ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12222,14 +12265,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2KHR" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2KHR" ); - return createResultValueType( static_cast( result ), renderPass ); + return createResultValueType( result, renderPass ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -12242,16 +12285,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2KHRUnique" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2KHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12338,8 +12380,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainStatusKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); @@ -12396,10 +12439,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( &importFenceWin32HandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( &importFenceWin32HandleInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12420,11 +12464,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - HANDLE handle; - VkResult result = d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); - return createResultValueType( static_cast( result ), handle ); + return createResultValueType( result, handle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -12446,10 +12491,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12469,11 +12515,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - int fd; - VkResult result = d.vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); - return createResultValueType( static_cast( result ), fd ); + return createResultValueType( result, fd ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12511,31 +12558,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) + result = static_cast( + d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + result = static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); + reinterpret_cast( counterDescriptions.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); } - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template ::value && - std::is_same::value, + typename std::enable_if::value && + std::is_same::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, @@ -12563,31 +12610,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) + result = static_cast( + d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + result = static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); + reinterpret_cast( counterDescriptions.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); } - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12632,10 +12679,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12668,12 +12716,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - return createResultValueType( static_cast( result ), surfaceCapabilities ); + return createResultValueType( result, surfaceCapabilities ); } template @@ -12684,12 +12733,13 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12715,33 +12765,34 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } - return createResultValueType( static_cast( result ), surfaceFormats ); + return createResultValueType( result, surfaceFormats ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator, @@ -12751,27 +12802,28 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats( surfaceFormat2KHRAllocator ); uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } - return createResultValueType( static_cast( result ), surfaceFormats ); + return createResultValueType( result, surfaceFormats ); } template @@ -12783,12 +12835,12 @@ namespace VULKAN_HPP_NAMESPACE std::vector structureChains; std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); @@ -12796,13 +12848,14 @@ namespace VULKAN_HPP_NAMESPACE { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -12812,7 +12865,7 @@ namespace VULKAN_HPP_NAMESPACE { structureChains[i].template get() = surfaceFormats[i]; } - return createResultValueType( static_cast( result ), structureChains ); + return createResultValueType( result, structureChains ); } template structureChains( structureChainAllocator ); std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); @@ -12843,13 +12896,14 @@ namespace VULKAN_HPP_NAMESPACE { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -12859,7 +12913,7 @@ namespace VULKAN_HPP_NAMESPACE { structureChains[i].template get() = surfaceFormats[i]; } - return createResultValueType( static_cast( result ), structureChains ); + return createResultValueType( result, structureChains ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12885,30 +12939,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = - d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator, Dispatch const & d ) const @@ -12917,24 +12971,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayProperties2KHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = - d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -12958,30 +13012,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneProperties2KHR( DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, Dispatch const & d ) const @@ -12990,24 +13044,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayPlaneProperties2KHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13032,30 +13086,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetDisplayModeProperties2KHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetDisplayModeProperties2KHR( + m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, @@ -13066,24 +13121,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayModeProperties2KHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetDisplayModeProperties2KHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetDisplayModeProperties2KHR( + m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13107,12 +13163,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; - VkResult result = d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &displayPlaneInfo ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, + reinterpret_cast( &displayPlaneInfo ), + reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); - return createResultValueType( static_cast( result ), capabilities ); + return createResultValueType( result, capabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13142,14 +13199,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createIOSSurfaceMVK" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createIOSSurfaceMVK" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -13162,16 +13219,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createIOSSurfaceMVKUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createIOSSurfaceMVKUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13203,14 +13259,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createMacOSSurfaceMVK" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createMacOSSurfaceMVK" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -13223,16 +13279,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createMacOSSurfaceMVKUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createMacOSSurfaceMVKUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13255,10 +13310,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13277,10 +13333,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13398,14 +13455,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; - VkResult result = d.vkCreateDebugUtilsMessengerEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &messenger ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXT" ); + reinterpret_cast( &messenger ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXT" ); - return createResultValueType( static_cast( result ), messenger ); + return createResultValueType( result, messenger ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -13418,16 +13475,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; - VkResult result = d.vkCreateDebugUtilsMessengerEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &messenger ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXTUnique" ); + reinterpret_cast( &messenger ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( messenger, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( messenger, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13533,11 +13589,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties; - VkResult result = - d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template @@ -13549,11 +13605,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID & properties = structureChain.template get(); - VkResult result = - d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13575,12 +13631,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - struct AHardwareBuffer * buffer; - VkResult result = - d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast( &info ), &buffer ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); + struct AHardwareBuffer * buffer; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast( &info ), &buffer ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); - return createResultValueType( static_cast( result ), buffer ); + return createResultValueType( result, buffer ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ @@ -13617,14 +13673,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateExecutionGraphPipelinesAMDX( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelinesAMDX", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -13634,7 +13690,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -13645,14 +13701,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateExecutionGraphPipelinesAMDX( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelinesAMDX", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -13669,14 +13725,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateExecutionGraphPipelinesAMDX( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelineAMDX", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -13695,14 +13751,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateExecutionGraphPipelinesAMDX( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelinesAMDXUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; @@ -13719,7 +13775,7 @@ namespace VULKAN_HPP_NAMESPACE template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createExecutionGraphPipelinesAMDXUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, @@ -13731,14 +13787,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateExecutionGraphPipelinesAMDX( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelinesAMDXUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); @@ -13762,14 +13818,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateExecutionGraphPipelinesAMDX( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelineAMDXUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -13799,11 +13855,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX sizeInfo; - VkResult result = d.vkGetExecutionGraphPipelineScratchSizeAMDX( - m_device, static_cast( executionGraph ), reinterpret_cast( &sizeInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getExecutionGraphPipelineScratchSizeAMDX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetExecutionGraphPipelineScratchSizeAMDX( + m_device, static_cast( executionGraph ), reinterpret_cast( &sizeInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getExecutionGraphPipelineScratchSizeAMDX" ); - return createResultValueType( static_cast( result ), sizeInfo ); + return createResultValueType( result, sizeInfo ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -13826,12 +13882,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint32_t nodeIndex; - VkResult result = d.vkGetExecutionGraphPipelineNodeIndexAMDX( - m_device, static_cast( executionGraph ), reinterpret_cast( &nodeInfo ), &nodeIndex ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getExecutionGraphPipelineNodeIndexAMDX" ); + uint32_t nodeIndex; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetExecutionGraphPipelineNodeIndexAMDX( + m_device, static_cast( executionGraph ), reinterpret_cast( &nodeInfo ), &nodeIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getExecutionGraphPipelineNodeIndexAMDX" ); - return createResultValueType( static_cast( result ), nodeIndex ); + return createResultValueType( result, nodeIndex ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -14064,7 +14120,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -14118,14 +14174,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure; - VkResult result = d.vkCreateAccelerationStructureKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAccelerationStructureKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &accelerationStructure ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureKHR" ); + reinterpret_cast( &accelerationStructure ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureKHR" ); - return createResultValueType( static_cast( result ), accelerationStructure ); + return createResultValueType( result, accelerationStructure ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -14138,15 +14194,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure; - VkResult result = d.vkCreateAccelerationStructureKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAccelerationStructureKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &accelerationStructure ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureKHRUnique" ); + reinterpret_cast( &accelerationStructure ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureKHRUnique" ); return createResultValueType( - static_cast( result ), + result, UniqueHandle( accelerationStructure, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -14330,14 +14386,14 @@ namespace VULKAN_HPP_NAMESPACE } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBuildAccelerationStructuresKHR( m_device, static_cast( deferredOperation ), infos.size(), reinterpret_cast( infos.data() ), - reinterpret_cast( pBuildRangeInfos.data() ) ); + reinterpret_cast( pBuildRangeInfos.data() ) ) ); resultCheck( - static_cast( result ), + result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); @@ -14364,10 +14420,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCopyAccelerationStructureKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyAccelerationStructureKHR( + m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); resultCheck( - static_cast( result ), + result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); @@ -14395,10 +14451,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCopyAccelerationStructureToMemoryKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyAccelerationStructureToMemoryKHR( + m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); resultCheck( - static_cast( result ), + result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureToMemoryKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); @@ -14426,10 +14482,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCopyMemoryToAccelerationStructureKHR( - m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMemoryToAccelerationStructureKHR( + m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); resultCheck( - static_cast( result ), + result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToAccelerationStructureKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); @@ -14471,16 +14527,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkWriteAccelerationStructuresPropertiesKHR( m_device, - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkWriteAccelerationStructuresPropertiesKHR( m_device, + accelerationStructures.size(), + reinterpret_cast( accelerationStructures.data() ), + static_cast( queryType ), + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ), + stride ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertiesKHR" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template @@ -14492,17 +14549,18 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkWriteAccelerationStructuresPropertiesKHR( m_device, - accelerationStructures.size(), - reinterpret_cast( accelerationStructures.data() ), - static_cast( queryType ), - sizeof( DataType ), - reinterpret_cast( &data ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertyKHR" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkWriteAccelerationStructuresPropertiesKHR( m_device, + accelerationStructures.size(), + reinterpret_cast( accelerationStructures.data() ), + static_cast( queryType ), + sizeof( DataType ), + reinterpret_cast( &data ), + stride ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertyKHR" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -14776,15 +14834,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -14797,7 +14855,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, @@ -14809,15 +14867,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateRayTracingPipelinesKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -14838,15 +14896,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateRayTracingPipelinesKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -14869,15 +14927,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -14897,7 +14955,7 @@ namespace VULKAN_HPP_NAMESPACE template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, @@ -14910,15 +14968,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -14946,15 +15004,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateRayTracingPipelinesKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -14990,11 +15048,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetRayTracingShaderGroupHandlesKHR( - m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingShaderGroupHandlesKHR( + m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesKHR" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template @@ -15003,12 +15061,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetRayTracingShaderGroupHandlesKHR( - m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandleKHR" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingShaderGroupHandlesKHR( + m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandleKHR" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15035,11 +15093,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( - m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandlesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( + m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandlesKHR" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template @@ -15048,12 +15106,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( - m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandleKHR" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( + m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandleKHR" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15138,14 +15196,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversionKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionKHR" ); + reinterpret_cast( &ycbcrConversion ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionKHR" ); - return createResultValueType( static_cast( result ), ycbcrConversion ); + return createResultValueType( result, ycbcrConversion ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -15158,16 +15216,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversionKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionKHRUnique" ); + reinterpret_cast( &ycbcrConversion ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( ycbcrConversion, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( ycbcrConversion, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15216,10 +15273,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindBufferMemory2KHR( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindBufferMemory2KHR( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15239,10 +15297,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindImageMemory2KHR( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindImageMemory2KHR( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15265,11 +15324,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; - VkResult result = d.vkGetImageDrmFormatModifierPropertiesEXT( - m_device, static_cast( image ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageDrmFormatModifierPropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetImageDrmFormatModifierPropertiesEXT( + m_device, static_cast( image ), reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageDrmFormatModifierPropertiesEXT" ); - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15298,14 +15357,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache; - VkResult result = d.vkCreateValidationCacheEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &validationCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createValidationCacheEXT" ); + reinterpret_cast( &validationCache ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createValidationCacheEXT" ); - return createResultValueType( static_cast( result ), validationCache ); + return createResultValueType( result, validationCache ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -15318,16 +15377,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache; - VkResult result = d.vkCreateValidationCacheEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &validationCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createValidationCacheEXTUnique" ); + reinterpret_cast( &validationCache ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createValidationCacheEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( validationCache, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( validationCache, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15402,11 +15460,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkMergeValidationCachesEXT( - m_device, static_cast( dstCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mergeValidationCachesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMergeValidationCachesEXT( + m_device, static_cast( dstCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mergeValidationCachesEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15429,24 +15487,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector data; size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( + d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = - d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template data( uint8_tAllocator ); size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( + d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = - d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15572,14 +15632,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure; - VkResult result = d.vkCreateAccelerationStructureNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &accelerationStructure ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureNV" ); + reinterpret_cast( &accelerationStructure ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureNV" ); - return createResultValueType( static_cast( result ), accelerationStructure ); + return createResultValueType( result, accelerationStructure ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -15592,15 +15652,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure; - VkResult result = d.vkCreateAccelerationStructureNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &accelerationStructure ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureNVUnique" ); + reinterpret_cast( &accelerationStructure ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureNVUnique" ); return createResultValueType( - static_cast( result ), + result, UniqueHandle( accelerationStructure, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -15717,11 +15777,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindAccelerationStructureMemoryNV( - m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindAccelerationStructureMemoryNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindAccelerationStructureMemoryNV( + m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindAccelerationStructureMemoryNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15850,14 +15910,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -15867,7 +15927,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -15878,14 +15938,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateRayTracingPipelinesNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -15902,14 +15962,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateRayTracingPipelinesNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineNV", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -15927,14 +15987,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; @@ -15951,7 +16011,7 @@ namespace VULKAN_HPP_NAMESPACE template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -15962,14 +16022,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateRayTracingPipelinesNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); @@ -15993,14 +16053,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateRayTracingPipelinesNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineNVUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -16033,11 +16093,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetRayTracingShaderGroupHandlesNV( - m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingShaderGroupHandlesNV( + m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesNV" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template @@ -16046,12 +16106,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetRayTracingShaderGroupHandlesNV( - m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandleNV" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingShaderGroupHandlesNV( + m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandleNV" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16075,11 +16135,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetAccelerationStructureHandleNV( - m_device, static_cast( accelerationStructure ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetAccelerationStructureHandleNV( + m_device, static_cast( accelerationStructure ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template @@ -16088,12 +16148,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetAccelerationStructureHandleNV( - m_device, static_cast( accelerationStructure ), sizeof( DataType ), reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetAccelerationStructureHandleNV( + m_device, static_cast( accelerationStructure ), sizeof( DataType ), reinterpret_cast( &data ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16150,10 +16210,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCompileDeferredNV( m_device, static_cast( pipeline ), shader ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::compileDeferredNV" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkCompileDeferredNV( m_device, static_cast( pipeline ), shader ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::compileDeferredNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -16266,13 +16327,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; - VkResult result = d.vkGetMemoryHostPointerPropertiesEXT( m_device, - static_cast( handleType ), - pHostPointer, - reinterpret_cast( &memoryHostPointerProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemoryHostPointerPropertiesEXT( m_device, + static_cast( handleType ), + pHostPointer, + reinterpret_cast( &memoryHostPointerProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); - return createResultValueType( static_cast( result ), memoryHostPointerProperties ); + return createResultValueType( result, memoryHostPointerProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16314,30 +16376,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains; uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = - d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } - return createResultValueType( static_cast( result ), timeDomains ); + return createResultValueType( result, timeDomains ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCalibrateableTimeDomainsEXT( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d ) const { @@ -16345,24 +16407,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains( timeDomainKHRAllocator ); uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = - d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } - return createResultValueType( static_cast( result ), timeDomains ); + return createResultValueType( result, timeDomains ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16390,11 +16452,11 @@ namespace VULKAN_HPP_NAMESPACE std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = d.vkGetCalibratedTimestampsEXT( - m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsEXT( + m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = d.vkGetCalibratedTimestampsEXT( - m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsEXT( + m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template @@ -16428,11 +16490,11 @@ namespace VULKAN_HPP_NAMESPACE std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = - d.vkGetCalibratedTimestampsEXT( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetCalibratedTimestampsEXT( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16577,7 +16639,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointDataNV( CheckpointDataNVAllocator & checkpointDataNVAllocator, Dispatch const & d ) const { @@ -16616,11 +16678,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint64_t value; - VkResult result = d.vkGetSemaphoreCounterValueKHR( m_device, static_cast( semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValueKHR" ); + uint64_t value; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetSemaphoreCounterValueKHR( m_device, static_cast( semaphore ), &value ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValueKHR" ); - return createResultValueType( static_cast( result ), value ); + return createResultValueType( result, value ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16640,10 +16703,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkWaitSemaphoresKHR( m_device, reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkWaitSemaphoresKHR( m_device, reinterpret_cast( &waitInfo ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } @@ -16664,10 +16727,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSignalSemaphoreKHR( m_device, reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkSignalSemaphoreKHR( m_device, reinterpret_cast( &signalInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16689,10 +16753,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkInitializePerformanceApiINTEL( m_device, reinterpret_cast( &initializeInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkInitializePerformanceApiINTEL( m_device, reinterpret_cast( &initializeInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16718,10 +16783,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCmdSetPerformanceMarkerINTEL( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkCmdSetPerformanceMarkerINTEL( m_commandBuffer, reinterpret_cast( &markerInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16741,10 +16807,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCmdSetPerformanceStreamMarkerINTEL( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkCmdSetPerformanceStreamMarkerINTEL( m_commandBuffer, reinterpret_cast( &markerInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16764,10 +16831,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCmdSetPerformanceOverrideINTEL( m_commandBuffer, reinterpret_cast( &overrideInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkCmdSetPerformanceOverrideINTEL( m_commandBuffer, reinterpret_cast( &overrideInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16791,12 +16859,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration; - VkResult result = d.vkAcquirePerformanceConfigurationINTEL( m_device, - reinterpret_cast( &acquireInfo ), - reinterpret_cast( &configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquirePerformanceConfigurationINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkAcquirePerformanceConfigurationINTEL( m_device, + reinterpret_cast( &acquireInfo ), + reinterpret_cast( &configuration ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquirePerformanceConfigurationINTEL" ); - return createResultValueType( static_cast( result ), configuration ); + return createResultValueType( result, configuration ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -16808,14 +16877,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration; - VkResult result = d.vkAcquirePerformanceConfigurationINTEL( m_device, - reinterpret_cast( &acquireInfo ), - reinterpret_cast( &configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquirePerformanceConfigurationINTELUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkAcquirePerformanceConfigurationINTEL( m_device, + reinterpret_cast( &acquireInfo ), + reinterpret_cast( &configuration ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquirePerformanceConfigurationINTELUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( configuration, ObjectRelease( *this, d ) ) ); + result, UniqueHandle( configuration, ObjectRelease( *this, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16835,10 +16904,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::releasePerformanceConfigurationINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releasePerformanceConfigurationINTEL" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -16857,10 +16927,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::release" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::release" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -16879,10 +16950,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueSetPerformanceConfigurationINTEL( m_queue, static_cast( configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkQueueSetPerformanceConfigurationINTEL( m_queue, static_cast( configuration ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -16904,11 +16976,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value; - VkResult result = d.vkGetPerformanceParameterINTEL( - m_device, static_cast( parameter ), reinterpret_cast( &value ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPerformanceParameterINTEL( + m_device, static_cast( parameter ), reinterpret_cast( &value ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); - return createResultValueType( static_cast( result ), value ); + return createResultValueType( result, value ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -16950,14 +17022,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateImagePipeSurfaceFUCHSIA( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createImagePipeSurfaceFUCHSIA" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createImagePipeSurfaceFUCHSIA" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -16970,16 +17042,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateImagePipeSurfaceFUCHSIA( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createImagePipeSurfaceFUCHSIAUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createImagePipeSurfaceFUCHSIAUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -17011,14 +17082,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMetalSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createMetalSurfaceEXT" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createMetalSurfaceEXT" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -17031,16 +17102,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMetalSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createMetalSurfaceEXTUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createMetalSurfaceEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -17069,30 +17139,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector fragmentShadingRates; uint32_t fragmentShadingRateCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) + result = + static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( - m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( + m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { fragmentShadingRates.resize( fragmentShadingRateCount ); } - return createResultValueType( static_cast( result ), fragmentShadingRates ); + return createResultValueType( result, fragmentShadingRates ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getFragmentShadingRatesKHR( PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator, @@ -17102,25 +17173,26 @@ namespace VULKAN_HPP_NAMESPACE std::vector fragmentShadingRates( physicalDeviceFragmentShadingRateKHRAllocator ); - uint32_t fragmentShadingRateCount; - VkResult result; + uint32_t fragmentShadingRateCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) + result = + static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( - m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( + m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { fragmentShadingRates.resize( fragmentShadingRateCount ); } - return createResultValueType( static_cast( result ), fragmentShadingRates ); + return createResultValueType( result, fragmentShadingRates ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -17192,30 +17264,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties; uint32_t toolCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } - return createResultValueType( static_cast( result ), toolProperties ); + return createResultValueType( result, toolProperties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getToolPropertiesEXT( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d ) const @@ -17224,25 +17296,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties( physicalDeviceToolPropertiesAllocator ); - uint32_t toolCount; - VkResult result; + uint32_t toolCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } - return createResultValueType( static_cast( result ), toolProperties ); + return createResultValueType( result, toolProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -17265,8 +17337,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkWaitForPresentKHR( m_device, static_cast( swapchain ), presentId, timeout ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkWaitForPresentKHR( m_device, static_cast( swapchain ), presentId, timeout ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForPresentKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); @@ -17295,30 +17368,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCooperativeMatrixPropertiesNV( CooperativeMatrixPropertiesNVAllocator & cooperativeMatrixPropertiesNVAllocator, @@ -17328,25 +17401,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( cooperativeMatrixPropertiesNVAllocator ); - uint32_t propertyCount; - VkResult result; + uint32_t propertyCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -17371,31 +17444,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector combinations; uint32_t combinationCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && combinationCount ) + result = static_cast( + d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && combinationCount ) { combinations.resize( combinationCount ); - result = d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); if ( combinationCount < combinations.size() ) { combinations.resize( combinationCount ); } - return createResultValueType( static_cast( result ), combinations ); + return createResultValueType( result, combinations ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( @@ -17405,26 +17478,26 @@ namespace VULKAN_HPP_NAMESPACE std::vector combinations( framebufferMixedSamplesCombinationNVAllocator ); - uint32_t combinationCount; - VkResult result; + uint32_t combinationCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && combinationCount ) + result = static_cast( + d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && combinationCount ) { combinations.resize( combinationCount ); - result = d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); if ( combinationCount < combinations.size() ) { combinations.resize( combinationCount ); } - return createResultValueType( static_cast( result ), combinations ); + return createResultValueType( result, combinations ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -17454,33 +17527,34 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes; uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfacePresentModes2EXT( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &presentModeCount, + reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } - return createResultValueType( static_cast( result ), presentModes ); + return createResultValueType( result, presentModes ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, PresentModeKHRAllocator & presentModeKHRAllocator, @@ -17490,27 +17564,28 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes( presentModeKHRAllocator ); uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfacePresentModes2EXT( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &presentModeCount, + reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } - return createResultValueType( static_cast( result ), presentModes ); + return createResultValueType( result, presentModes ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -17529,10 +17604,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquireFullScreenExclusiveModeEXT" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireFullScreenExclusiveModeEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -17551,10 +17627,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::releaseFullScreenExclusiveModeEXT" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releaseFullScreenExclusiveModeEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -17577,11 +17654,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = d.vkGetDeviceGroupSurfacePresentModes2EXT( - m_device, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceGroupSurfacePresentModes2EXT( + m_device, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &modes ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); - return createResultValueType( static_cast( result ), modes ); + return createResultValueType( result, modes ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -17611,14 +17688,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateHeadlessSurfaceEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXT" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXT" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -17631,16 +17708,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateHeadlessSurfaceEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXTUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -17926,13 +18002,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation; - VkResult result = d.vkCreateDeferredOperationKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDeferredOperationKHR( m_device, reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &deferredOperation ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDeferredOperationKHR" ); + reinterpret_cast( &deferredOperation ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDeferredOperationKHR" ); - return createResultValueType( static_cast( result ), deferredOperation ); + return createResultValueType( result, deferredOperation ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -17943,15 +18019,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation; - VkResult result = d.vkCreateDeferredOperationKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDeferredOperationKHR( m_device, reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &deferredOperation ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDeferredOperationKHRUnique" ); + reinterpret_cast( &deferredOperation ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDeferredOperationKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( deferredOperation, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( deferredOperation, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18029,7 +18104,8 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkGetDeferredOperationResultKHR( m_device, static_cast( operation ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetDeferredOperationResultKHR( m_device, static_cast( operation ) ) ); return static_cast( result ); } @@ -18050,8 +18126,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkDeferredOperationJoinKHR( m_device, static_cast( operation ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkDeferredOperationJoinKHR( m_device, static_cast( operation ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::deferredOperationJoinKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR, VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR } ); @@ -18084,32 +18161,34 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t executableCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ); - if ( ( result == VK_SUCCESS ) && executableCount ) + result = static_cast( + d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && executableCount ) { properties.resize( executableCount ); - result = d.vkGetPipelineExecutablePropertiesKHR( m_device, - reinterpret_cast( &pipelineInfo ), - &executableCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPipelineExecutablePropertiesKHR( m_device, + reinterpret_cast( &pipelineInfo ), + &executableCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); VULKAN_HPP_ASSERT( executableCount <= properties.size() ); if ( executableCount < properties.size() ) { properties.resize( executableCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, @@ -18120,27 +18199,29 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( pipelineExecutablePropertiesKHRAllocator ); - uint32_t executableCount; - VkResult result; + uint32_t executableCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ); - if ( ( result == VK_SUCCESS ) && executableCount ) + result = static_cast( + d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && executableCount ) { properties.resize( executableCount ); - result = d.vkGetPipelineExecutablePropertiesKHR( m_device, - reinterpret_cast( &pipelineInfo ), - &executableCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPipelineExecutablePropertiesKHR( m_device, + reinterpret_cast( &pipelineInfo ), + &executableCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); VULKAN_HPP_ASSERT( executableCount <= properties.size() ); if ( executableCount < properties.size() ) { properties.resize( executableCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18168,33 +18249,34 @@ namespace VULKAN_HPP_NAMESPACE std::vector statistics; uint32_t statisticCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast( &executableInfo ), &statisticCount, nullptr ); - if ( ( result == VK_SUCCESS ) && statisticCount ) + result = static_cast( d.vkGetPipelineExecutableStatisticsKHR( + m_device, reinterpret_cast( &executableInfo ), &statisticCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && statisticCount ) { statistics.resize( statisticCount ); - result = d.vkGetPipelineExecutableStatisticsKHR( m_device, - reinterpret_cast( &executableInfo ), - &statisticCount, - reinterpret_cast( statistics.data() ) ); + result = static_cast( + d.vkGetPipelineExecutableStatisticsKHR( m_device, + reinterpret_cast( &executableInfo ), + &statisticCount, + reinterpret_cast( statistics.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); if ( statisticCount < statistics.size() ) { statistics.resize( statisticCount ); } - return createResultValueType( static_cast( result ), statistics ); + return createResultValueType( result, statistics ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, @@ -18205,28 +18287,29 @@ namespace VULKAN_HPP_NAMESPACE std::vector statistics( pipelineExecutableStatisticKHRAllocator ); - uint32_t statisticCount; - VkResult result; + uint32_t statisticCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast( &executableInfo ), &statisticCount, nullptr ); - if ( ( result == VK_SUCCESS ) && statisticCount ) + result = static_cast( d.vkGetPipelineExecutableStatisticsKHR( + m_device, reinterpret_cast( &executableInfo ), &statisticCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && statisticCount ) { statistics.resize( statisticCount ); - result = d.vkGetPipelineExecutableStatisticsKHR( m_device, - reinterpret_cast( &executableInfo ), - &statisticCount, - reinterpret_cast( statistics.data() ) ); + result = static_cast( + d.vkGetPipelineExecutableStatisticsKHR( m_device, + reinterpret_cast( &executableInfo ), + &statisticCount, + reinterpret_cast( statistics.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); if ( statisticCount < statistics.size() ) { statistics.resize( statisticCount ); } - return createResultValueType( static_cast( result ), statistics ); + return createResultValueType( result, statistics ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18254,36 +18337,36 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector - internalRepresentations; - uint32_t internalRepresentationCount; - VkResult result; + internalRepresentations; + uint32_t internalRepresentationCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPipelineExecutableInternalRepresentationsKHR( - m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && internalRepresentationCount ) + result = static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( + m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && internalRepresentationCount ) { internalRepresentations.resize( internalRepresentationCount ); - result = d.vkGetPipelineExecutableInternalRepresentationsKHR( + result = static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, - reinterpret_cast( internalRepresentations.data() ) ); + reinterpret_cast( internalRepresentations.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); if ( internalRepresentationCount < internalRepresentations.size() ) { internalRepresentations.resize( internalRepresentationCount ); } - return createResultValueType( static_cast( result ), internalRepresentations ); + return createResultValueType( result, internalRepresentations ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType< std::vector>::type Device::getPipelineExecutableInternalRepresentationsKHR( @@ -18294,30 +18377,30 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector - internalRepresentations( pipelineExecutableInternalRepresentationKHRAllocator ); - uint32_t internalRepresentationCount; - VkResult result; + internalRepresentations( pipelineExecutableInternalRepresentationKHRAllocator ); + uint32_t internalRepresentationCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPipelineExecutableInternalRepresentationsKHR( - m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && internalRepresentationCount ) + result = static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( + m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && internalRepresentationCount ) { internalRepresentations.resize( internalRepresentationCount ); - result = d.vkGetPipelineExecutableInternalRepresentationsKHR( + result = static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, - reinterpret_cast( internalRepresentations.data() ) ); + reinterpret_cast( internalRepresentations.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); if ( internalRepresentationCount < internalRepresentations.size() ) { internalRepresentations.resize( internalRepresentationCount ); } - return createResultValueType( static_cast( result ), internalRepresentations ); + return createResultValueType( result, internalRepresentations ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18338,10 +18421,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCopyMemoryToImageEXT( m_device, reinterpret_cast( ©MemoryToImageInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToImageEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkCopyMemoryToImageEXT( m_device, reinterpret_cast( ©MemoryToImageInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToImageEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18360,10 +18444,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCopyImageToMemoryEXT( m_device, reinterpret_cast( ©ImageToMemoryInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToMemoryEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkCopyImageToMemoryEXT( m_device, reinterpret_cast( ©ImageToMemoryInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToMemoryEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18382,10 +18467,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCopyImageToImageEXT( m_device, reinterpret_cast( ©ImageToImageInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToImageEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkCopyImageToImageEXT( m_device, reinterpret_cast( ©ImageToImageInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToImageEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18407,11 +18493,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkTransitionImageLayoutEXT( m_device, transitions.size(), reinterpret_cast( transitions.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::transitionImageLayoutEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkTransitionImageLayoutEXT( m_device, transitions.size(), reinterpret_cast( transitions.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::transitionImageLayoutEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18479,11 +18565,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - void * pData; - VkResult result = d.vkMapMemory2KHR( m_device, reinterpret_cast( &memoryMapInfo ), &pData ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory2KHR" ); + void * pData; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkMapMemory2KHR( m_device, reinterpret_cast( &memoryMapInfo ), &pData ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory2KHR" ); - return createResultValueType( static_cast( result ), pData ); + return createResultValueType( result, pData ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18523,10 +18610,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkReleaseSwapchainImagesEXT( m_device, reinterpret_cast( &releaseInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::releaseSwapchainImagesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkReleaseSwapchainImagesEXT( m_device, reinterpret_cast( &releaseInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releaseSwapchainImagesEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18652,14 +18740,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout; - VkResult result = d.vkCreateIndirectCommandsLayoutNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIndirectCommandsLayoutNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &indirectCommandsLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutNV" ); + reinterpret_cast( &indirectCommandsLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutNV" ); - return createResultValueType( static_cast( result ), indirectCommandsLayout ); + return createResultValueType( result, indirectCommandsLayout ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -18672,14 +18760,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout; - VkResult result = d.vkCreateIndirectCommandsLayoutNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIndirectCommandsLayoutNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &indirectCommandsLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutNVUnique" ); + reinterpret_cast( &indirectCommandsLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutNVUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( indirectCommandsLayout, ObjectDestroy( *this, allocator, d ) ) ); } @@ -18775,10 +18863,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkAcquireDrmDisplayEXT( m_physicalDevice, drmFd, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkAcquireDrmDisplayEXT( m_physicalDevice, drmFd, static_cast( display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -18800,10 +18889,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDrmDisplayEXT" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( &display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDrmDisplayEXT" ); - return createResultValueType( static_cast( result ), display ); + return createResultValueType( result, display ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -18814,10 +18904,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDrmDisplayEXTUnique" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( &display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDrmDisplayEXTUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( display, ObjectRelease( *this, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -18848,14 +18939,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = d.vkCreatePrivateDataSlotEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlotEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotEXT" ); + reinterpret_cast( &privateDataSlot ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotEXT" ); - return createResultValueType( static_cast( result ), privateDataSlot ); + return createResultValueType( result, privateDataSlot ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -18868,16 +18959,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = d.vkCreatePrivateDataSlotEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlotEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotEXTUnique" ); + reinterpret_cast( &privateDataSlot ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( privateDataSlot, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( privateDataSlot, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -18928,11 +19018,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkSetPrivateDataEXT( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateDataEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkSetPrivateDataEXT( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateDataEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -18987,13 +19077,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR qualityLevelProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( m_physicalDevice, reinterpret_cast( &qualityLevelInfo ), - reinterpret_cast( &qualityLevelProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); + reinterpret_cast( &qualityLevelProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); - return createResultValueType( static_cast( result ), qualityLevelProperties ); + return createResultValueType( result, qualityLevelProperties ); } template @@ -19006,13 +19096,13 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR & qualityLevelProperties = structureChain.template get(); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( m_physicalDevice, reinterpret_cast( &qualityLevelInfo ), - reinterpret_cast( &qualityLevelProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); + reinterpret_cast( &qualityLevelProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19046,27 +19136,29 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first; std::vector & data = data_.second; size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetEncodedVideoSessionParametersKHR( m_device, - reinterpret_cast( &videoSessionParametersInfo ), - reinterpret_cast( &feedbackInfo ), - &dataSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( + d.vkGetEncodedVideoSessionParametersKHR( m_device, + reinterpret_cast( &videoSessionParametersInfo ), + reinterpret_cast( &feedbackInfo ), + &dataSize, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = d.vkGetEncodedVideoSessionParametersKHR( m_device, - reinterpret_cast( &videoSessionParametersInfo ), - reinterpret_cast( &feedbackInfo ), - &dataSize, - reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetEncodedVideoSessionParametersKHR( m_device, + reinterpret_cast( &videoSessionParametersInfo ), + reinterpret_cast( &feedbackInfo ), + &dataSize, + reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template & data = data_.second; size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetEncodedVideoSessionParametersKHR( m_device, - reinterpret_cast( &videoSessionParametersInfo ), - reinterpret_cast( &feedbackInfo ), - &dataSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( + d.vkGetEncodedVideoSessionParametersKHR( m_device, + reinterpret_cast( &videoSessionParametersInfo ), + reinterpret_cast( &feedbackInfo ), + &dataSize, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = d.vkGetEncodedVideoSessionParametersKHR( m_device, - reinterpret_cast( &videoSessionParametersInfo ), - reinterpret_cast( &feedbackInfo ), - &dataSize, - reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetEncodedVideoSessionParametersKHR( m_device, + reinterpret_cast( &videoSessionParametersInfo ), + reinterpret_cast( &feedbackInfo ), + &dataSize, + reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template @@ -19122,27 +19216,29 @@ namespace VULKAN_HPP_NAMESPACE data_.first.template get(); std::vector & data = data_.second; size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetEncodedVideoSessionParametersKHR( m_device, - reinterpret_cast( &videoSessionParametersInfo ), - reinterpret_cast( &feedbackInfo ), - &dataSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( + d.vkGetEncodedVideoSessionParametersKHR( m_device, + reinterpret_cast( &videoSessionParametersInfo ), + reinterpret_cast( &feedbackInfo ), + &dataSize, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = d.vkGetEncodedVideoSessionParametersKHR( m_device, - reinterpret_cast( &videoSessionParametersInfo ), - reinterpret_cast( &feedbackInfo ), - &dataSize, - reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetEncodedVideoSessionParametersKHR( m_device, + reinterpret_cast( &videoSessionParametersInfo ), + reinterpret_cast( &feedbackInfo ), + &dataSize, + reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template (); std::vector & data = data_.second; size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetEncodedVideoSessionParametersKHR( m_device, - reinterpret_cast( &videoSessionParametersInfo ), - reinterpret_cast( &feedbackInfo ), - &dataSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( + d.vkGetEncodedVideoSessionParametersKHR( m_device, + reinterpret_cast( &videoSessionParametersInfo ), + reinterpret_cast( &feedbackInfo ), + &dataSize, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = d.vkGetEncodedVideoSessionParametersKHR( m_device, - reinterpret_cast( &videoSessionParametersInfo ), - reinterpret_cast( &feedbackInfo ), - &dataSize, - reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetEncodedVideoSessionParametersKHR( m_device, + reinterpret_cast( &videoSessionParametersInfo ), + reinterpret_cast( &feedbackInfo ), + &dataSize, + reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19235,14 +19333,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CudaModuleNV module; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCudaModuleNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &module ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaModuleNV" ); + reinterpret_cast( &module ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaModuleNV" ); - return createResultValueType( static_cast( result ), module ); + return createResultValueType( result, module ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -19255,16 +19353,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CudaModuleNV module; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCudaModuleNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &module ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaModuleNVUnique" ); + reinterpret_cast( &module ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaModuleNVUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( module, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( module, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19288,23 +19385,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector cacheData; size_t cacheSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, nullptr ); - if ( ( result == VK_SUCCESS ) && cacheSize ) + result = static_cast( d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && cacheSize ) { cacheData.resize( cacheSize ); - result = d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, reinterpret_cast( cacheData.data() ) ); + result = static_cast( + d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, reinterpret_cast( cacheData.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCudaModuleCacheNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCudaModuleCacheNV" ); VULKAN_HPP_ASSERT( cacheSize <= cacheData.size() ); if ( cacheSize < cacheData.size() ) { cacheData.resize( cacheSize ); } - return createResultValueType( static_cast( result ), cacheData ); + return createResultValueType( result, cacheData ); } template cacheData( uint8_tAllocator ); size_t cacheSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, nullptr ); - if ( ( result == VK_SUCCESS ) && cacheSize ) + result = static_cast( d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && cacheSize ) { cacheData.resize( cacheSize ); - result = d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, reinterpret_cast( cacheData.data() ) ); + result = static_cast( + d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, reinterpret_cast( cacheData.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCudaModuleCacheNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCudaModuleCacheNV" ); VULKAN_HPP_ASSERT( cacheSize <= cacheData.size() ); if ( cacheSize < cacheData.size() ) { cacheData.resize( cacheSize ); } - return createResultValueType( static_cast( result ), cacheData ); + return createResultValueType( result, cacheData ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19361,14 +19460,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CudaFunctionNV function; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCudaFunctionNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &function ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaFunctionNV" ); + reinterpret_cast( &function ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaFunctionNV" ); - return createResultValueType( static_cast( result ), function ); + return createResultValueType( result, function ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -19381,16 +19480,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CudaFunctionNV function; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCudaFunctionNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &function ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaFunctionNVUnique" ); + reinterpret_cast( &function ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaFunctionNVUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( function, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( function, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19659,10 +19757,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueSubmit2KHR( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkQueueSubmit2KHR( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19711,7 +19810,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d ) const { @@ -19913,11 +20012,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetBufferOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetBufferOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferOpaqueCaptureDescriptorDataEXT" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19937,11 +20037,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetImageOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetImageOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageOpaqueCaptureDescriptorDataEXT" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19961,12 +20062,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = - d.vkGetImageViewOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetImageViewOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewOpaqueCaptureDescriptorDataEXT" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -19986,11 +20087,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetSamplerOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSamplerOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetSamplerOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSamplerOpaqueCaptureDescriptorDataEXT" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20011,13 +20113,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( - m_device, reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + m_device, reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20211,11 +20312,10 @@ namespace VULKAN_HPP_NAMESPACE std::pair data_; VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT & faultCounts = data_.first; VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT & faultInfo = data_.second; - VkResult result = - d.vkGetDeviceFaultInfoEXT( m_device, reinterpret_cast( &faultCounts ), reinterpret_cast( &faultInfo ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultInfoEXT", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceFaultInfoEXT( + m_device, reinterpret_cast( &faultCounts ), reinterpret_cast( &faultInfo ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultInfoEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); return ResultValue>( static_cast( result ), data_ ); @@ -20240,10 +20340,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkAcquireWinrtDisplayNV( m_physicalDevice, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireWinrtDisplayNV" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkAcquireWinrtDisplayNV( m_physicalDevice, static_cast( display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireWinrtDisplayNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -20264,10 +20365,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getWinrtDisplayNV" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( &display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getWinrtDisplayNV" ); - return createResultValueType( static_cast( result ), display ); + return createResultValueType( result, display ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -20278,10 +20380,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayKHR display; - VkResult result = d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( &display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getWinrtDisplayNVUnique" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( &display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getWinrtDisplayNVUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( display, ObjectRelease( *this, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -20314,14 +20417,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDirectFBSurfaceEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDirectFBSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDirectFBSurfaceEXT" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDirectFBSurfaceEXT" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -20334,16 +20437,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDirectFBSurfaceEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDirectFBSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDirectFBSurfaceEXTUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDirectFBSurfaceEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20426,12 +20528,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - zx_handle_t zirconHandle; - VkResult result = - d.vkGetMemoryZirconHandleFUCHSIA( m_device, reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); + zx_handle_t zirconHandle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemoryZirconHandleFUCHSIA( m_device, reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); - return createResultValueType( static_cast( result ), zirconHandle ); + return createResultValueType( result, zirconHandle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20460,13 +20562,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA memoryZirconHandleProperties; - VkResult result = d.vkGetMemoryZirconHandlePropertiesFUCHSIA( m_device, - static_cast( handleType ), - zirconHandle, - reinterpret_cast( &memoryZirconHandleProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemoryZirconHandlePropertiesFUCHSIA( m_device, + static_cast( handleType ), + zirconHandle, + reinterpret_cast( &memoryZirconHandleProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); - return createResultValueType( static_cast( result ), memoryZirconHandleProperties ); + return createResultValueType( result, memoryZirconHandleProperties ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -20491,11 +20594,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportSemaphoreZirconHandleFUCHSIA( - m_device, reinterpret_cast( &importSemaphoreZirconHandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreZirconHandleFUCHSIA" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkImportSemaphoreZirconHandleFUCHSIA( + m_device, reinterpret_cast( &importSemaphoreZirconHandleInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreZirconHandleFUCHSIA" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20517,12 +20620,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - zx_handle_t zirconHandle; - VkResult result = - d.vkGetSemaphoreZirconHandleFUCHSIA( m_device, reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); + zx_handle_t zirconHandle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetSemaphoreZirconHandleFUCHSIA( m_device, reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); - return createResultValueType( static_cast( result ), zirconHandle ); + return createResultValueType( result, zirconHandle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -20554,14 +20657,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection; - VkResult result = d.vkCreateBufferCollectionFUCHSIA( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferCollectionFUCHSIA( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &collection ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferCollectionFUCHSIA" ); + reinterpret_cast( &collection ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferCollectionFUCHSIA" ); - return createResultValueType( static_cast( result ), collection ); + return createResultValueType( result, collection ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -20574,16 +20677,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection; - VkResult result = d.vkCreateBufferCollectionFUCHSIA( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferCollectionFUCHSIA( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &collection ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferCollectionFUCHSIAUnique" ); + reinterpret_cast( &collection ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferCollectionFUCHSIAUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( collection, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( collection, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20608,11 +20710,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSetBufferCollectionImageConstraintsFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( &imageConstraintsInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setBufferCollectionImageConstraintsFUCHSIA" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetBufferCollectionImageConstraintsFUCHSIA( + m_device, static_cast( collection ), reinterpret_cast( &imageConstraintsInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setBufferCollectionImageConstraintsFUCHSIA" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20636,11 +20738,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSetBufferCollectionBufferConstraintsFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( &bufferConstraintsInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setBufferCollectionBufferConstraintsFUCHSIA" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetBufferCollectionBufferConstraintsFUCHSIA( + m_device, static_cast( collection ), reinterpret_cast( &bufferConstraintsInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setBufferCollectionBufferConstraintsFUCHSIA" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20713,11 +20815,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA properties; - VkResult result = d.vkGetBufferCollectionPropertiesFUCHSIA( - m_device, static_cast( collection ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferCollectionPropertiesFUCHSIA" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetBufferCollectionPropertiesFUCHSIA( + m_device, static_cast( collection ), reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferCollectionPropertiesFUCHSIA" ); - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ @@ -20742,9 +20844,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; - VkResult result = d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( - m_device, static_cast( renderpass ), reinterpret_cast( &maxWorkgroupSize ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( + m_device, static_cast( renderpass ), reinterpret_cast( &maxWorkgroupSize ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSubpassShadingMaxWorkgroupSizeHUAWEI", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); @@ -20791,11 +20893,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RemoteAddressNV address; - VkResult result = d.vkGetMemoryRemoteAddressNV( - m_device, reinterpret_cast( &memoryGetRemoteAddressInfo ), reinterpret_cast( &address ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryRemoteAddressNV( + m_device, reinterpret_cast( &memoryGetRemoteAddressInfo ), reinterpret_cast( &address ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); - return createResultValueType( static_cast( result ), address ); + return createResultValueType( result, address ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20819,11 +20921,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::BaseOutStructure pipelineProperties; - VkResult result = d.vkGetPipelinePropertiesEXT( - m_device, reinterpret_cast( &pipelineInfo ), reinterpret_cast( &pipelineProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPipelinePropertiesEXT( + m_device, reinterpret_cast( &pipelineInfo ), reinterpret_cast( &pipelineProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); - return createResultValueType( static_cast( result ), pipelineProperties ); + return createResultValueType( result, pipelineProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -20892,14 +20994,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateScreenSurfaceQNX( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateScreenSurfaceQNX( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createScreenSurfaceQNX" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createScreenSurfaceQNX" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -20912,16 +21014,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateScreenSurfaceQNX( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateScreenSurfaceQNX( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createScreenSurfaceQNXUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createScreenSurfaceQNXUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -21073,14 +21174,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MicromapEXT micromap; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMicromapEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( µmap ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createMicromapEXT" ); + reinterpret_cast( µmap ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createMicromapEXT" ); - return createResultValueType( static_cast( result ), micromap ); + return createResultValueType( result, micromap ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -21093,16 +21194,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MicromapEXT micromap; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMicromapEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( µmap ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createMicromapEXTUnique" ); + reinterpret_cast( µmap ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createMicromapEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( micromap, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( micromap, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -21193,10 +21293,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBuildMicromapsEXT( - m_device, static_cast( deferredOperation ), infos.size(), reinterpret_cast( infos.data() ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBuildMicromapsEXT( + m_device, static_cast( deferredOperation ), infos.size(), reinterpret_cast( infos.data() ) ) ); resultCheck( - static_cast( result ), + result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildMicromapsEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); @@ -21222,10 +21322,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkCopyMicromapEXT( m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkCopyMicromapEXT( m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); resultCheck( - static_cast( result ), + result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMicromapEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); @@ -21250,10 +21350,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCopyMicromapToMemoryEXT( - m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMicromapToMemoryEXT( + m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); resultCheck( - static_cast( result ), + result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMicromapToMemoryEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); @@ -21278,10 +21378,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkCopyMemoryToMicromapEXT( - m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMemoryToMicromapEXT( + m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); resultCheck( - static_cast( result ), + result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToMicromapEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); @@ -21316,16 +21416,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkWriteMicromapsPropertiesEXT( m_device, - micromaps.size(), - reinterpret_cast( micromaps.data() ), - static_cast( queryType ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkWriteMicromapsPropertiesEXT( m_device, + micromaps.size(), + reinterpret_cast( micromaps.data() ), + static_cast( queryType ), + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ), + stride ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertiesEXT" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template @@ -21337,17 +21438,18 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkWriteMicromapsPropertiesEXT( m_device, - micromaps.size(), - reinterpret_cast( micromaps.data() ), - static_cast( queryType ), - sizeof( DataType ), - reinterpret_cast( &data ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertyEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkWriteMicromapsPropertiesEXT( m_device, + micromaps.size(), + reinterpret_cast( micromaps.data() ), + static_cast( queryType ), + sizeof( DataType ), + reinterpret_cast( &data ), + stride ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertyEXT" ); - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -21651,7 +21753,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -22328,33 +22430,34 @@ namespace VULKAN_HPP_NAMESPACE std::vector imageFormatProperties; uint32_t formatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( - m_physicalDevice, reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && formatCount ) + result = static_cast( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( + m_physicalDevice, reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && formatCount ) { imageFormatProperties.resize( formatCount ); - result = d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( m_physicalDevice, - reinterpret_cast( &opticalFlowImageFormatInfo ), - &formatCount, - reinterpret_cast( imageFormatProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( m_physicalDevice, + reinterpret_cast( &opticalFlowImageFormatInfo ), + &formatCount, + reinterpret_cast( imageFormatProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); VULKAN_HPP_ASSERT( formatCount <= imageFormatProperties.size() ); if ( formatCount < imageFormatProperties.size() ) { imageFormatProperties.resize( formatCount ); } - return createResultValueType( static_cast( result ), imageFormatProperties ); + return createResultValueType( result, imageFormatProperties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV & opticalFlowImageFormatInfo, @@ -22365,28 +22468,29 @@ namespace VULKAN_HPP_NAMESPACE std::vector imageFormatProperties( opticalFlowImageFormatPropertiesNVAllocator ); - uint32_t formatCount; - VkResult result; + uint32_t formatCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( - m_physicalDevice, reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && formatCount ) + result = static_cast( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( + m_physicalDevice, reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && formatCount ) { imageFormatProperties.resize( formatCount ); - result = d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( m_physicalDevice, - reinterpret_cast( &opticalFlowImageFormatInfo ), - &formatCount, - reinterpret_cast( imageFormatProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( m_physicalDevice, + reinterpret_cast( &opticalFlowImageFormatInfo ), + &formatCount, + reinterpret_cast( imageFormatProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); VULKAN_HPP_ASSERT( formatCount <= imageFormatProperties.size() ); if ( formatCount < imageFormatProperties.size() ) { imageFormatProperties.resize( formatCount ); } - return createResultValueType( static_cast( result ), imageFormatProperties ); + return createResultValueType( result, imageFormatProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -22413,14 +22517,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session; - VkResult result = d.vkCreateOpticalFlowSessionNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateOpticalFlowSessionNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &session ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createOpticalFlowSessionNV" ); + reinterpret_cast( &session ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createOpticalFlowSessionNV" ); - return createResultValueType( static_cast( result ), session ); + return createResultValueType( result, session ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -22433,16 +22537,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session; - VkResult result = d.vkCreateOpticalFlowSessionNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateOpticalFlowSessionNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &session ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createOpticalFlowSessionNVUnique" ); + reinterpret_cast( &session ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createOpticalFlowSessionNVUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( session, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( session, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -22521,14 +22624,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindOpticalFlowSessionImageNV( m_device, - static_cast( session ), - static_cast( bindingPoint ), - static_cast( view ), - static_cast( layout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindOpticalFlowSessionImageNV" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkBindOpticalFlowSessionImageNV( m_device, + static_cast( session ), + static_cast( bindingPoint ), + static_cast( view ), + static_cast( layout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindOpticalFlowSessionImageNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -22709,21 +22813,21 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector shaders( createInfos.size() ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( shaders.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXT" ); + reinterpret_cast( shaders.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXT" ); - return createResultValueType( static_cast( result ), shaders ); + return createResultValueType( result, shaders ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -22733,15 +22837,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector shaders( createInfos.size(), shaderEXTAllocator ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( shaders.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXT" ); + reinterpret_cast( shaders.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXT" ); - return createResultValueType( static_cast( result ), shaders ); + return createResultValueType( result, shaders ); } template @@ -22753,15 +22857,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ShaderEXT shader; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &shader ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderEXT" ); + reinterpret_cast( &shader ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderEXT" ); - return createResultValueType( static_cast( result ), shader ); + return createResultValueType( result, shader ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -22775,13 +22879,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector shaders( createInfos.size() ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( shaders.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXTUnique" ); + reinterpret_cast( shaders.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXTUnique" ); std::vector, ShaderEXTAllocator> uniqueShaders; uniqueShaders.reserve( createInfos.size() ); ObjectDestroy deleter( *this, allocator, d ); @@ -22789,13 +22893,13 @@ namespace VULKAN_HPP_NAMESPACE { uniqueShaders.push_back( UniqueHandle( shader, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueShaders ) ); + return createResultValueType( result, std::move( uniqueShaders ) ); } template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, ShaderEXTAllocator>>::type Device::createShadersEXTUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -22806,13 +22910,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector shaders( createInfos.size() ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( shaders.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXTUnique" ); + reinterpret_cast( shaders.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXTUnique" ); std::vector, ShaderEXTAllocator> uniqueShaders( shaderEXTAllocator ); uniqueShaders.reserve( createInfos.size() ); ObjectDestroy deleter( *this, allocator, d ); @@ -22820,7 +22924,7 @@ namespace VULKAN_HPP_NAMESPACE { uniqueShaders.push_back( UniqueHandle( shader, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueShaders ) ); + return createResultValueType( result, std::move( uniqueShaders ) ); } template @@ -22832,15 +22936,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ShaderEXT shader; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &shader ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderEXTUnique" ); + reinterpret_cast( &shader ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderEXTUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( shader, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -22909,23 +23013,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector data; size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderBinaryDataEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderBinaryDataEXT" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } template data( uint8_tAllocator ); size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( + d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderBinaryDataEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderBinaryDataEXT" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } - return createResultValueType( static_cast( result ), data ); + return createResultValueType( result, data ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -23015,17 +23121,18 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertiesCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertiesCount ) + result = static_cast( + d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertiesCount ) { properties.resize( propertiesCount ); - result = d.vkGetFramebufferTilePropertiesQCOM( - m_device, static_cast( framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetFramebufferTilePropertiesQCOM( + m_device, static_cast( framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); if ( propertiesCount < properties.size() ) @@ -23038,7 +23145,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, TilePropertiesQCOMAllocator & tilePropertiesQCOMAllocator, @@ -23048,17 +23155,18 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( tilePropertiesQCOMAllocator ); uint32_t propertiesCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertiesCount ) + result = static_cast( + d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertiesCount ) { properties.resize( propertiesCount ); - result = d.vkGetFramebufferTilePropertiesQCOM( - m_device, static_cast( framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetFramebufferTilePropertiesQCOM( + m_device, static_cast( framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); if ( propertiesCount < properties.size() ) @@ -23114,11 +23222,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkSetLatencySleepModeNV( m_device, static_cast( swapchain ), reinterpret_cast( &sleepModeInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setLatencySleepModeNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkSetLatencySleepModeNV( m_device, static_cast( swapchain ), reinterpret_cast( &sleepModeInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setLatencySleepModeNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -23139,10 +23247,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkLatencySleepNV( m_device, static_cast( swapchain ), reinterpret_cast( &sleepInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::latencySleepNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkLatencySleepNV( m_device, static_cast( swapchain ), reinterpret_cast( &sleepInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::latencySleepNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -23230,30 +23339,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCooperativeMatrixPropertiesKHR( CooperativeMatrixPropertiesKHRAllocator & cooperativeMatrixPropertiesKHRAllocator, @@ -23263,25 +23372,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( cooperativeMatrixPropertiesKHRAllocator ); - uint32_t propertyCount; - VkResult result; + uint32_t propertyCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -23315,10 +23424,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX properties; - VkResult result = d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template @@ -23329,10 +23439,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX & properties = structureChain.template get(); - VkResult result = d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ @@ -23358,30 +23469,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains; uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = - d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } - return createResultValueType( static_cast( result ), timeDomains ); + return createResultValueType( result, timeDomains ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCalibrateableTimeDomainsKHR( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d ) const { @@ -23389,24 +23500,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains( timeDomainKHRAllocator ); uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = - d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } - return createResultValueType( static_cast( result ), timeDomains ); + return createResultValueType( result, timeDomains ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -23434,11 +23545,11 @@ namespace VULKAN_HPP_NAMESPACE std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = d.vkGetCalibratedTimestampsKHR( - m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsKHR( + m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = d.vkGetCalibratedTimestampsKHR( - m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsKHR( + m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template @@ -23472,11 +23583,11 @@ namespace VULKAN_HPP_NAMESPACE std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = - d.vkGetCalibratedTimestampsKHR( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetCalibratedTimestampsKHR( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampKHR" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ diff --git a/vulkan/vulkan_handles.hpp b/vulkan/vulkan_handles.hpp index 469db32..fa036c6 100644 --- a/vulkan/vulkan_handles.hpp +++ b/vulkan/vulkan_handles.hpp @@ -8680,7 +8680,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = CheckpointDataNVAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getCheckpointDataNV( CheckpointDataNVAllocator & checkpointDataNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8725,7 +8725,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = CheckpointData2NVAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9019,7 +9019,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageMemoryRequirementsAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, SparseImageMemoryRequirementsAllocator & sparseImageMemoryRequirementsAllocator, @@ -9596,10 +9596,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B0 = PipelineAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -9623,7 +9623,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -9653,10 +9653,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B0 = PipelineAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -9680,7 +9680,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -9910,7 +9910,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B0 = DescriptorSetAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, @@ -9924,7 +9924,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = DescriptorSetAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, DescriptorSetAllocator>>::type allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, @@ -10130,7 +10130,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B0 = CommandBufferAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, @@ -10144,7 +10144,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = CommandBufferAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, CommandBufferAllocator>>::type allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, @@ -10259,7 +10259,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -10596,7 +10596,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -10656,10 +10656,10 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = ImageAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B1 = ImageAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, ImageAllocator & imageAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10726,7 +10726,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B0 = SwapchainKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -10747,7 +10747,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = SwapchainKHRAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, SwapchainKHRAllocator>>::type createSharedSwapchainsKHRUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -10842,7 +10842,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = VideoSessionMemoryRequirementsKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, @@ -11328,7 +11328,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PastPresentationTimingGOOGLEAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, PastPresentationTimingGOOGLEAllocator & pastPresentationTimingGOOGLEAllocator, @@ -11513,10 +11513,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B0 = PipelineAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -11541,7 +11541,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createExecutionGraphPipelinesAMDXUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, @@ -11630,7 +11630,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -11810,10 +11810,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B0 = PipelineAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, @@ -11840,7 +11840,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, @@ -12134,10 +12134,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B0 = PipelineAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -12161,7 +12161,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -12567,7 +12567,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PipelineExecutablePropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, @@ -12590,7 +12590,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PipelineExecutableStatisticKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, @@ -12611,10 +12611,11 @@ namespace VULKAN_HPP_NAMESPACE std::vector>::type getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = PipelineExecutableInternalRepresentationKHRAllocator, - typename std::enable_if::value, int>::type = 0> + template < + typename PipelineExecutableInternalRepresentationKHRAllocator = std::allocator, + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B1 = PipelineExecutableInternalRepresentationKHRAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType< std::vector>::type getPipelineExecutableInternalRepresentationsKHR( @@ -13484,7 +13485,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -13685,10 +13686,10 @@ namespace VULKAN_HPP_NAMESPACE createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = ShaderEXTAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B0 = ShaderEXTAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -13709,7 +13710,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = ShaderEXTAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, ShaderEXTAllocator>>::type createShadersEXTUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -13777,7 +13778,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = TilePropertiesQCOMAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, TilePropertiesQCOMAllocator & tilePropertiesQCOMAllocator, @@ -14118,7 +14119,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = QueueFamilyPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -14167,7 +14168,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = ExtensionPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, @@ -14185,7 +14186,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = LayerPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -14212,7 +14213,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageFormatPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, @@ -14289,7 +14290,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = QueueFamilyProperties2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -14333,7 +14334,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageFormatProperties2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, @@ -14387,7 +14388,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceToolPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getToolProperties( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -14430,7 +14431,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SurfaceFormatKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator, @@ -14450,7 +14451,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PresentModeKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, PresentModeKHRAllocator & presentModeKHRAllocator, @@ -14468,10 +14469,10 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = Rect2DAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B1 = Rect2DAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Rect2DAllocator & rect2DAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -14490,7 +14491,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayPropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -14508,7 +14509,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayPlanePropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlanePropertiesKHR( DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -14523,10 +14524,10 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayKHRAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B1 = DisplayKHRAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, DisplayKHRAllocator & displayKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -14544,7 +14545,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayModePropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, DisplayModePropertiesKHRAllocator & displayModePropertiesKHRAllocator, @@ -14672,7 +14673,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = VideoFormatPropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, VideoFormatPropertiesKHRAllocator & videoFormatPropertiesKHRAllocator, @@ -14768,7 +14769,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = QueueFamilyProperties2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -14812,7 +14813,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageFormatProperties2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, @@ -14932,8 +14933,8 @@ namespace VULKAN_HPP_NAMESPACE typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PerformanceCounterKHRAllocator, typename B2 = PerformanceCounterDescriptionKHRAllocator, - typename std::enable_if::value && - std::is_same::value, + typename std::enable_if::value && + std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, @@ -14986,7 +14987,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SurfaceFormat2KHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator, @@ -15022,7 +15023,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -15040,7 +15041,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayPlaneProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneProperties2KHR( DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -15059,7 +15060,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayModeProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, DisplayModeProperties2KHRAllocator & displayModeProperties2KHRAllocator, @@ -15103,7 +15104,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = TimeDomainKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibrateableTimeDomainsEXT( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15123,7 +15124,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceFragmentShadingRateKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getFragmentShadingRatesKHR( PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator, @@ -15144,7 +15145,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceToolPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getToolPropertiesEXT( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -15165,7 +15166,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = CooperativeMatrixPropertiesNVAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCooperativeMatrixPropertiesNV( CooperativeMatrixPropertiesNVAllocator & cooperativeMatrixPropertiesNVAllocator, @@ -15188,7 +15189,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = FramebufferMixedSamplesCombinationNVAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSupportedFramebufferMixedSamplesCombinationsNV( FramebufferMixedSamplesCombinationNVAllocator & framebufferMixedSamplesCombinationNVAllocator, @@ -15211,7 +15212,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PresentModeKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, PresentModeKHRAllocator & presentModeKHRAllocator, @@ -15342,7 +15343,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = OpticalFlowImageFormatPropertiesNVAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV & opticalFlowImageFormatInfo, @@ -15365,7 +15366,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = CooperativeMatrixPropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCooperativeMatrixPropertiesKHR( CooperativeMatrixPropertiesKHRAllocator & cooperativeMatrixPropertiesKHRAllocator, @@ -15385,7 +15386,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = TimeDomainKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibrateableTimeDomainsKHR( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15497,7 +15498,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -15524,7 +15525,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceGroupPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDeviceGroups( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, @@ -15825,7 +15826,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceGroupPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDeviceGroupsKHR( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, @@ -16128,7 +16129,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = ExtensionPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, @@ -16146,7 +16147,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = LayerPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ diff --git a/vulkan/vulkan_hpp_macros.hpp b/vulkan/vulkan_hpp_macros.hpp index 9526a76..4ebf6e3 100644 --- a/vulkan/vulkan_hpp_macros.hpp +++ b/vulkan/vulkan_hpp_macros.hpp @@ -277,4 +277,21 @@ namespace VULKAN_HPP_NAMESPACE # define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER #endif +#if !defined( VULKAN_HPP_EXPECTED ) && ( 23 <= VULKAN_HPP_CPP_VERSION ) && defined( __cpp_lib_expected ) +# include +# define VULKAN_HPP_EXPECTED std::expected +# define VULKAN_HPP_UNEXPECTED std::unexpected +#endif + +#if !defined( VULKAN_HPP_RAII_NAMESPACE ) +# define VULKAN_HPP_RAII_NAMESPACE raii +#endif + +#if defined( VULKAN_HPP_NO_EXCEPTIONS ) && defined( VULKAN_HPP_EXPECTED ) +# define VULKAN_HPP_RAII_NO_EXCEPTIONS +# define VULKAN_HPP_RAII_CREATE_NOEXCEPT noexcept +#else +# define VULKAN_HPP_RAII_CREATE_NOEXCEPT +#endif + #endif \ No newline at end of file diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index e745cdf..a61f4af 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -8,15 +8,10 @@ #ifndef VULKAN_RAII_HPP #define VULKAN_RAII_HPP -#include #include // std::exchange, std::forward #include -#if !defined( VULKAN_HPP_RAII_NAMESPACE ) -# define VULKAN_HPP_RAII_NAMESPACE raii -#endif - -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) && !defined( VULKAN_HPP_NO_EXCEPTIONS ) +#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) namespace VULKAN_HPP_NAMESPACE { namespace VULKAN_HPP_RAII_NAMESPACE @@ -33,6 +28,17 @@ namespace VULKAN_HPP_NAMESPACE # endif } + template + class CreateReturnType + { + public: +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + using Type = VULKAN_HPP_EXPECTED; +# else + using Type = T; +# endif + }; + class ContextDispatcher : public DispatchLoaderBase { public: @@ -2741,9 +2747,10 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_0 === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Instance + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector enumerateInstanceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; @@ -2772,22 +2779,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eInstance; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_allocator( static_cast( allocator ) ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( context.getDispatcher()->vkCreateInstance( reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_instance ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateInstance" ); - } - m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher( context.getDispatcher()->vkGetInstanceProcAddr, - static_cast( m_instance ) ) ); + *this = context.createInstance( createInfo, allocator ); } +# endif Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, VkInstance instance, @@ -2866,7 +2865,9 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_0 === - VULKAN_HPP_NODISCARD std::vector enumeratePhysicalDevices() const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + enumeratePhysicalDevices() const; VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; @@ -2876,55 +2877,63 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_display === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createXlibSurfaceKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_XLIB_KHR*/ # if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createXcbSurfaceKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_XCB_KHR*/ # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createWaylandSurfaceKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createAndroidSurfaceKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createWin32SurfaceKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT - createDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, @@ -2937,17 +2946,19 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createStreamDescriptorSurfaceGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_GGP*/ # if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createViSurfaceNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_device_group_creation === @@ -2957,24 +2968,28 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createIOSSurfaceMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_IOS_MVK*/ # if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createMacOSSurfaceMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT - createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, @@ -2983,39 +2998,44 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createImagePipeSurfaceFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createMetalSurfaceEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_headless_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createDirectFBSurfaceEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createScreenSurfaceQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ private: @@ -3122,9 +3142,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties getMemoryProperties() const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Device + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector enumerateDeviceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; @@ -3211,7 +3232,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD std::vector getDisplayPlanePropertiesKHR() const; - VULKAN_HPP_NODISCARD std::vector getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const; # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === @@ -3315,7 +3338,8 @@ namespace VULKAN_HPP_NAMESPACE void acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayKHR getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === @@ -3396,7 +3420,8 @@ namespace VULKAN_HPP_NAMESPACE void acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayKHR getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_video_encode_queue === @@ -3410,7 +3435,8 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayKHR getWinrtDisplayNV( uint32_t deviceRelativeId ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + getWinrtDisplayNV( uint32_t deviceRelativeId ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) @@ -3448,37 +3474,12 @@ namespace VULKAN_HPP_NAMESPACE class PhysicalDevices : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PhysicalDevices( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * dispatcher = instance.getDispatcher(); - std::vector physicalDevices; - uint32_t physicalDeviceCount; - VULKAN_HPP_NAMESPACE::Result result; - do - { - result = static_cast( - dispatcher->vkEnumeratePhysicalDevices( static_cast( *instance ), &physicalDeviceCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) - { - physicalDevices.resize( physicalDeviceCount ); - result = static_cast( - dispatcher->vkEnumeratePhysicalDevices( static_cast( *instance ), &physicalDeviceCount, physicalDevices.data() ) ); - } - } 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 ) - { - this->emplace_back( instance, physicalDevice ); - } - } - else - { - detail::throwResultException( result, "vkEnumeratePhysicalDevices" ); - } + *this = instance.enumeratePhysicalDevices(); } +# endif PhysicalDevices( std::nullptr_t ) {} @@ -3487,6 +3488,12 @@ namespace VULKAN_HPP_NAMESPACE PhysicalDevices( PhysicalDevices && rhs ) = default; PhysicalDevices & operator=( PhysicalDevices const & ) = delete; PhysicalDevices & operator=( PhysicalDevices && rhs ) = default; + + private: + PhysicalDevices( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class Device @@ -3500,23 +3507,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDevice; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_allocator( static_cast( allocator ) ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - physicalDevice.getDispatcher()->vkCreateDevice( static_cast( *physicalDevice ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_device ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDevice" ); - } - m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher( physicalDevice.getDispatcher()->vkGetDeviceProcAddr, - static_cast( m_device ) ) ); + *this = physicalDevice.createDevice( createInfo, allocator ); } +# endif Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VkDevice device, @@ -3597,21 +3595,25 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void waitIdle() const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DeviceMemory - allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void flushMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges ) const; void invalidateMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void resetFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences ) const; @@ -3619,99 +3621,126 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Semaphore + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Event + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::QueryPool + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Buffer + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::BufferView + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Image + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::ImageView + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::ShaderModule - createShaderModule( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createShaderModule( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PipelineCache - createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD std::vector + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type createGraphicsPipelines( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createGraphicsPipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD std::vector + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type createComputePipelines( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createComputePipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PipelineLayout - createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Sampler + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout - createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorPool - createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD std::vector - allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const; void updateDescriptorSets( VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorCopies ) const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Framebuffer + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::RenderPass + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CommandPool + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD std::vector - allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const; //=== VK_VERSION_1_1 === @@ -3739,15 +3768,20 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Queue getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate - createDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; @@ -3758,9 +3792,10 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_2 === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::RenderPass + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const; @@ -3776,9 +3811,11 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_3 === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, @@ -3808,9 +3845,11 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_swapchain === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR getGroupPresentCapabilitiesKHR() const; @@ -3822,13 +3861,16 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_display_swapchain === - VULKAN_HPP_NODISCARD std::vector - createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_EXT_debug_marker === @@ -3838,23 +3880,30 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_video_queue === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR - createVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR - createVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_NVX_binary_import === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX - createCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_NVX_image_view_handle === @@ -3897,9 +3946,11 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_descriptor_update_template === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate - createDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator @@ -3909,14 +3960,16 @@ namespace VULKAN_HPP_NAMESPACE void displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_EXT_hdr_metadata === @@ -3925,9 +3978,10 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_create_renderpass2 === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::RenderPass + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createRenderPass2KHR( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === @@ -3972,15 +4026,18 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === - VULKAN_HPP_NODISCARD std::vector createExecutionGraphPipelinesAMDX( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + createExecutionGraphPipelinesAMDX( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline createExecutionGraphPipelineAMDX( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createExecutionGraphPipelineAMDX( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_KHR_get_memory_requirements2 === @@ -4004,9 +4061,11 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_acceleration_structure === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR - createAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, @@ -4051,23 +4110,28 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_ray_tracing_pipeline === - VULKAN_HPP_NODISCARD std::vector createRayTracingPipelinesKHR( - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + createRayTracingPipelinesKHR( + VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline createRayTracingPipelineKHR( - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createRayTracingPipelineKHR( + VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_sampler_ycbcr_conversion === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - createSamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createSamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator @@ -4081,15 +4145,19 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_validation_cache === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT - createValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_NV_ray_tracing === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV - createAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; @@ -4101,15 +4169,17 @@ namespace VULKAN_HPP_NAMESPACE void bindAccelerationStructureMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const; - VULKAN_HPP_NODISCARD std::vector + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_maintenance3 === @@ -4145,8 +4215,10 @@ namespace VULKAN_HPP_NAMESPACE void uninitializePerformanceApiINTEL() const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL - acquirePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + acquirePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PerformanceValueINTEL getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter ) const; @@ -4175,8 +4247,10 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_deferred_host_operations === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR - createDeferredOperationKHR( VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDeferredOperationKHR( VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_pipeline_executable_properties === @@ -4218,15 +4292,19 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV - createIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_EXT_private_data === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - createPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator @@ -4253,13 +4331,17 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CudaModuleNV - createCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CudaFunctionNV - createCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) @@ -4322,9 +4404,11 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA - createBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_NV_external_memory_rdma === @@ -4338,9 +4422,10 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_opacity_micromap === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::MicromapEXT + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result buildMicromapsEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, @@ -4417,9 +4502,11 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_NV_optical_flow === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::OpticalFlowSessionNV - createOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_maintenance5 === @@ -4435,13 +4522,15 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_shader_object === - VULKAN_HPP_NODISCARD std::vector - createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::ShaderEXT + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createShaderEXT( VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_QCOM_tile_properties === @@ -4482,23 +4571,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureKHR; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) AccelerationStructureKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateAccelerationStructureKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_accelerationStructure ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateAccelerationStructureKHR" ); - } + *this = device.createAccelerationStructureKHR( createInfo, allocator ); } +# endif AccelerationStructureKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkAccelerationStructureKHR accelerationStructure, @@ -4606,23 +4686,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureNV; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) AccelerationStructureNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateAccelerationStructureNV( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_accelerationStructure ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateAccelerationStructureNV" ); - } + *this = device.createAccelerationStructureNV( createInfo, allocator ); } +# endif AccelerationStructureNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkAccelerationStructureNV accelerationStructure, @@ -4738,23 +4809,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBuffer; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateBuffer( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_buffer ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateBuffer" ); - } + *this = device.createBuffer( createInfo, allocator ); } +# endif Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBuffer buffer, @@ -4868,23 +4930,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferCollectionFUCHSIA; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) BufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateBufferCollectionFUCHSIA( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_collection ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateBufferCollectionFUCHSIA" ); - } + *this = device.createBufferCollectionFUCHSIA( createInfo, allocator ); } +# endif BufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBufferCollectionFUCHSIA collection, @@ -5001,23 +5054,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferView; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateBufferView( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_bufferView ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateBufferView" ); - } + *this = device.createBufferView( createInfo, allocator ); } +# endif BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBufferView bufferView, @@ -5124,23 +5168,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandPool; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCommandPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_commandPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateCommandPool" ); - } + *this = device.createCommandPool( createInfo, allocator ); } +# endif CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCommandPool commandPool, @@ -6280,26 +6315,13 @@ namespace VULKAN_HPP_NAMESPACE class CommandBuffers : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CommandBuffers( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector commandBuffers( allocateInfo.commandBufferCount ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkAllocateCommandBuffers( - static_cast( *device ), reinterpret_cast( &allocateInfo ), commandBuffers.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( allocateInfo.commandBufferCount ); - for ( auto const & commandBuffer : commandBuffers ) - { - this->emplace_back( device, commandBuffer, static_cast( allocateInfo.commandPool ) ); - } - } - else - { - detail::throwResultException( result, "vkAllocateCommandBuffers" ); - } + *this = device.allocateCommandBuffers( allocateInfo ); } +# endif CommandBuffers( std::nullptr_t ) {} @@ -6308,6 +6330,12 @@ namespace VULKAN_HPP_NAMESPACE CommandBuffers( CommandBuffers && rhs ) = default; CommandBuffers & operator=( CommandBuffers const & ) = delete; CommandBuffers & operator=( CommandBuffers && rhs ) = default; + + private: + CommandBuffers( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class CuFunctionNVX @@ -6321,23 +6349,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuFunctionNVX; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCuFunctionNVX( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_function ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateCuFunctionNVX" ); - } + *this = device.createCuFunctionNVX( createInfo, allocator ); } +# endif CuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCuFunctionNVX function, @@ -6444,23 +6463,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuModuleNVX; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCuModuleNVX( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_module ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateCuModuleNVX" ); - } + *this = device.createCuModuleNVX( createInfo, allocator ); } +# endif CuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCuModuleNVX module, @@ -6568,23 +6578,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCudaFunctionNV; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CudaFunctionNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCudaFunctionNV( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_function ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateCudaFunctionNV" ); - } + *this = device.createCudaFunctionNV( createInfo, allocator ); } +# endif CudaFunctionNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCudaFunctionNV function, @@ -6693,23 +6694,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCudaModuleNV; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CudaModuleNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCudaModuleNV( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_module ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateCudaModuleNV" ); - } + *this = device.createCudaModuleNV( createInfo, allocator ); } +# endif CudaModuleNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCudaModuleNV module, @@ -6821,23 +6813,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDebugReportCallbackEXT; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDebugReportCallbackEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_callback ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDebugReportCallbackEXT" ); - } + *this = instance.createDebugReportCallbackEXT( createInfo, allocator ); } +# endif DebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkDebugReportCallbackEXT callback, @@ -6945,23 +6928,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDebugUtilsMessengerEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_messenger ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDebugUtilsMessengerEXT" ); - } + *this = instance.createDebugUtilsMessengerEXT( createInfo, allocator ); } +# endif DebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkDebugUtilsMessengerEXT messenger, @@ -7069,21 +7043,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DeferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDeferredOperationKHR( static_cast( *device ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_operation ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDeferredOperationKHR" ); - } + *this = device.createDeferredOperationKHR( allocator ); } +# endif DeferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDeferredOperationKHR operation, @@ -7199,23 +7165,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorPool; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDescriptorPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_descriptorPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDescriptorPool" ); - } + *this = device.createDescriptorPool( createInfo, allocator ); } +# endif DescriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorPool descriptorPool, @@ -7435,26 +7392,13 @@ namespace VULKAN_HPP_NAMESPACE class DescriptorSets : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorSets( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkAllocateDescriptorSets( - static_cast( *device ), reinterpret_cast( &allocateInfo ), descriptorSets.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( allocateInfo.descriptorSetCount ); - for ( auto const & descriptorSet : descriptorSets ) - { - this->emplace_back( device, descriptorSet, static_cast( allocateInfo.descriptorPool ) ); - } - } - else - { - detail::throwResultException( result, "vkAllocateDescriptorSets" ); - } + *this = device.allocateDescriptorSets( allocateInfo ); } +# endif DescriptorSets( std::nullptr_t ) {} @@ -7463,6 +7407,12 @@ namespace VULKAN_HPP_NAMESPACE DescriptorSets( DescriptorSets && rhs ) = default; DescriptorSets & operator=( DescriptorSets const & ) = delete; DescriptorSets & operator=( DescriptorSets && rhs ) = default; + + private: + DescriptorSets( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class DescriptorSetLayout @@ -7476,23 +7426,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSetLayout; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDescriptorSetLayout( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_descriptorSetLayout ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDescriptorSetLayout" ); - } + *this = device.createDescriptorSetLayout( createInfo, allocator ); } +# endif DescriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorSetLayout descriptorSetLayout, @@ -7606,23 +7547,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorUpdateTemplate; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDescriptorUpdateTemplate( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_descriptorUpdateTemplate ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDescriptorUpdateTemplate" ); - } + *this = device.createDescriptorUpdateTemplate( createInfo, allocator ); } +# endif DescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, @@ -7730,23 +7662,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDeviceMemory; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DeviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkAllocateMemory( static_cast( *device ), - reinterpret_cast( &allocateInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_memory ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkAllocateMemory" ); - } + *this = device.allocateMemory( allocateInfo, allocator ); } +# endif DeviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDeviceMemory memory, @@ -7873,42 +7796,30 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayKHR; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, int32_t drmFd, uint32_t connectorId ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( physicalDevice.getDispatcher()->vkGetDrmDisplayEXT( - static_cast( *physicalDevice ), drmFd, connectorId, reinterpret_cast( &m_display ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkGetDrmDisplayEXT" ); - } + *this = physicalDevice.getDrmDisplayEXT( drmFd, connectorId ); } +# endif -# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, Display & dpy, RROutput rrOutput ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( physicalDevice.getDispatcher()->vkGetRandROutputDisplayEXT( - static_cast( *physicalDevice ), &dpy, rrOutput, reinterpret_cast( &m_display ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkGetRandROutputDisplayEXT" ); - } + *this = physicalDevice.getRandROutputDisplayEXT( dpy, rrOutput ); } -# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ +# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ +# endif -# if defined( VK_USE_PLATFORM_WIN32_KHR ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_WIN32_KHR ) DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, uint32_t deviceRelativeId ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( physicalDevice.getDispatcher()->vkGetWinrtDisplayNV( - static_cast( *physicalDevice ), deviceRelativeId, reinterpret_cast( &m_display ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkGetWinrtDisplayNV" ); - } + *this = physicalDevice.getWinrtDisplayNV( deviceRelativeId ); } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ +# endif /*VK_USE_PLATFORM_WIN32_KHR*/ +# endif DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VkDisplayKHR display ) : m_physicalDevice( *physicalDevice ), m_display( display ), m_dispatcher( physicalDevice.getDispatcher() ) @@ -7990,9 +7901,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD std::vector getModeProperties() const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR - createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_get_display_properties2 === @@ -8013,37 +7925,12 @@ namespace VULKAN_HPP_NAMESPACE class DisplayKHRs : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DisplayKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, uint32_t planeIndex ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * dispatcher = physicalDevice.getDispatcher(); - std::vector displays; - uint32_t displayCount; - VULKAN_HPP_NAMESPACE::Result result; - do - { - result = static_cast( - dispatcher->vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( *physicalDevice ), planeIndex, &displayCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) - { - displays.resize( displayCount ); - result = static_cast( dispatcher->vkGetDisplayPlaneSupportedDisplaysKHR( - static_cast( *physicalDevice ), planeIndex, &displayCount, displays.data() ) ); - } - } 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 ) - { - this->emplace_back( physicalDevice, displayKHR ); - } - } - else - { - detail::throwResultException( result, "vkGetDisplayPlaneSupportedDisplaysKHR" ); - } + *this = physicalDevice.getDisplayPlaneSupportedDisplaysKHR( planeIndex ); } +# endif DisplayKHRs( std::nullptr_t ) {} @@ -8052,6 +7939,12 @@ namespace VULKAN_HPP_NAMESPACE DisplayKHRs( DisplayKHRs && rhs ) = default; DisplayKHRs & operator=( DisplayKHRs const & ) = delete; DisplayKHRs & operator=( DisplayKHRs && rhs ) = default; + + private: + DisplayKHRs( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class DisplayModeKHR @@ -8065,22 +7958,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayModeKHR; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_physicalDevice( display.getPhysicalDevice() ), m_dispatcher( display.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( display.getDispatcher()->vkCreateDisplayModeKHR( - static_cast( display.getPhysicalDevice() ), - static_cast( *display ), - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &m_displayModeKHR ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDisplayModeKHR" ); - } + *this = display.createMode( createInfo, allocator ); } +# endif DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VkDisplayModeKHR displayModeKHR ) : m_physicalDevice( display.getPhysicalDevice() ), m_displayModeKHR( displayModeKHR ), m_dispatcher( display.getDispatcher() ) @@ -8176,23 +8061,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eEvent; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateEvent( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_event ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateEvent" ); - } + *this = device.createEvent( createInfo, allocator ); } +# endif Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkEvent event, @@ -8307,61 +8183,33 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFence; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateFence( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateFence" ); - } + *this = device.createFence( createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkRegisterDeviceEventEXT( static_cast( *device ), - reinterpret_cast( &deviceEventInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkRegisterDeviceEventEXT" ); - } + *this = device.registerEventEXT( deviceEventInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkRegisterDisplayEventEXT( static_cast( *device ), - static_cast( *display ), - reinterpret_cast( &displayEventInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkRegisterDisplayEventEXT" ); - } + *this = device.registerDisplayEventEXT( display, displayEventInfo, allocator ); } +# endif Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkFence fence, @@ -8472,23 +8320,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFramebuffer; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateFramebuffer( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_framebuffer ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateFramebuffer" ); - } + *this = device.createFramebuffer( createInfo, allocator ); } +# endif Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkFramebuffer framebuffer, @@ -8599,23 +8438,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImage; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateImage( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_image ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateImage" ); - } + *this = device.createImage( createInfo, allocator ); } +# endif Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkImage image, @@ -8755,23 +8585,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateImageView( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_imageView ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateImageView" ); - } + *this = device.createImageView( createInfo, allocator ); } +# endif ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkImageView imageView, @@ -8882,23 +8703,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) IndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateIndirectCommandsLayoutNV( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_indirectCommandsLayout ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateIndirectCommandsLayoutNV" ); - } + *this = device.createIndirectCommandsLayoutNV( createInfo, allocator ); } +# endif IndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkIndirectCommandsLayoutNV indirectCommandsLayout, @@ -9006,23 +8818,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) MicromapEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateMicromapEXT( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_micromap ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateMicromapEXT" ); - } + *this = device.createMicromapEXT( createInfo, allocator ); } +# endif MicromapEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkMicromapEXT micromap, @@ -9129,23 +8932,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) OpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateOpticalFlowSessionNV( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_session ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateOpticalFlowSessionNV" ); - } + *this = device.createOpticalFlowSessionNV( createInfo, allocator ); } +# endif OpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkOpticalFlowSessionNV session, @@ -9259,19 +9053,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) - : m_device( *device ), m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkAcquirePerformanceConfigurationINTEL( static_cast( *device ), - reinterpret_cast( &acquireInfo ), - reinterpret_cast( &m_configuration ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkAcquirePerformanceConfigurationINTEL" ); - } + *this = device.acquirePerformanceConfigurationINTEL( acquireInfo ); } +# endif PerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPerformanceConfigurationINTEL configuration ) : m_device( *device ), m_configuration( configuration ), m_dispatcher( device.getDispatcher() ) @@ -9367,23 +9155,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineCache; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePipelineCache( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipelineCache ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreatePipelineCache" ); - } + *this = device.createPipelineCache( createInfo, allocator ); } +# endif PipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineCache pipelineCache, @@ -9497,121 +9276,58 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateComputePipelines( static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - detail::throwResultException( m_constructorSuccessCode, "vkCreateComputePipelines" ); - } + *this = device.createComputePipeline( pipelineCache, createInfo, allocator ); } +# endif -# if defined( VK_ENABLE_BETA_EXTENSIONS ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_ENABLE_BETA_EXTENSIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateExecutionGraphPipelinesAMDX( static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - detail::throwResultException( m_constructorSuccessCode, "vkCreateExecutionGraphPipelinesAMDX" ); - } + *this = device.createExecutionGraphPipelineAMDX( pipelineCache, createInfo, allocator ); } -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ +# endif /*VK_ENABLE_BETA_EXTENSIONS*/ +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateGraphicsPipelines( static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - detail::throwResultException( m_constructorSuccessCode, "vkCreateGraphicsPipelines" ); - } + *this = device.createGraphicsPipeline( pipelineCache, createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateRayTracingPipelinesKHR( static_cast( *device ), - deferredOperation ? static_cast( **deferredOperation ) : 0, - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - detail::throwResultException( m_constructorSuccessCode, "vkCreateRayTracingPipelinesKHR" ); - } + *this = device.createRayTracingPipelineKHR( deferredOperation, pipelineCache, createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateRayTracingPipelinesNV( static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - detail::throwResultException( m_constructorSuccessCode, "vkCreateRayTracingPipelinesNV" ); - } + *this = device.createRayTracingPipelineNV( pipelineCache, createInfo, allocator ); } +# endif Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipeline pipeline, @@ -9764,150 +9480,58 @@ namespace VULKAN_HPP_NAMESPACE class Pipelines : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateComputePipelines( - static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - detail::throwResultException( result, "vkCreateComputePipelines" ); - } + *this = device.createComputePipelines( pipelineCache, createInfos, allocator ); } +# endif -# if defined( VK_ENABLE_BETA_EXTENSIONS ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_ENABLE_BETA_EXTENSIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateExecutionGraphPipelinesAMDX( - static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - detail::throwResultException( result, "vkCreateExecutionGraphPipelinesAMDX" ); - } + *this = device.createExecutionGraphPipelinesAMDX( pipelineCache, createInfos, allocator ); } -# endif /*VK_ENABLE_BETA_EXTENSIONS*/ +# endif /*VK_ENABLE_BETA_EXTENSIONS*/ +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateGraphicsPipelines( - static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - detail::throwResultException( result, "vkCreateGraphicsPipelines" ); - } + *this = device.createGraphicsPipelines( pipelineCache, createInfos, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateRayTracingPipelinesKHR( - static_cast( *device ), - deferredOperation ? static_cast( **deferredOperation ) : 0, - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) || - ( result == VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - detail::throwResultException( result, "vkCreateRayTracingPipelinesKHR" ); - } + *this = device.createRayTracingPipelinesKHR( deferredOperation, pipelineCache, createInfos, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateRayTracingPipelinesNV( - static_cast( *device ), - pipelineCache ? static_cast( **pipelineCache ) : 0, - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - detail::throwResultException( result, "vkCreateRayTracingPipelinesNV" ); - } + *this = device.createRayTracingPipelinesNV( pipelineCache, createInfos, allocator ); } +# endif Pipelines( std::nullptr_t ) {} @@ -9916,6 +9540,12 @@ namespace VULKAN_HPP_NAMESPACE Pipelines( Pipelines && rhs ) = default; Pipelines & operator=( Pipelines const & ) = delete; Pipelines & operator=( Pipelines && rhs ) = default; + + private: + Pipelines( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class PipelineLayout @@ -9929,23 +9559,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineLayout; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePipelineLayout( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipelineLayout ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreatePipelineLayout" ); - } + *this = device.createPipelineLayout( createInfo, allocator ); } +# endif PipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineLayout pipelineLayout, @@ -10053,23 +9674,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PrivateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePrivateDataSlot( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_privateDataSlot ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreatePrivateDataSlot" ); - } + *this = device.createPrivateDataSlot( createInfo, allocator ); } +# endif PrivateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPrivateDataSlot privateDataSlot, @@ -10177,23 +9789,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueryPool; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateQueryPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_queryPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateQueryPool" ); - } + *this = device.createQueryPool( createInfo, allocator ); } +# endif QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueryPool queryPool, @@ -10325,18 +9928,19 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueue; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, uint32_t queueFamilyIndex, uint32_t queueIndex ) - : m_dispatcher( device.getDispatcher() ) { - getDispatcher()->vkGetDeviceQueue( static_cast( *device ), queueFamilyIndex, queueIndex, reinterpret_cast( &m_queue ) ); + *this = device.getQueue( queueFamilyIndex, queueIndex ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) - : m_dispatcher( device.getDispatcher() ) { - getDispatcher()->vkGetDeviceQueue2( - static_cast( *device ), reinterpret_cast( &queueInfo ), reinterpret_cast( &m_queue ) ); + *this = device.getQueue2( queueInfo ); } +# endif Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueue queue ) : m_queue( queue ), m_dispatcher( device.getDispatcher() ) { @@ -10467,41 +10071,23 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eRenderPass; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateRenderPass( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_renderPass ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateRenderPass" ); - } + *this = device.createRenderPass( createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateRenderPass2( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_renderPass ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateRenderPass2" ); - } + *this = device.createRenderPass2( createInfo, allocator ); } +# endif RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkRenderPass renderPass, @@ -10616,23 +10202,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSampler; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateSampler( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_sampler ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSampler" ); - } + *this = device.createSampler( createInfo, allocator ); } +# endif Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSampler sampler, @@ -10739,23 +10316,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSamplerYcbcrConversion; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateSamplerYcbcrConversion( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_ycbcrConversion ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSamplerYcbcrConversion" ); - } + *this = device.createSamplerYcbcrConversion( createInfo, allocator ); } +# endif SamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSamplerYcbcrConversion ycbcrConversion, @@ -10863,23 +10431,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSemaphore; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateSemaphore( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_semaphore ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSemaphore" ); - } + *this = device.createSemaphore( createInfo, allocator ); } +# endif Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSemaphore semaphore, @@ -10994,24 +10553,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ShaderEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateShadersEXT( static_cast( *device ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_shader ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateShadersEXT" ); - } + *this = device.createShaderEXT( createInfo, allocator ); } +# endif ShaderEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkShaderEXT shader, @@ -11114,31 +10663,14 @@ namespace VULKAN_HPP_NAMESPACE class ShaderEXTs : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ShaderEXTs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector shaders( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateShadersEXT( - static_cast( *device ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - shaders.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( createInfos.size() ); - for ( auto const & shaderEXT : shaders ) - { - this->emplace_back( device, shaderEXT, allocator ); - } - } - else - { - detail::throwResultException( result, "vkCreateShadersEXT" ); - } + *this = device.createShadersEXT( createInfos, allocator ); } +# endif ShaderEXTs( std::nullptr_t ) {} @@ -11147,6 +10679,12 @@ namespace VULKAN_HPP_NAMESPACE ShaderEXTs( ShaderEXTs && rhs ) = default; ShaderEXTs & operator=( ShaderEXTs const & ) = delete; ShaderEXTs & operator=( ShaderEXTs && rhs ) = default; + + private: + ShaderEXTs( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class ShaderModule @@ -11160,23 +10698,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eShaderModule; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ShaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateShaderModule( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_shaderModule ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateShaderModule" ); - } + *this = device.createShaderModule( createInfo, allocator ); } +# endif ShaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkShaderModule shaderModule, @@ -11287,301 +10816,166 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSurfaceKHR; public: -# if defined( VK_USE_PLATFORM_ANDROID_KHR ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_ANDROID_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateAndroidSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateAndroidSurfaceKHR" ); - } + *this = instance.createAndroidSurfaceKHR( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ +# endif /*VK_USE_PLATFORM_ANDROID_KHR*/ +# endif -# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDirectFBSurfaceEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDirectFBSurfaceEXT" ); - } + *this = instance.createDirectFBSurfaceEXT( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ +# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDisplayPlaneSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDisplayPlaneSurfaceKHR" ); - } + *this = instance.createDisplayPlaneSurfaceKHR( createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateHeadlessSurfaceEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateHeadlessSurfaceEXT" ); - } + *this = instance.createHeadlessSurfaceEXT( createInfo, allocator ); } +# endif -# if defined( VK_USE_PLATFORM_IOS_MVK ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_IOS_MVK ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateIOSSurfaceMVK( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateIOSSurfaceMVK" ); - } + *this = instance.createIOSSurfaceMVK( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_IOS_MVK*/ +# endif /*VK_USE_PLATFORM_IOS_MVK*/ +# endif -# if defined( VK_USE_PLATFORM_FUCHSIA ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_FUCHSIA ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateImagePipeSurfaceFUCHSIA( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateImagePipeSurfaceFUCHSIA" ); - } + *this = instance.createImagePipeSurfaceFUCHSIA( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_FUCHSIA*/ +# endif /*VK_USE_PLATFORM_FUCHSIA*/ +# endif -# if defined( VK_USE_PLATFORM_MACOS_MVK ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_MACOS_MVK ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateMacOSSurfaceMVK( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateMacOSSurfaceMVK" ); - } + *this = instance.createMacOSSurfaceMVK( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_MACOS_MVK*/ +# endif /*VK_USE_PLATFORM_MACOS_MVK*/ +# endif -# if defined( VK_USE_PLATFORM_METAL_EXT ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_METAL_EXT ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateMetalSurfaceEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateMetalSurfaceEXT" ); - } + *this = instance.createMetalSurfaceEXT( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_METAL_EXT*/ +# endif /*VK_USE_PLATFORM_METAL_EXT*/ +# endif -# if defined( VK_USE_PLATFORM_SCREEN_QNX ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_SCREEN_QNX ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateScreenSurfaceQNX( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateScreenSurfaceQNX" ); - } + *this = instance.createScreenSurfaceQNX( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ +# endif /*VK_USE_PLATFORM_SCREEN_QNX*/ +# endif -# if defined( VK_USE_PLATFORM_GGP ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_GGP ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateStreamDescriptorSurfaceGGP( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateStreamDescriptorSurfaceGGP" ); - } + *this = instance.createStreamDescriptorSurfaceGGP( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_GGP*/ +# endif /*VK_USE_PLATFORM_GGP*/ +# endif -# if defined( VK_USE_PLATFORM_VI_NN ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_VI_NN ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateViSurfaceNN( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateViSurfaceNN" ); - } + *this = instance.createViSurfaceNN( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_VI_NN*/ +# endif /*VK_USE_PLATFORM_VI_NN*/ +# endif -# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_WAYLAND_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateWaylandSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateWaylandSurfaceKHR" ); - } + *this = instance.createWaylandSurfaceKHR( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +# endif -# if defined( VK_USE_PLATFORM_WIN32_KHR ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_WIN32_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateWin32SurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateWin32SurfaceKHR" ); - } + *this = instance.createWin32SurfaceKHR( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_WIN32_KHR*/ +# endif /*VK_USE_PLATFORM_WIN32_KHR*/ +# endif -# if defined( VK_USE_PLATFORM_XCB_KHR ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_XCB_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateXcbSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateXcbSurfaceKHR" ); - } + *this = instance.createXcbSurfaceKHR( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_XCB_KHR*/ +# endif /*VK_USE_PLATFORM_XCB_KHR*/ +# endif -# if defined( VK_USE_PLATFORM_XLIB_KHR ) +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) +# if defined( VK_USE_PLATFORM_XLIB_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateXlibSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateXlibSurfaceKHR" ); - } + *this = instance.createXlibSurfaceKHR( createInfo, allocator ); } -# endif /*VK_USE_PLATFORM_XLIB_KHR*/ +# endif /*VK_USE_PLATFORM_XLIB_KHR*/ +# endif SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkSurfaceKHR surface, @@ -11688,23 +11082,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSwapchainKHR; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SwapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateSwapchainKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_swapchain ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSwapchainKHR" ); - } + *this = device.createSwapchainKHR( createInfo, allocator ); } +# endif SwapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSwapchainKHR swapchain, @@ -11852,31 +11237,14 @@ namespace VULKAN_HPP_NAMESPACE class SwapchainKHRs : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SwapchainKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector swapchains( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateSharedSwapchainsKHR( - static_cast( *device ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - swapchains.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( createInfos.size() ); - for ( auto const & swapchainKHR : swapchains ) - { - this->emplace_back( device, swapchainKHR, allocator ); - } - } - else - { - detail::throwResultException( result, "vkCreateSharedSwapchainsKHR" ); - } + *this = device.createSharedSwapchainsKHR( createInfos, allocator ); } +# endif SwapchainKHRs( std::nullptr_t ) {} @@ -11885,6 +11253,12 @@ namespace VULKAN_HPP_NAMESPACE SwapchainKHRs( SwapchainKHRs && rhs ) = default; SwapchainKHRs & operator=( SwapchainKHRs const & ) = delete; SwapchainKHRs & operator=( SwapchainKHRs && rhs ) = default; + + private: + SwapchainKHRs( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class ValidationCacheEXT @@ -11898,23 +11272,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eValidationCacheEXT; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ValidationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateValidationCacheEXT( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_validationCache ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateValidationCacheEXT" ); - } + *this = device.createValidationCacheEXT( createInfo, allocator ); } +# endif ValidationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkValidationCacheEXT validationCache, @@ -12028,23 +11393,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) VideoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateVideoSessionKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_videoSession ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateVideoSessionKHR" ); - } + *this = device.createVideoSessionKHR( createInfo, allocator ); } +# endif VideoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkVideoSessionKHR videoSession, @@ -12158,23 +11514,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) VideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateVideoSessionParametersKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_videoSessionParameters ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateVideoSessionParametersKHR" ); - } + *this = device.createVideoSessionParametersKHR( createInfo, allocator ); } +# endif VideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkVideoSessionParametersKHR videoSessionParameters, @@ -12281,16 +11628,62 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_0 === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Instance - Context::createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Context::createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Instance( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Instance instance; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateInstance( + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &instance ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Context::createInstance" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance( *this, *reinterpret_cast( &instance ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Instance::enumeratePhysicalDevices() const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Instance::enumeratePhysicalDevices() const { - return VULKAN_HPP_RAII_NAMESPACE::PhysicalDevices( *this ); + std::vector physicalDevices; + uint32_t physicalDeviceCount; + VULKAN_HPP_NAMESPACE::Result result; + do + { + result = static_cast( + getDispatcher()->vkEnumeratePhysicalDevices( static_cast( m_instance ), &physicalDeviceCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) + { + physicalDevices.resize( physicalDeviceCount ); + result = static_cast( getDispatcher()->vkEnumeratePhysicalDevices( + static_cast( m_instance ), &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); + } + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::enumeratePhysicalDevices" ); +# endif + } + + std::vector physicalDevicesRAII; + physicalDevicesRAII.reserve( physicalDevices.size() ); + for ( auto & physicalDevice : physicalDevices ) + { + physicalDevicesRAII.emplace_back( *this, *reinterpret_cast( &physicalDevice ) ); + } + return physicalDevicesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures PhysicalDevice::getFeatures() const VULKAN_HPP_NOEXCEPT @@ -12327,14 +11720,15 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; - VkResult result = getDispatcher()->vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), + static_cast( format ), + static_cast( type ), + static_cast( tiling ), + static_cast( usage ), + static_cast( flags ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); return imageFormatProperties; } @@ -12400,11 +11794,28 @@ namespace VULKAN_HPP_NAMESPACE return result; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Device - PhysicalDevice::createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + PhysicalDevice::createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Device( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Device device; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDevice( + static_cast( m_physicalDevice ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &device ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::createDevice" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device( *this, *reinterpret_cast( &device ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector @@ -12415,18 +11826,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkEnumerateInstanceExtensionProperties( + layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -12442,21 +11854,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumerateDeviceExtensionProperties( - static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( getDispatcher()->vkEnumerateDeviceExtensionProperties( + static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), - layerName ? layerName->c_str() : nullptr, - &propertyCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), + layerName ? layerName->c_str() : nullptr, + &propertyCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -12471,17 +11884,18 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -12496,18 +11910,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumerateDeviceLayerProperties( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkEnumerateDeviceLayerProperties( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateDeviceLayerProperties( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkEnumerateDeviceLayerProperties( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -12516,9 +11931,14 @@ namespace VULKAN_HPP_NAMESPACE return properties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Queue( *this, queueFamilyIndex, queueIndex ); + VULKAN_HPP_NAMESPACE::Queue queue; + getDispatcher()->vkGetDeviceQueue( static_cast( m_device ), queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue( *this, *reinterpret_cast( &queue ) ); } VULKAN_HPP_INLINE void Queue::submit( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, @@ -12526,32 +11946,48 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit && "Function requires " ); - VkResult result = getDispatcher()->vkQueueSubmit( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit( + static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); } VULKAN_HPP_INLINE void Queue::waitIdle() const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueWaitIdle && "Function requires " ); - VkResult result = getDispatcher()->vkQueueWaitIdle( static_cast( m_queue ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueWaitIdle( static_cast( m_queue ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); } VULKAN_HPP_INLINE void Device::waitIdle() const { VULKAN_HPP_ASSERT( getDispatcher()->vkDeviceWaitIdle && "Function requires " ); - VkResult result = getDispatcher()->vkDeviceWaitIdle( static_cast( m_device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDeviceWaitIdle( static_cast( m_device ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DeviceMemory - Device::allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DeviceMemory( *this, allocateInfo, allocator ); + VULKAN_HPP_NAMESPACE::DeviceMemory memory; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAllocateMemory( + static_cast( m_device ), + reinterpret_cast( &allocateInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &memory ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateMemory" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceMemory( *this, *reinterpret_cast( &memory ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * DeviceMemory::mapMemory( VULKAN_HPP_NAMESPACE::DeviceSize offset, @@ -12560,14 +11996,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkMapMemory && "Function requires " ); - void * pData; - VkResult result = getDispatcher()->vkMapMemory( static_cast( m_device ), - static_cast( m_memory ), - static_cast( offset ), - static_cast( size ), - static_cast( flags ), - &pData ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); + void * pData; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMapMemory( static_cast( m_device ), + static_cast( m_memory ), + static_cast( offset ), + static_cast( size ), + static_cast( flags ), + &pData ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); return pData; } @@ -12584,9 +12020,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkFlushMappedMemoryRanges && "Function requires " ); - VkResult result = getDispatcher()->vkFlushMappedMemoryRanges( - static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkFlushMappedMemoryRanges( + static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); } VULKAN_HPP_INLINE void @@ -12594,9 +12030,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkInvalidateMappedMemoryRanges && "Function requires " ); - VkResult result = getDispatcher()->vkInvalidateMappedMemoryRanges( - static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkInvalidateMappedMemoryRanges( + static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize DeviceMemory::getCommitment() const VULKAN_HPP_NOEXCEPT @@ -12614,20 +12050,24 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory && "Function requires " ); - VkResult result = getDispatcher()->vkBindBufferMemory( static_cast( m_device ), - static_cast( m_buffer ), - static_cast( memory ), - static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Buffer::bindMemory" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkBindBufferMemory( static_cast( m_device ), + static_cast( m_buffer ), + static_cast( memory ), + static_cast( memoryOffset ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Buffer::bindMemory" ); } VULKAN_HPP_INLINE void Image::bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory && "Function requires " ); - VkResult result = getDispatcher()->vkBindImageMemory( - static_cast( m_device ), static_cast( m_image ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Image::bindMemory" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkBindImageMemory( static_cast( m_device ), + static_cast( m_image ), + static_cast( memory ), + static_cast( memoryOffset ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Image::bindMemory" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Buffer::getMemoryRequirements() const VULKAN_HPP_NOEXCEPT @@ -12717,34 +12157,51 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueBindSparse && "Function requires " ); - VkResult result = getDispatcher()->vkQueueBindSparse( - static_cast( m_queue ), bindInfo.size(), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::bindSparse" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueBindSparse( + static_cast( m_queue ), bindInfo.size(), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::bindSparse" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateFence( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &fence ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createFence" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } VULKAN_HPP_INLINE void Device::resetFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetFences && "Function requires " ); - VkResult result = getDispatcher()->vkResetFences( static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkResetFences( static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Fence::getStatus() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceStatus && "Function requires " ); - VkResult result = getDispatcher()->vkGetFenceStatus( static_cast( m_device ), static_cast( m_fence ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Fence::getStatus", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetFenceStatus( static_cast( m_device ), static_cast( m_fence ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Fence::getStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return static_cast( result ); } @@ -12754,37 +12211,68 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitForFences && "Function requires " ); - VkResult result = getDispatcher()->vkWaitForFences( - static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWaitForFences( + static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Semaphore - Device::createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Semaphore( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Semaphore semaphore; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSemaphore( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &semaphore ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSemaphore" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Semaphore( *this, *reinterpret_cast( &semaphore ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Event - Device::createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Event( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Event event; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateEvent( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &event ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createEvent" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Event( *this, *reinterpret_cast( &event ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Event::getStatus() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetEventStatus && "Function requires " ); - VkResult result = getDispatcher()->vkGetEventStatus( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Event::getStatus", - { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetEventStatus( static_cast( m_device ), static_cast( m_event ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Event::getStatus", { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); return static_cast( result ); } @@ -12793,23 +12281,41 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSetEvent && "Function requires " ); - VkResult result = getDispatcher()->vkSetEvent( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Event::set" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkSetEvent( static_cast( m_device ), static_cast( m_event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Event::set" ); } VULKAN_HPP_INLINE void Event::reset() const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetEvent && "Function requires " ); - VkResult result = getDispatcher()->vkResetEvent( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Event::reset" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkResetEvent( static_cast( m_device ), static_cast( m_event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Event::reset" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::QueryPool - Device::createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::QueryPool( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::QueryPool queryPool; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateQueryPool( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &queryPool ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createQueryPool" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::QueryPool( *this, *reinterpret_cast( &queryPool ), allocator ); } template @@ -12819,18 +12325,18 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueryPoolResults && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), - static_cast( m_queryPool ), - firstQuery, - queryCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResults", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + std::vector data( dataSize / sizeof( DataType ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), + static_cast( m_queryPool ), + firstQuery, + queryCount, + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ), + static_cast( stride ), + static_cast( flags ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResults", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return std::make_pair( static_cast( result ), data ); } @@ -12841,41 +12347,90 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueryPoolResults && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), - static_cast( m_queryPool ), - firstQuery, - queryCount, - sizeof( DataType ), - reinterpret_cast( &data ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResult", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), + static_cast( m_queryPool ), + firstQuery, + queryCount, + sizeof( DataType ), + reinterpret_cast( &data ), + static_cast( stride ), + static_cast( flags ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResult", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return std::make_pair( static_cast( result ), data ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Buffer - Device::createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Buffer( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Buffer buffer; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateBuffer( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &buffer ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createBuffer" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Buffer( *this, *reinterpret_cast( &buffer ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::BufferView - Device::createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::BufferView( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::BufferView view; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateBufferView( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &view ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createBufferView" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferView( *this, *reinterpret_cast( &view ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Image - Device::createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Image( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Image image; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateImage( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &image ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createImage" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Image( *this, *reinterpret_cast( &image ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout @@ -12892,46 +12447,96 @@ namespace VULKAN_HPP_NAMESPACE return layout; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::ImageView - Device::createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::ImageView( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::ImageView view; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateImageView( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &view ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createImageView" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ImageView( *this, *reinterpret_cast( &view ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::ShaderModule - Device::createShaderModule( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createShaderModule( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::ShaderModule( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::ShaderModule shaderModule; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateShaderModule( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &shaderModule ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createShaderModule" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ShaderModule( *this, *reinterpret_cast( &shaderModule ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PipelineCache - Device::createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::PipelineCache( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePipelineCache( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipelineCache ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPipelineCache" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache( *this, *reinterpret_cast( &pipelineCache ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PipelineCache::getData() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineCacheData && "Function requires " ); - std::vector data; - size_t dataSize; - VkResult result; + std::vector data; + size_t dataSize; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - getDispatcher()->vkGetPipelineCacheData( static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( + getDispatcher()->vkGetPipelineCacheData( static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = getDispatcher()->vkGetPipelineCacheData( - static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( getDispatcher()->vkGetPipelineCacheData( + static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::getData" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::getData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { @@ -12944,71 +12549,227 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkMergePipelineCaches && "Function requires " ); - VkResult result = getDispatcher()->vkMergePipelineCaches( static_cast( m_device ), - static_cast( m_pipelineCache ), - srcCaches.size(), - reinterpret_cast( srcCaches.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::merge" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkMergePipelineCaches( static_cast( m_device ), + static_cast( m_pipelineCache ), + srcCaches.size(), + reinterpret_cast( srcCaches.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::merge" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createGraphicsPipelines( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::createGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, pipelineCache, createInfos, allocator ); + std::vector pipelines( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateGraphicsPipelines( + static_cast( m_device ), + pipelineCache ? static_cast( **pipelineCache ) : 0, + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( pipelines.data() ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createGraphicsPipelines" ); +# endif + } + + std::vector pipelinesRAII; + pipelinesRAII.reserve( pipelines.size() ); + for ( auto & pipeline : pipelines ) + { + pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); + } + return pipelinesRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline Device::createGraphicsPipeline( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createGraphicsPipeline( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, pipelineCache, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Pipeline pipeline; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateGraphicsPipelines( + static_cast( m_device ), + pipelineCache ? static_cast( **pipelineCache ) : 0, + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipeline ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createGraphicsPipeline" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createComputePipelines( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::createComputePipelines( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, pipelineCache, createInfos, allocator ); + std::vector pipelines( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateComputePipelines( + static_cast( m_device ), + pipelineCache ? static_cast( **pipelineCache ) : 0, + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( pipelines.data() ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createComputePipelines" ); +# endif + } + + std::vector pipelinesRAII; + pipelinesRAII.reserve( pipelines.size() ); + for ( auto & pipeline : pipelines ) + { + pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); + } + return pipelinesRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type Device::createComputePipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, pipelineCache, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Pipeline pipeline; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateComputePipelines( + static_cast( m_device ), + pipelineCache ? static_cast( **pipelineCache ) : 0, + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipeline ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createComputePipeline" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PipelineLayout - Device::createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::PipelineLayout( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePipelineLayout( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipelineLayout ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPipelineLayout" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineLayout( *this, *reinterpret_cast( &pipelineLayout ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Sampler - Device::createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Sampler( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Sampler sampler; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSampler( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &sampler ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSampler" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Sampler( *this, *reinterpret_cast( &sampler ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout - Device::createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorSetLayout( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &setLayout ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorSetLayout" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout( *this, *reinterpret_cast( &setLayout ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorPool - Device::createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorPool( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorPool( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &descriptorPool ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorPool" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorPool( *this, *reinterpret_cast( &descriptorPool ), allocator ); } VULKAN_HPP_INLINE void DescriptorPool::reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT @@ -13019,10 +12780,32 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_device ), static_cast( m_descriptorPool ), static_cast( flags ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorSets( *this, allocateInfo ); + std::vector descriptorSets( allocateInfo.descriptorSetCount ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAllocateDescriptorSets( static_cast( m_device ), + reinterpret_cast( &allocateInfo ), + reinterpret_cast( descriptorSets.data() ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateDescriptorSets" ); +# endif + } + + std::vector descriptorSetsRAII; + descriptorSetsRAII.reserve( descriptorSets.size() ); + for ( auto & descriptorSet : descriptorSets ) + { + descriptorSetsRAII.emplace_back( + *this, *reinterpret_cast( &descriptorSet ), static_cast( allocateInfo.descriptorPool ) ); + } + return descriptorSetsRAII; } VULKAN_HPP_INLINE void Device::updateDescriptorSets( @@ -13038,18 +12821,52 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( descriptorCopies.data() ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Framebuffer - Device::createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Framebuffer( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateFramebuffer( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &framebuffer ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createFramebuffer" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Framebuffer( *this, *reinterpret_cast( &framebuffer ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::RenderPass - Device::createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::RenderPass renderPass; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRenderPass( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &renderPass ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRenderPass" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, *reinterpret_cast( &renderPass ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D RenderPass::getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT @@ -13063,52 +12880,92 @@ namespace VULKAN_HPP_NAMESPACE return granularity; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CommandPool - Device::createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::CommandPool( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::CommandPool commandPool; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCommandPool( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &commandPool ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCommandPool" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandPool( *this, *reinterpret_cast( &commandPool ), allocator ); } VULKAN_HPP_INLINE void CommandPool::reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetCommandPool && "Function requires " ); - VkResult result = getDispatcher()->vkResetCommandPool( - static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandPool::reset" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkResetCommandPool( + static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandPool::reset" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const { - return VULKAN_HPP_RAII_NAMESPACE::CommandBuffers( *this, allocateInfo ); + std::vector commandBuffers( allocateInfo.commandBufferCount ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAllocateCommandBuffers( static_cast( m_device ), + reinterpret_cast( &allocateInfo ), + reinterpret_cast( commandBuffers.data() ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateCommandBuffers" ); +# endif + } + + std::vector commandBuffersRAII; + commandBuffersRAII.reserve( commandBuffers.size() ); + for ( auto & commandBuffer : commandBuffers ) + { + commandBuffersRAII.emplace_back( + *this, *reinterpret_cast( &commandBuffer ), static_cast( allocateInfo.commandPool ) ); + } + return commandBuffersRAII; } VULKAN_HPP_INLINE void CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBeginCommandBuffer && "Function requires " ); - VkResult result = getDispatcher()->vkBeginCommandBuffer( static_cast( m_commandBuffer ), - reinterpret_cast( &beginInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBeginCommandBuffer( + static_cast( m_commandBuffer ), reinterpret_cast( &beginInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); } VULKAN_HPP_INLINE void CommandBuffer::end() const { VULKAN_HPP_ASSERT( getDispatcher()->vkEndCommandBuffer && "Function requires " ); - VkResult result = getDispatcher()->vkEndCommandBuffer( static_cast( m_commandBuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkEndCommandBuffer( static_cast( m_commandBuffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); } VULKAN_HPP_INLINE void CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetCommandBuffer && "Function requires " ); - VkResult result = - getDispatcher()->vkResetCommandBuffer( static_cast( m_commandBuffer ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkResetCommandBuffer( static_cast( m_commandBuffer ), static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); } VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, @@ -13227,10 +13084,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); +# else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers( static_cast( m_commandBuffer ), firstBinding, @@ -13640,9 +13501,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumerateInstanceVersion && "Function requires " ); - uint32_t apiVersion; - VkResult result = getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); + uint32_t apiVersion; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); return apiVersion; } @@ -13652,18 +13513,18 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory2 && "Function requires or " ); - VkResult result = getDispatcher()->vkBindBufferMemory2( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindBufferMemory2( + static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); } VULKAN_HPP_INLINE void Device::bindImageMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory2 && "Function requires or " ); - VkResult result = getDispatcher()->vkBindImageMemory2( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindImageMemory2( + static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags @@ -13709,20 +13570,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( + getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = + result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, - reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { @@ -13902,11 +13764,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return imageFormatProperties; } @@ -13920,11 +13782,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return structureChain; } @@ -14044,23 +13906,65 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Queue Device::getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Queue( *this, queueInfo ); + VULKAN_HPP_NAMESPACE::Queue queue; + getDispatcher()->vkGetDeviceQueue2( + static_cast( m_device ), reinterpret_cast( &queueInfo ), reinterpret_cast( &queue ) ); + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue( *this, *reinterpret_cast( &queue ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - Device::createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSamplerYcbcrConversion( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &ycbcrConversion ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSamplerYcbcrConversion" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( + *this, *reinterpret_cast( &ycbcrConversion ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate - Device::createDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorUpdateTemplate( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &descriptorUpdateTemplate ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorUpdateTemplate" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate( + *this, *reinterpret_cast( &descriptorUpdateTemplate ), allocator ); } template @@ -14189,11 +14093,28 @@ namespace VULKAN_HPP_NAMESPACE stride ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::RenderPass - Device::createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::RenderPass renderPass; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRenderPass2( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &renderPass ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRenderPass2" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, *reinterpret_cast( &renderPass ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, @@ -14236,9 +14157,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreCounterValue && "Function requires or " ); - uint64_t value; - VkResult result = getDispatcher()->vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( m_semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); + uint64_t value; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( m_semaphore ), &value ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); return value; } @@ -14248,11 +14170,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitSemaphores && "Function requires or " ); - VkResult result = - getDispatcher()->vkWaitSemaphores( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkWaitSemaphores( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } @@ -14261,8 +14182,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSignalSemaphore && "Function requires or " ); - VkResult result = getDispatcher()->vkSignalSemaphore( static_cast( m_device ), reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkSignalSemaphore( static_cast( m_device ), reinterpret_cast( &signalInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress @@ -14310,18 +14232,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties; uint32_t toolCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = getDispatcher()->vkGetPhysicalDeviceToolProperties( - static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolProperties( + static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { @@ -14330,11 +14253,28 @@ namespace VULKAN_HPP_NAMESPACE return toolProperties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - Device::createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePrivateDataSlot( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &privateDataSlot ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPrivateDataSlot" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, *reinterpret_cast( &privateDataSlot ), allocator ); } VULKAN_HPP_INLINE void Device::setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, @@ -14344,9 +14284,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSetPrivateData && "Function requires or " ); - VkResult result = getDispatcher()->vkSetPrivateData( - static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetPrivateData( + static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, @@ -14385,10 +14325,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWaitEvents2 && "Function requires or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); +# else if ( events.size() != dependencyInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2: events.size() != dependencyInfos.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdWaitEvents2( static_cast( m_commandBuffer ), events.size(), @@ -14418,9 +14362,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit2 && "Function requires or " ); - VkResult result = getDispatcher()->vkQueueSubmit2( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit2( + static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); } VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT @@ -14538,6 +14482,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers2 && "Function requires or or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); + VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); + VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); +# else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != offsets.size()" ); @@ -14550,6 +14499,7 @@ namespace VULKAN_HPP_NAMESPACE { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != strides.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers2( static_cast( m_commandBuffer ), firstBinding, @@ -14733,9 +14683,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Bool32 supported; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( - static_cast( m_physicalDevice ), queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( static_cast( m_physicalDevice ), + queueFamilyIndex, + static_cast( surface ), + reinterpret_cast( &supported ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); return supported; } @@ -14747,10 +14700,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); return surfaceCapabilities; } @@ -14762,21 +14716,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -14793,21 +14748,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes; uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + &presentModeCount, + reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { @@ -14818,11 +14774,28 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_swapchain === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - Device::createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSwapchainKHR( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &swapchain ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSwapchainKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, *reinterpret_cast( &swapchain ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector SwapchainKHR::getImages() const @@ -14831,21 +14804,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector swapchainImages; uint32_t swapchainImageCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetSwapchainImagesKHR( - static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) + result = static_cast( getDispatcher()->vkGetSwapchainImagesKHR( + static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); - result = getDispatcher()->vkGetSwapchainImagesKHR( static_cast( m_device ), - static_cast( m_swapchain ), - &swapchainImageCount, - reinterpret_cast( swapchainImages.data() ) ); + result = + static_cast( getDispatcher()->vkGetSwapchainImagesKHR( static_cast( m_device ), + static_cast( m_swapchain ), + &swapchainImageCount, + reinterpret_cast( swapchainImages.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getImages" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getImages" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { @@ -14859,14 +14833,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImageKHR && "Function requires " ); - uint32_t imageIndex; - VkResult result = getDispatcher()->vkAcquireNextImageKHR( static_cast( m_device ), - static_cast( m_swapchain ), - timeout, - static_cast( semaphore ), - static_cast( fence ), - &imageIndex ); - resultCheck( static_cast( result ), + uint32_t imageIndex; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkAcquireNextImageKHR( static_cast( m_device ), + static_cast( m_swapchain ), + timeout, + static_cast( semaphore ), + static_cast( fence ), + &imageIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireNextImage", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, @@ -14880,10 +14855,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueuePresentKHR && "Function requires " ); - VkResult result = getDispatcher()->vkQueuePresentKHR( static_cast( m_queue ), reinterpret_cast( &presentInfo ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkQueuePresentKHR( static_cast( m_queue ), reinterpret_cast( &presentInfo ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } @@ -14894,9 +14869,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; - VkResult result = getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( - static_cast( m_device ), reinterpret_cast( &deviceGroupPresentCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( + static_cast( m_device ), reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); return deviceGroupPresentCapabilities; } @@ -14908,9 +14883,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( - static_cast( m_device ), static_cast( surface ), reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( + static_cast( m_device ), static_cast( surface ), reinterpret_cast( &modes ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); return modes; } @@ -14923,19 +14898,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector rects; uint32_t rectCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); - result = getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + &rectCount, + reinterpret_cast( rects.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { @@ -14949,10 +14927,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImage2KHR && "Function requires or " ); - uint32_t imageIndex; - VkResult result = getDispatcher()->vkAcquireNextImage2KHR( - static_cast( m_device ), reinterpret_cast( &acquireInfo ), &imageIndex ); - resultCheck( static_cast( result ), + uint32_t imageIndex; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireNextImage2KHR( + static_cast( m_device ), reinterpret_cast( &acquireInfo ), &imageIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, @@ -14971,18 +14949,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -14998,18 +14977,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -15018,10 +14998,40 @@ namespace VULKAN_HPP_NAMESPACE return properties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHRs( *this, planeIndex ); + std::vector displays; + uint32_t displayCount; + VULKAN_HPP_NAMESPACE::Result result; + do + { + result = static_cast( + getDispatcher()->vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( m_physicalDevice ), planeIndex, &displayCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) + { + displays.resize( displayCount ); + result = static_cast( getDispatcher()->vkGetDisplayPlaneSupportedDisplaysKHR( + static_cast( m_physicalDevice ), planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); + } + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); +# endif + } + + std::vector displaysRAII; + displaysRAII.reserve( displays.size() ); + for ( auto & display : displays ) + { + displaysRAII.emplace_back( *this, *reinterpret_cast( &display ) ); + } + return displaysRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector DisplayKHR::getModeProperties() const @@ -15030,21 +15040,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetDisplayModePropertiesKHR( - static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( getDispatcher()->vkGetDisplayModePropertiesKHR( + static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), - static_cast( m_display ), - &propertyCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), + static_cast( m_display ), + &propertyCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -15053,11 +15064,28 @@ namespace VULKAN_HPP_NAMESPACE return properties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR - DisplayKHR::createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + DisplayKHR::createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDisplayModeKHR( + static_cast( m_physicalDevice ), + static_cast( m_display ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &mode ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "DisplayKHR::createMode" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR( *this, *reinterpret_cast( &mode ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR @@ -15066,46 +15094,122 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; - VkResult result = getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), - static_cast( m_displayModeKHR ), - planeIndex, - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), + static_cast( m_displayModeKHR ), + planeIndex, + reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); return capabilities; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDisplayPlaneSurfaceKHR( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDisplayPlaneSurfaceKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } //=== VK_KHR_display_swapchain === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type Device::createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHRs( *this, createInfos, allocator ); + std::vector swapchains( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSharedSwapchainsKHR( + static_cast( m_device ), + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( swapchains.data() ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSharedSwapchainsKHR" ); +# endif + } + + std::vector swapchainsRAII; + swapchainsRAII.reserve( swapchains.size() ); + for ( auto & swapchain : swapchains ) + { + swapchainsRAII.emplace_back( *this, *reinterpret_cast( &swapchain ), allocator ); + } + return swapchainsRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - Device::createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSharedSwapchainsKHR( + static_cast( m_device ), + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &swapchain ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSharedSwapchainKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, *reinterpret_cast( &swapchain ), allocator ); } # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createXlibSurfaceKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createXlibSurfaceKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateXlibSurfaceKHR( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createXlibSurfaceKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 @@ -15124,11 +15228,28 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createXcbSurfaceKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createXcbSurfaceKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateXcbSurfaceKHR( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createXcbSurfaceKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getXcbPresentationSupportKHR( @@ -15147,11 +15268,28 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createWaylandSurfaceKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createWaylandSurfaceKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateWaylandSurfaceKHR( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createWaylandSurfaceKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 @@ -15170,22 +15308,56 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createAndroidSurfaceKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createAndroidSurfaceKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateAndroidSurfaceKHR( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createAndroidSurfaceKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createWin32SurfaceKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createWin32SurfaceKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateWin32SurfaceKHR( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createWin32SurfaceKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 @@ -15202,11 +15374,29 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_debug_report === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT - Instance::createDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDebugReportCallbackEXT( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &callback ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDebugReportCallbackEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT( + *this, *reinterpret_cast( &callback ), allocator ); } VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, @@ -15235,18 +15425,18 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkDebugMarkerSetObjectTagEXT && "Function requires " ); - VkResult result = - getDispatcher()->vkDebugMarkerSetObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDebugMarkerSetObjectTagEXT( + static_cast( m_device ), reinterpret_cast( &tagInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" ); } VULKAN_HPP_INLINE void Device::debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkDebugMarkerSetObjectNameEXT && "Function requires " ); - VkResult result = getDispatcher()->vkDebugMarkerSetObjectNameEXT( static_cast( m_device ), - reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDebugMarkerSetObjectNameEXT( + static_cast( m_device ), reinterpret_cast( &nameInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" ); } VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT @@ -15281,10 +15471,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR capabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoProfile ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), + reinterpret_cast( &videoProfile ), + reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); return capabilities; } @@ -15298,10 +15489,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR & capabilities = structureChain.template get(); - VkResult result = getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoProfile ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), + reinterpret_cast( &videoProfile ), + reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); return structureChain; } @@ -15314,24 +15506,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector videoFormatProperties; uint32_t videoFormatPropertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), - reinterpret_cast( &videoFormatInfo ), - &videoFormatPropertyCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && videoFormatPropertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), + reinterpret_cast( &videoFormatInfo ), + &videoFormatPropertyCount, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { videoFormatProperties.resize( videoFormatPropertyCount ); - result = + result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, - reinterpret_cast( videoFormatProperties.data() ) ); + reinterpret_cast( videoFormatProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { @@ -15340,11 +15533,28 @@ namespace VULKAN_HPP_NAMESPACE return videoFormatProperties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR - Device::createVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateVideoSessionKHR( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &videoSession ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createVideoSessionKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR( *this, *reinterpret_cast( &videoSession ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector VideoSessionKHR::getMemoryRequirements() const @@ -15354,21 +15564,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector memoryRequirements; uint32_t memoryRequirementsCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( - static_cast( m_device ), static_cast( m_videoSession ), &memoryRequirementsCount, nullptr ); - if ( ( result == VK_SUCCESS ) && memoryRequirementsCount ) + result = static_cast( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( + static_cast( m_device ), static_cast( m_videoSession ), &memoryRequirementsCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && memoryRequirementsCount ) { memoryRequirements.resize( memoryRequirementsCount ); - result = + result = static_cast( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( static_cast( m_device ), static_cast( m_videoSession ), &memoryRequirementsCount, - reinterpret_cast( memoryRequirements.data() ) ); + reinterpret_cast( memoryRequirements.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); if ( memoryRequirementsCount < memoryRequirements.size() ) @@ -15383,29 +15593,48 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBindVideoSessionMemoryKHR && "Function requires " ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindVideoSessionMemoryKHR( static_cast( m_device ), static_cast( m_videoSession ), bindSessionMemoryInfos.size(), - reinterpret_cast( bindSessionMemoryInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::VideoSessionKHR::bindMemory" ); + reinterpret_cast( bindSessionMemoryInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::VideoSessionKHR::bindMemory" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type Device::createVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateVideoSessionParametersKHR( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &videoSessionParameters ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createVideoSessionParametersKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR( + *this, *reinterpret_cast( &videoSessionParameters ), allocator ); } VULKAN_HPP_INLINE void VideoSessionParametersKHR::update( const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateVideoSessionParametersKHR && "Function requires " ); - VkResult result = getDispatcher()->vkUpdateVideoSessionParametersKHR( static_cast( m_device ), - static_cast( m_videoSessionParameters ), - reinterpret_cast( &updateInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::VideoSessionParametersKHR::update" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkUpdateVideoSessionParametersKHR( static_cast( m_device ), + static_cast( m_videoSessionParameters ), + reinterpret_cast( &updateInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::VideoSessionParametersKHR::update" ); } VULKAN_HPP_INLINE void CommandBuffer::beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo ) const VULKAN_HPP_NOEXCEPT @@ -15452,6 +15681,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindTransformFeedbackBuffersEXT && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); + VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); +# else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != offsets.size()" ); @@ -15460,6 +15693,7 @@ namespace VULKAN_HPP_NAMESPACE { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != sizes.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindTransformFeedbackBuffersEXT( static_cast( m_commandBuffer ), firstBinding, @@ -15475,10 +15709,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginTransformFeedbackEXT && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() ); +# else if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::beginTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBeginTransformFeedbackEXT( static_cast( m_commandBuffer ), firstCounterBuffer, @@ -15493,10 +15731,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndTransformFeedbackEXT && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() ); +# else if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::endTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdEndTransformFeedbackEXT( static_cast( m_commandBuffer ), firstCounterBuffer, @@ -15544,18 +15786,52 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_NVX_binary_import === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX - Device::createCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::CuModuleNVX module; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCuModuleNVX( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &module ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCuModuleNVX" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX( *this, *reinterpret_cast( &module ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX - Device::createCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::CuFunctionNVX function; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCuFunctionNVX( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &function ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCuFunctionNVX" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX( *this, *reinterpret_cast( &function ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo ) const VULKAN_HPP_NOEXCEPT @@ -15583,9 +15859,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewAddressNVX && "Function requires " ); VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties; - VkResult result = getDispatcher()->vkGetImageViewAddressNVX( - static_cast( m_device ), static_cast( m_imageView ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ImageView::getAddressNVX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageViewAddressNVX( + static_cast( m_device ), static_cast( m_imageView ), reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::ImageView::getAddressNVX" ); return properties; } @@ -15638,29 +15914,29 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderInfoAMD && "Function requires " ); - std::vector info; - size_t infoSize; - VkResult result; + std::vector info; + size_t infoSize; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), - static_cast( m_pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && infoSize ) + 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 ) { info.resize( infoSize ); - result = getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), - static_cast( m_pipeline ), - static_cast( shaderStage ), - static_cast( infoType ), - &infoSize, - reinterpret_cast( info.data() ) ); + result = static_cast( getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), + static_cast( m_pipeline ), + static_cast( shaderStage ), + static_cast( infoType ), + &infoSize, + reinterpret_cast( info.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getShaderInfoAMD" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getShaderInfoAMD" ); VULKAN_HPP_ASSERT( infoSize <= info.size() ); if ( infoSize < info.size() ) { @@ -15689,11 +15965,28 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createStreamDescriptorSurfaceGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createStreamDescriptorSurfaceGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateStreamDescriptorSurfaceGGP( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createStreamDescriptorSurfaceGGP" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_GGP*/ @@ -15711,7 +16004,7 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties; - VkResult result = getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), @@ -15719,8 +16012,8 @@ namespace VULKAN_HPP_NAMESPACE static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), - reinterpret_cast( &externalImageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); + reinterpret_cast( &externalImageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); return externalImageFormatProperties; } @@ -15732,10 +16025,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandleNV && "Function requires " ); - HANDLE handle; - VkResult result = getDispatcher()->vkGetMemoryWin32HandleNV( - static_cast( m_device ), static_cast( m_memory ), static_cast( handleType ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::getMemoryWin32HandleNV" ); + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryWin32HandleNV( + static_cast( m_device ), static_cast( m_memory ), static_cast( handleType ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::getMemoryWin32HandleNV" ); return handle; } @@ -15830,11 +16123,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); return imageFormatProperties; } @@ -15848,11 +16141,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); return structureChain; } @@ -16006,11 +16299,28 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createViSurfaceNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createViSurfaceNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateViSurfaceNN( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createViSurfaceNN" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_VI_NN*/ @@ -16033,20 +16343,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( + getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = - getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), - &physicalDeviceGroupCount, - reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( + static_cast( m_instance ), + &physicalDeviceGroupCount, + reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { @@ -16079,10 +16390,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandleKHR && "Function requires " ); - HANDLE handle; - VkResult result = getDispatcher()->vkGetMemoryWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryWin32HandleKHR( + static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); return handle; } @@ -16094,12 +16405,12 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryWin32HandlePropertiesKHR( static_cast( m_device ), static_cast( handleType ), handle, - reinterpret_cast( &memoryWin32HandleProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); + reinterpret_cast( &memoryWin32HandleProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); return memoryWin32HandleProperties; } @@ -16111,10 +16422,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdKHR && "Function requires " ); - int fd; - VkResult result = - getDispatcher()->vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); return fd; } @@ -16125,11 +16436,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdPropertiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; - VkResult result = getDispatcher()->vkGetMemoryFdPropertiesKHR( static_cast( m_device ), - static_cast( handleType ), - fd, - reinterpret_cast( &memoryFdProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetMemoryFdPropertiesKHR( static_cast( m_device ), + static_cast( handleType ), + fd, + reinterpret_cast( &memoryFdProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); return memoryFdProperties; } @@ -16160,9 +16472,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreWin32HandleKHR && "Function requires " ); - VkResult result = getDispatcher()->vkImportSemaphoreWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &importSemaphoreWin32HandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportSemaphoreWin32HandleKHR( + static_cast( m_device ), reinterpret_cast( &importSemaphoreWin32HandleInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE @@ -16171,10 +16483,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreWin32HandleKHR && "Function requires " ); - HANDLE handle; - VkResult result = getDispatcher()->vkGetSemaphoreWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreWin32HandleKHR( + static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); return handle; } @@ -16186,19 +16498,19 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreFdKHR && "Function requires " ); - VkResult result = getDispatcher()->vkImportSemaphoreFdKHR( static_cast( m_device ), - reinterpret_cast( &importSemaphoreFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportSemaphoreFdKHR( + static_cast( m_device ), reinterpret_cast( &importSemaphoreFdInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreFdKHR && "Function requires " ); - int fd; - VkResult result = - getDispatcher()->vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); return fd; } @@ -16259,11 +16571,29 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_descriptor_update_template === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type Device::createDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorUpdateTemplateKHR( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &descriptorUpdateTemplate ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorUpdateTemplateKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate( + *this, *reinterpret_cast( &descriptorUpdateTemplate ), allocator ); } VULKAN_HPP_INLINE void @@ -16313,15 +16643,28 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireXlibDisplayEXT && "Function requires " ); - VkResult result = - getDispatcher()->vkAcquireXlibDisplayEXT( static_cast( m_physicalDevice ), &dpy, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAcquireXlibDisplayEXT( static_cast( m_physicalDevice ), &dpy, static_cast( display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayKHR PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, - RROutput rrOutput ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, dpy, rrOutput ); + VULKAN_HPP_NAMESPACE::DisplayKHR display; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRandROutputDisplayEXT( + static_cast( m_physicalDevice ), &dpy, rrOutput, reinterpret_cast( &display ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getRandROutputDisplayEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, *reinterpret_cast( &display ) ); } # endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ @@ -16334,10 +16677,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), - static_cast( surface ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), + static_cast( surface ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); return surfaceCapabilities; } @@ -16349,34 +16693,69 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkDisplayPowerControlEXT && "Function requires " ); - VkResult result = getDispatcher()->vkDisplayPowerControlEXT( - static_cast( m_device ), static_cast( display ), reinterpret_cast( &displayPowerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDisplayPowerControlEXT( + static_cast( m_device ), static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, deviceEventInfo, allocator ); + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkRegisterDeviceEventEXT( + static_cast( m_device ), + reinterpret_cast( &deviceEventInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &fence ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::registerEventEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, display, displayEventInfo, allocator ); + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkRegisterDisplayEventEXT( + static_cast( m_device ), + static_cast( *display ), + reinterpret_cast( &displayEventInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &fence ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::registerDisplayEventEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t SwapchainKHR::getCounterEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainCounterEXT && "Function requires " ); - uint64_t counterValue; - VkResult result = getDispatcher()->vkGetSwapchainCounterEXT( - static_cast( m_device ), static_cast( m_swapchain ), static_cast( counter ), &counterValue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); + uint64_t counterValue; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSwapchainCounterEXT( + static_cast( m_device ), static_cast( m_swapchain ), static_cast( counter ), &counterValue ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); return counterValue; } @@ -16388,10 +16767,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetRefreshCycleDurationGOOGLE && "Function requires " ); VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties; - VkResult result = getDispatcher()->vkGetRefreshCycleDurationGOOGLE( static_cast( m_device ), - static_cast( m_swapchain ), - reinterpret_cast( &displayTimingProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getRefreshCycleDurationGOOGLE" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetRefreshCycleDurationGOOGLE( static_cast( m_device ), + static_cast( m_swapchain ), + reinterpret_cast( &displayTimingProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getRefreshCycleDurationGOOGLE" ); return displayTimingProperties; } @@ -16403,21 +16783,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentationTimings; uint32_t presentationTimingCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPastPresentationTimingGOOGLE( - static_cast( m_device ), static_cast( m_swapchain ), &presentationTimingCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentationTimingCount ) + result = static_cast( getDispatcher()->vkGetPastPresentationTimingGOOGLE( + static_cast( m_device ), static_cast( m_swapchain ), &presentationTimingCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentationTimingCount ) { presentationTimings.resize( presentationTimingCount ); - result = getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), - static_cast( m_swapchain ), - &presentationTimingCount, - reinterpret_cast( presentationTimings.data() ) ); + result = static_cast( + getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), + static_cast( m_swapchain ), + &presentationTimingCount, + reinterpret_cast( presentationTimings.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getPastPresentationTimingGOOGLE" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getPastPresentationTimingGOOGLE" ); VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); if ( presentationTimingCount < presentationTimings.size() ) { @@ -16463,10 +16844,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & metadata ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetHdrMetadataEXT && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( swapchains.size() == metadata.size() ); +# else if ( swapchains.size() != metadata.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkSetHdrMetadataEXT( static_cast( m_device ), swapchains.size(), @@ -16476,11 +16861,28 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_create_renderpass2 === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::RenderPass - Device::createRenderPass2KHR( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createRenderPass2KHR( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::RenderPass renderPass; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRenderPass2KHR( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &renderPass ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRenderPass2KHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, *reinterpret_cast( &renderPass ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, @@ -16518,8 +16920,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainStatusKHR && "Function requires " ); - VkResult result = getDispatcher()->vkGetSwapchainStatusKHR( static_cast( m_device ), static_cast( m_swapchain ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetSwapchainStatusKHR( static_cast( m_device ), static_cast( m_swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); @@ -16549,9 +16952,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceWin32HandleKHR && "Function requires " ); - VkResult result = getDispatcher()->vkImportFenceWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &importFenceWin32HandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportFenceWin32HandleKHR( + static_cast( m_device ), reinterpret_cast( &importFenceWin32HandleInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE @@ -16559,10 +16962,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceWin32HandleKHR && "Function requires " ); - HANDLE handle; - VkResult result = getDispatcher()->vkGetFenceWin32HandleKHR( - static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); + HANDLE handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetFenceWin32HandleKHR( + static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); return handle; } @@ -16574,18 +16977,19 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceFdKHR && "Function requires " ); - VkResult result = - getDispatcher()->vkImportFenceFdKHR( static_cast( m_device ), reinterpret_cast( &importFenceFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkImportFenceFdKHR( static_cast( m_device ), reinterpret_cast( &importFenceFdInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceFdKHR && "Function requires " ); - int fd; - VkResult result = getDispatcher()->vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); return fd; } @@ -16603,25 +17007,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) + result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, nullptr, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); - result = getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); + reinterpret_cast( counterDescriptions.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { @@ -16650,9 +17053,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireProfilingLockKHR && "Function requires " ); - VkResult result = - getDispatcher()->vkAcquireProfilingLockKHR( static_cast( m_device ), reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAcquireProfilingLockKHR( static_cast( m_device ), reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); } VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR() const VULKAN_HPP_NOEXCEPT @@ -16671,10 +17074,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return surfaceCapabilities; } @@ -16688,10 +17092,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities = structureChain.template get(); - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return structureChain; } @@ -16704,23 +17109,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -16739,14 +17146,15 @@ namespace VULKAN_HPP_NAMESPACE std::vector structureChains; std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); @@ -16754,13 +17162,14 @@ namespace VULKAN_HPP_NAMESPACE { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -16782,18 +17191,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -16809,18 +17219,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -16836,21 +17247,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetDisplayModeProperties2KHR( - static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( getDispatcher()->vkGetDisplayModeProperties2KHR( + static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), - static_cast( m_display ), - &propertyCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), + static_cast( m_display ), + &propertyCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -16866,10 +17278,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; - VkResult result = getDispatcher()->vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &displayPlaneInfo ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &displayPlaneInfo ), + reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); return capabilities; } @@ -16877,22 +17290,56 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createIOSSurfaceMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createIOSSurfaceMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateIOSSurfaceMVK( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createIOSSurfaceMVK" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_IOS_MVK*/ # if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createMacOSSurfaceMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createMacOSSurfaceMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateMacOSSurfaceMVK( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createMacOSSurfaceMVK" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_MACOS_MVK*/ @@ -16902,18 +17349,18 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSetDebugUtilsObjectNameEXT && "Function requires " ); - VkResult result = getDispatcher()->vkSetDebugUtilsObjectNameEXT( static_cast( m_device ), - reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetDebugUtilsObjectNameEXT( + static_cast( m_device ), reinterpret_cast( &nameInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); } VULKAN_HPP_INLINE void Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetDebugUtilsObjectTagEXT && "Function requires " ); - VkResult result = - getDispatcher()->vkSetDebugUtilsObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkSetDebugUtilsObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); } VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT @@ -16960,11 +17407,29 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &labelInfo ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT - Instance::createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDebugUtilsMessengerEXT( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &messenger ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDebugUtilsMessengerEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT( + *this, *reinterpret_cast( &messenger ), allocator ); } VULKAN_HPP_INLINE void @@ -16990,9 +17455,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties; - VkResult result = getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( + static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); return properties; } @@ -17007,9 +17472,9 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID & properties = structureChain.template get(); - VkResult result = getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( + static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); return structureChain; } @@ -17020,10 +17485,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID && "Function requires " ); - struct AHardwareBuffer * buffer; - VkResult result = getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID( - static_cast( m_device ), reinterpret_cast( &info ), &buffer ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); + struct AHardwareBuffer * buffer; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID( + static_cast( m_device ), reinterpret_cast( &info ), &buffer ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); return buffer; } @@ -17032,20 +17497,64 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createExecutionGraphPipelinesAMDX( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::createExecutionGraphPipelinesAMDX( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, pipelineCache, createInfos, allocator ); + std::vector pipelines( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateExecutionGraphPipelinesAMDX( + static_cast( m_device ), + pipelineCache ? static_cast( **pipelineCache ) : 0, + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( pipelines.data() ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createExecutionGraphPipelinesAMDX" ); +# endif + } + + std::vector pipelinesRAII; + pipelinesRAII.reserve( pipelines.size() ); + for ( auto & pipeline : pipelines ) + { + pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); + } + return pipelinesRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline Device::createExecutionGraphPipelineAMDX( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createExecutionGraphPipelineAMDX( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, pipelineCache, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Pipeline pipeline; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateExecutionGraphPipelinesAMDX( + static_cast( m_device ), + pipelineCache ? static_cast( **pipelineCache ) : 0, + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipeline ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createExecutionGraphPipelineAMDX" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX Pipeline::getExecutionGraphScratchSizeAMDX() const @@ -17054,9 +17563,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX sizeInfo; - VkResult result = getDispatcher()->vkGetExecutionGraphPipelineScratchSizeAMDX( - static_cast( m_device ), static_cast( m_pipeline ), reinterpret_cast( &sizeInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getExecutionGraphScratchSizeAMDX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetExecutionGraphPipelineScratchSizeAMDX( + static_cast( m_device ), static_cast( m_pipeline ), reinterpret_cast( &sizeInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getExecutionGraphScratchSizeAMDX" ); return sizeInfo; } @@ -17067,13 +17576,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetExecutionGraphPipelineNodeIndexAMDX && "Function requires " ); - uint32_t nodeIndex; - VkResult result = + uint32_t nodeIndex; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetExecutionGraphPipelineNodeIndexAMDX( static_cast( m_device ), static_cast( m_pipeline ), reinterpret_cast( &nodeInfo ), - &nodeIndex ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getExecutionGraphNodeIndexAMDX" ); + &nodeIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getExecutionGraphNodeIndexAMDX" ); return nodeIndex; } @@ -17231,11 +17740,29 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_acceleration_structure === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR - Device::createAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateAccelerationStructureKHR( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &accelerationStructure ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createAccelerationStructureKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR( + *this, *reinterpret_cast( &accelerationStructure ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresKHR( @@ -17244,10 +17771,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildAccelerationStructuresKHR && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() ); +# else if ( infos.size() != pBuildRangeInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBuildAccelerationStructuresKHR( static_cast( m_commandBuffer ), @@ -17264,6 +17795,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildAccelerationStructuresIndirectKHR && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( infos.size() == indirectDeviceAddresses.size() ); + VULKAN_HPP_ASSERT( infos.size() == indirectStrides.size() ); + VULKAN_HPP_ASSERT( infos.size() == pMaxPrimitiveCounts.size() ); +# else if ( infos.size() != indirectDeviceAddresses.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING @@ -17277,6 +17813,7 @@ namespace VULKAN_HPP_NAMESPACE { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != pMaxPrimitiveCounts.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBuildAccelerationStructuresIndirectKHR( static_cast( m_commandBuffer ), infos.size(), @@ -17293,18 +17830,22 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBuildAccelerationStructuresKHR && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() ); +# else if ( infos.size() != pBuildRangeInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ - VkResult result = getDispatcher()->vkBuildAccelerationStructuresKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBuildAccelerationStructuresKHR( static_cast( m_device ), static_cast( deferredOperation ), infos.size(), reinterpret_cast( infos.data() ), - reinterpret_cast( pBuildRangeInfos.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pBuildRangeInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -17320,10 +17861,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkCopyAccelerationStructureKHR && "Function requires " ); - VkResult result = getDispatcher()->vkCopyAccelerationStructureKHR( static_cast( m_device ), - static_cast( deferredOperation ), - reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkCopyAccelerationStructureKHR( static_cast( m_device ), + static_cast( deferredOperation ), + reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -17339,11 +17881,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkCopyAccelerationStructureToMemoryKHR && "Function requires " ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyAccelerationStructureToMemoryKHR( static_cast( m_device ), static_cast( deferredOperation ), - reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureToMemoryKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -17359,11 +17901,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToAccelerationStructureKHR && "Function requires " ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyMemoryToAccelerationStructureKHR( static_cast( m_device ), static_cast( deferredOperation ), - reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToAccelerationStructureKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -17383,16 +17925,16 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = + std::vector data( dataSize / sizeof( DataType ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR( static_cast( m_device ), accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertiesKHR" ); + stride ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertiesKHR" ); return data; } @@ -17406,16 +17948,16 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR && "Function requires " ); - DataType data; - VkResult result = + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR( static_cast( m_device ), accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), sizeof( DataType ), reinterpret_cast( &data ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertyKHR" ); + stride ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertyKHR" ); return data; } @@ -17500,10 +18042,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureBuildSizesKHR && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( maxPrimitiveCounts.size() == buildInfo.geometryCount ); +# else if ( maxPrimitiveCounts.size() != buildInfo.geometryCount ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureBuildSizesKHR: maxPrimitiveCounts.size() != buildInfo.geometryCount" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; getDispatcher()->vkGetAccelerationStructureBuildSizesKHR( static_cast( m_device ), @@ -17537,22 +18083,70 @@ namespace VULKAN_HPP_NAMESPACE depth ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createRayTracingPipelinesKHR( - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::createRayTracingPipelinesKHR( + VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, deferredOperation, pipelineCache, createInfos, allocator ); + std::vector pipelines( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRayTracingPipelinesKHR( + static_cast( m_device ), + deferredOperation ? static_cast( **deferredOperation ) : 0, + pipelineCache ? static_cast( **pipelineCache ) : 0, + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( pipelines.data() ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && + ( result != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRayTracingPipelinesKHR" ); +# endif + } + + std::vector pipelinesRAII; + pipelinesRAII.reserve( pipelines.size() ); + for ( auto & pipeline : pipelines ) + { + pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); + } + return pipelinesRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline Device::createRayTracingPipelineKHR( - VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createRayTracingPipelineKHR( + VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, deferredOperation, pipelineCache, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Pipeline pipeline; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRayTracingPipelinesKHR( + static_cast( m_device ), + deferredOperation ? static_cast( **deferredOperation ) : 0, + pipelineCache ? static_cast( **pipelineCache ) : 0, + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipeline ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && + ( result != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRayTracingPipelineKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator ); } template @@ -17563,14 +18157,15 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandlesKHR" ); + std::vector data( dataSize / sizeof( DataType ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), + static_cast( m_pipeline ), + firstGroup, + groupCount, + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandlesKHR" ); return data; } @@ -17581,14 +18176,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR && "Function requires or " ); - DataType data; - VkResult result = getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - sizeof( DataType ), - reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandleKHR" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), + static_cast( m_pipeline ), + firstGroup, + groupCount, + sizeof( DataType ), + reinterpret_cast( &data ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandleKHR" ); return data; } @@ -17601,15 +18197,15 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingCaptureReplayShaderGroupHandlesKHR" ); + std::vector data( dataSize / sizeof( DataType ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), + static_cast( m_pipeline ), + firstGroup, + groupCount, + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingCaptureReplayShaderGroupHandlesKHR" ); return data; } @@ -17620,15 +18216,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - sizeof( DataType ), - reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingCaptureReplayShaderGroupHandleKHR" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), + static_cast( m_pipeline ), + firstGroup, + groupCount, + sizeof( DataType ), + reinterpret_cast( &data ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingCaptureReplayShaderGroupHandleKHR" ); return data; } @@ -17671,11 +18267,29 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_sampler_ycbcr_conversion === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - Device::createSamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSamplerYcbcrConversionKHR( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &ycbcrConversion ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSamplerYcbcrConversionKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( + *this, *reinterpret_cast( &ycbcrConversion ), allocator ); } VULKAN_HPP_INLINE void @@ -17698,9 +18312,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory2KHR && "Function requires or " ); - VkResult result = getDispatcher()->vkBindBufferMemory2KHR( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindBufferMemory2KHR( + static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" ); } VULKAN_HPP_INLINE void @@ -17708,9 +18322,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory2KHR && "Function requires or " ); - VkResult result = getDispatcher()->vkBindImageMemory2KHR( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindImageMemory2KHR( + static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" ); } //=== VK_EXT_image_drm_format_modifier === @@ -17721,52 +18335,71 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; - VkResult result = getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( - static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( + static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); return properties; } //=== VK_EXT_validation_cache === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT - Device::createValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateValidationCacheEXT( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &validationCache ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createValidationCacheEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT( + *this, *reinterpret_cast( &validationCache ), allocator ); } VULKAN_HPP_INLINE void ValidationCacheEXT::merge( VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkMergeValidationCachesEXT && "Function requires " ); - VkResult result = getDispatcher()->vkMergeValidationCachesEXT( static_cast( m_device ), - static_cast( m_validationCache ), - srcCaches.size(), - reinterpret_cast( srcCaches.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::merge" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkMergeValidationCachesEXT( static_cast( m_device ), + static_cast( m_validationCache ), + srcCaches.size(), + reinterpret_cast( srcCaches.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::merge" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector ValidationCacheEXT::getData() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetValidationCacheDataEXT && "Function requires " ); - std::vector data; - size_t dataSize; - VkResult result; + std::vector data; + size_t dataSize; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetValidationCacheDataEXT( - static_cast( m_device ), static_cast( m_validationCache ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( getDispatcher()->vkGetValidationCacheDataEXT( + static_cast( m_device ), static_cast( m_validationCache ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = getDispatcher()->vkGetValidationCacheDataEXT( - static_cast( m_device ), static_cast( m_validationCache ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( getDispatcher()->vkGetValidationCacheDataEXT( + static_cast( m_device ), static_cast( m_validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::getData" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::getData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { @@ -17813,11 +18446,29 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_NV_ray_tracing === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV - Device::createAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateAccelerationStructureNV( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &accelerationStructure ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createAccelerationStructureNV" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV( + *this, *reinterpret_cast( &accelerationStructure ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR Device::getAccelerationStructureMemoryRequirementsNV( @@ -17856,9 +18507,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkBindAccelerationStructureMemoryNV && "Function requires " ); - VkResult result = getDispatcher()->vkBindAccelerationStructureMemoryNV( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindAccelerationStructureMemoryNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindAccelerationStructureMemoryNV( + static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindAccelerationStructureMemoryNV" ); } VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, @@ -17929,20 +18580,64 @@ namespace VULKAN_HPP_NAMESPACE depth ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::createRayTracingPipelinesNV( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::createRayTracingPipelinesNV( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, pipelineCache, createInfos, allocator ); + std::vector pipelines( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRayTracingPipelinesNV( + static_cast( m_device ), + pipelineCache ? static_cast( **pipelineCache ) : 0, + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( pipelines.data() ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRayTracingPipelinesNV" ); +# endif + } + + std::vector pipelinesRAII; + pipelinesRAII.reserve( pipelines.size() ); + for ( auto & pipeline : pipelines ) + { + pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); + } + return pipelinesRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline Device::createRayTracingPipelineNV( - VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, - VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createRayTracingPipelineNV( + VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, + VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, pipelineCache, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Pipeline pipeline; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRayTracingPipelinesNV( + static_cast( m_device ), + pipelineCache ? static_cast( **pipelineCache ) : 0, + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipeline ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRayTracingPipelineNV" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator ); } template @@ -17953,14 +18648,15 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandlesNV" ); + std::vector data( dataSize / sizeof( DataType ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), + static_cast( m_pipeline ), + firstGroup, + groupCount, + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandlesNV" ); return data; } @@ -17971,14 +18667,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV && "Function requires or " ); - DataType data; - VkResult result = getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), - static_cast( m_pipeline ), - firstGroup, - groupCount, - sizeof( DataType ), - reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandleNV" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), + static_cast( m_pipeline ), + firstGroup, + groupCount, + sizeof( DataType ), + reinterpret_cast( &data ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandleNV" ); return data; } @@ -17989,12 +18686,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureHandleNV && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetAccelerationStructureHandleNV( static_cast( m_device ), - static_cast( m_accelerationStructure ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureNV::getHandle" ); + std::vector data( dataSize / sizeof( DataType ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetAccelerationStructureHandleNV( static_cast( m_device ), + static_cast( m_accelerationStructure ), + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureNV::getHandle" ); return data; } @@ -18004,12 +18702,13 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureHandleNV && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetAccelerationStructureHandleNV( static_cast( m_device ), - static_cast( m_accelerationStructure ), - sizeof( DataType ), - reinterpret_cast( &data ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureNV::getHandle" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetAccelerationStructureHandleNV( static_cast( m_device ), + static_cast( m_accelerationStructure ), + sizeof( DataType ), + reinterpret_cast( &data ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureNV::getHandle" ); return data; } @@ -18035,8 +18734,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCompileDeferredNV && "Function requires " ); - VkResult result = getDispatcher()->vkCompileDeferredNV( static_cast( m_device ), static_cast( m_pipeline ), shader ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Pipeline::compileDeferredNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkCompileDeferredNV( static_cast( m_device ), static_cast( m_pipeline ), shader ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::compileDeferredNV" ); } //=== VK_KHR_maintenance3 === @@ -18121,12 +18821,12 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryHostPointerPropertiesEXT( static_cast( m_device ), static_cast( handleType ), pHostPointer, - reinterpret_cast( &memoryHostPointerProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); + reinterpret_cast( &memoryHostPointerProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); return memoryHostPointerProperties; } @@ -18157,19 +18857,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains; uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( - static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( + static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { @@ -18187,12 +18887,13 @@ namespace VULKAN_HPP_NAMESPACE std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = getDispatcher()->vkGetCalibratedTimestampsEXT( static_cast( m_device ), - timestampInfos.size(), - reinterpret_cast( timestampInfos.data() ), - timestamps.data(), - &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetCalibratedTimestampsEXT( static_cast( m_device ), + timestampInfos.size(), + reinterpret_cast( timestampInfos.data() ), + timestamps.data(), + &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); return data_; } @@ -18206,9 +18907,9 @@ namespace VULKAN_HPP_NAMESPACE std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = getDispatcher()->vkGetCalibratedTimestampsEXT( - static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetCalibratedTimestampsEXT( + static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); return data_; } @@ -18314,9 +19015,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreCounterValueKHR && "Function requires or " ); - uint64_t value; - VkResult result = getDispatcher()->vkGetSemaphoreCounterValueKHR( static_cast( m_device ), static_cast( m_semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValueKHR" ); + uint64_t value; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetSemaphoreCounterValueKHR( static_cast( m_device ), static_cast( m_semaphore ), &value ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValueKHR" ); return value; } @@ -18326,11 +19028,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitSemaphoresKHR && "Function requires or " ); - VkResult result = - getDispatcher()->vkWaitSemaphoresKHR( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkWaitSemaphoresKHR( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } @@ -18339,9 +19040,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSignalSemaphoreKHR && "Function requires or " ); - VkResult result = - getDispatcher()->vkSignalSemaphoreKHR( static_cast( m_device ), reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkSignalSemaphoreKHR( static_cast( m_device ), reinterpret_cast( &signalInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" ); } //=== VK_INTEL_performance_query === @@ -18351,9 +19052,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkInitializePerformanceApiINTEL && "Function requires " ); - VkResult result = getDispatcher()->vkInitializePerformanceApiINTEL( static_cast( m_device ), - reinterpret_cast( &initializeInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkInitializePerformanceApiINTEL( + static_cast( m_device ), reinterpret_cast( &initializeInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" ); } VULKAN_HPP_INLINE void Device::uninitializePerformanceApiINTEL() const VULKAN_HPP_NOEXCEPT @@ -18368,9 +19069,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceMarkerINTEL && "Function requires " ); - VkResult result = getDispatcher()->vkCmdSetPerformanceMarkerINTEL( static_cast( m_commandBuffer ), - reinterpret_cast( &markerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCmdSetPerformanceMarkerINTEL( + static_cast( m_commandBuffer ), reinterpret_cast( &markerInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" ); } VULKAN_HPP_INLINE void CommandBuffer::setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo ) const @@ -18378,9 +19079,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceStreamMarkerINTEL && "Function requires " ); - VkResult result = getDispatcher()->vkCmdSetPerformanceStreamMarkerINTEL( static_cast( m_commandBuffer ), - reinterpret_cast( &markerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCmdSetPerformanceStreamMarkerINTEL( + static_cast( m_commandBuffer ), reinterpret_cast( &markerInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" ); } VULKAN_HPP_INLINE void CommandBuffer::setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo ) const @@ -18388,15 +19089,32 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceOverrideINTEL && "Function requires " ); - VkResult result = getDispatcher()->vkCmdSetPerformanceOverrideINTEL( static_cast( m_commandBuffer ), - reinterpret_cast( &overrideInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCmdSetPerformanceOverrideINTEL( + static_cast( m_commandBuffer ), reinterpret_cast( &overrideInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type Device::acquirePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL( *this, acquireInfo ); + VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAcquirePerformanceConfigurationINTEL( static_cast( m_device ), + reinterpret_cast( &acquireInfo ), + reinterpret_cast( &configuration ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::acquirePerformanceConfigurationINTEL" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL( + *this, *reinterpret_cast( &configuration ) ); } VULKAN_HPP_INLINE void Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration ) const @@ -18404,9 +19122,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSetPerformanceConfigurationINTEL && "Function requires " ); - VkResult result = getDispatcher()->vkQueueSetPerformanceConfigurationINTEL( static_cast( m_queue ), - static_cast( configuration ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSetPerformanceConfigurationINTEL( + static_cast( m_queue ), static_cast( configuration ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PerformanceValueINTEL @@ -18415,9 +19133,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetPerformanceParameterINTEL && "Function requires " ); VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value; - VkResult result = getDispatcher()->vkGetPerformanceParameterINTEL( - static_cast( m_device ), static_cast( parameter ), reinterpret_cast( &value ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPerformanceParameterINTEL( + static_cast( m_device ), static_cast( parameter ), reinterpret_cast( &value ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); return value; } @@ -18435,22 +19153,56 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createImagePipeSurfaceFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createImagePipeSurfaceFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateImagePipeSurfaceFUCHSIA( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createImagePipeSurfaceFUCHSIA" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createMetalSurfaceEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createMetalSurfaceEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateMetalSurfaceEXT( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createMetalSurfaceEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_METAL_EXT*/ @@ -18464,21 +19216,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector fragmentShadingRates; uint32_t fragmentShadingRateCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( + static_cast( m_physicalDevice ), &fragmentShadingRateCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); - result = getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( + result = static_cast( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, - reinterpret_cast( fragmentShadingRates.data() ) ); + reinterpret_cast( fragmentShadingRates.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { @@ -18523,18 +19275,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties; uint32_t toolCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( static_cast( m_physicalDevice ), &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( static_cast( m_physicalDevice ), &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( - static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( + static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { @@ -18549,9 +19302,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitForPresentKHR && "Function requires " ); - VkResult result = - getDispatcher()->vkWaitForPresentKHR( static_cast( m_device ), static_cast( m_swapchain ), presentId, timeout ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkWaitForPresentKHR( static_cast( m_device ), static_cast( m_swapchain ), presentId, timeout ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::waitForPresent", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); @@ -18568,19 +19321,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -18599,22 +19352,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector combinations; uint32_t combinationCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - static_cast( m_physicalDevice ), &combinationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && combinationCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + static_cast( m_physicalDevice ), &combinationCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && combinationCount ) { combinations.resize( combinationCount ); - result = getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + result = static_cast( getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( static_cast( m_physicalDevice ), &combinationCount, - reinterpret_cast( combinations.data() ) ); + reinterpret_cast( combinations.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); if ( combinationCount < combinations.size() ) { @@ -18634,23 +19386,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes; uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &presentModeCount, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &presentModeCount, + reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { @@ -18664,8 +19418,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireFullScreenExclusiveModeEXT && "Function requires " ); - VkResult result = getDispatcher()->vkAcquireFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( m_swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireFullScreenExclusiveModeEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAcquireFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( m_swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireFullScreenExclusiveModeEXT" ); } VULKAN_HPP_INLINE void SwapchainKHR::releaseFullScreenExclusiveModeEXT() const @@ -18673,8 +19428,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkReleaseFullScreenExclusiveModeEXT && "Function requires " ); - VkResult result = getDispatcher()->vkReleaseFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( m_swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::releaseFullScreenExclusiveModeEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkReleaseFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( m_swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::releaseFullScreenExclusiveModeEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR @@ -18684,10 +19440,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT( static_cast( m_device ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT( static_cast( m_device ), + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &modes ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); return modes; } @@ -18695,11 +19452,28 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_headless_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateHeadlessSurfaceEXT( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createHeadlessSurfaceEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } //=== VK_KHR_buffer_device_address === @@ -18814,6 +19588,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers2EXT && "Function requires or or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); + VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); + VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); +# else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != offsets.size()" ); @@ -18826,6 +19605,7 @@ namespace VULKAN_HPP_NAMESPACE { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != strides.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers2EXT( static_cast( m_commandBuffer ), firstBinding, @@ -18895,10 +19675,27 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_deferred_host_operations === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type Device::createDeferredOperationKHR( VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR( *this, allocator ); + VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDeferredOperationKHR( + static_cast( m_device ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &deferredOperation ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDeferredOperationKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR( + *this, *reinterpret_cast( &deferredOperation ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t DeferredOperationKHR::getMaxConcurrency() const VULKAN_HPP_NOEXCEPT @@ -18917,8 +19714,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeferredOperationResultKHR && "Function requires " ); - VkResult result = - getDispatcher()->vkGetDeferredOperationResultKHR( static_cast( m_device ), static_cast( m_operation ) ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetDeferredOperationResultKHR( static_cast( m_device ), static_cast( m_operation ) ) ); return static_cast( result ); } @@ -18927,8 +19724,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkDeferredOperationJoinKHR && "Function requires " ); - VkResult result = getDispatcher()->vkDeferredOperationJoinKHR( static_cast( m_device ), static_cast( m_operation ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkDeferredOperationJoinKHR( static_cast( m_device ), static_cast( m_operation ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DeferredOperationKHR::join", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR, VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR } ); @@ -18945,21 +19743,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t executableCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPipelineExecutablePropertiesKHR( - static_cast( m_device ), reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ); - if ( ( result == VK_SUCCESS ) && executableCount ) + result = static_cast( getDispatcher()->vkGetPipelineExecutablePropertiesKHR( + static_cast( m_device ), reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && executableCount ) { properties.resize( executableCount ); - result = getDispatcher()->vkGetPipelineExecutablePropertiesKHR( static_cast( m_device ), - reinterpret_cast( &pipelineInfo ), - &executableCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkGetPipelineExecutablePropertiesKHR( static_cast( m_device ), + reinterpret_cast( &pipelineInfo ), + &executableCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); VULKAN_HPP_ASSERT( executableCount <= properties.size() ); if ( executableCount < properties.size() ) { @@ -18976,21 +19775,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector statistics; uint32_t statisticCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPipelineExecutableStatisticsKHR( - static_cast( m_device ), reinterpret_cast( &executableInfo ), &statisticCount, nullptr ); - if ( ( result == VK_SUCCESS ) && statisticCount ) + result = static_cast( getDispatcher()->vkGetPipelineExecutableStatisticsKHR( + static_cast( m_device ), reinterpret_cast( &executableInfo ), &statisticCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && statisticCount ) { statistics.resize( statisticCount ); - result = getDispatcher()->vkGetPipelineExecutableStatisticsKHR( static_cast( m_device ), - reinterpret_cast( &executableInfo ), - &statisticCount, - reinterpret_cast( statistics.data() ) ); + result = static_cast( + getDispatcher()->vkGetPipelineExecutableStatisticsKHR( static_cast( m_device ), + reinterpret_cast( &executableInfo ), + &statisticCount, + reinterpret_cast( statistics.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); if ( statisticCount < statistics.size() ) { @@ -19007,23 +19807,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector internalRepresentations; uint32_t internalRepresentationCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( - static_cast( m_device ), reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ); - if ( ( result == VK_SUCCESS ) && internalRepresentationCount ) + result = static_cast( + getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( static_cast( m_device ), + reinterpret_cast( &executableInfo ), + &internalRepresentationCount, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && internalRepresentationCount ) { internalRepresentations.resize( internalRepresentationCount ); - result = getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( + result = static_cast( getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( static_cast( m_device ), reinterpret_cast( &executableInfo ), &internalRepresentationCount, - reinterpret_cast( internalRepresentations.data() ) ); + reinterpret_cast( internalRepresentations.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); if ( internalRepresentationCount < internalRepresentations.size() ) { @@ -19038,27 +19840,27 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToImageEXT && "Function requires " ); - VkResult result = getDispatcher()->vkCopyMemoryToImageEXT( static_cast( m_device ), - reinterpret_cast( ©MemoryToImageInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToImageEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyMemoryToImageEXT( + static_cast( m_device ), reinterpret_cast( ©MemoryToImageInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToImageEXT" ); } VULKAN_HPP_INLINE void Device::copyImageToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfoEXT & copyImageToMemoryInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyImageToMemoryEXT && "Function requires " ); - VkResult result = getDispatcher()->vkCopyImageToMemoryEXT( static_cast( m_device ), - reinterpret_cast( ©ImageToMemoryInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToMemoryEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyImageToMemoryEXT( + static_cast( m_device ), reinterpret_cast( ©ImageToMemoryInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToMemoryEXT" ); } VULKAN_HPP_INLINE void Device::copyImageToImageEXT( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfoEXT & copyImageToImageInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyImageToImageEXT && "Function requires " ); - VkResult result = getDispatcher()->vkCopyImageToImageEXT( static_cast( m_device ), - reinterpret_cast( ©ImageToImageInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToImageEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyImageToImageEXT( + static_cast( m_device ), reinterpret_cast( ©ImageToImageInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToImageEXT" ); } VULKAN_HPP_INLINE void Device::transitionImageLayoutEXT( @@ -19066,9 +19868,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkTransitionImageLayoutEXT && "Function requires " ); - VkResult result = getDispatcher()->vkTransitionImageLayoutEXT( - static_cast( m_device ), transitions.size(), reinterpret_cast( transitions.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::transitionImageLayoutEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkTransitionImageLayoutEXT( + static_cast( m_device ), transitions.size(), reinterpret_cast( transitions.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::transitionImageLayoutEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2KHR @@ -19111,10 +19913,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkMapMemory2KHR && "Function requires " ); - void * pData; - VkResult result = - getDispatcher()->vkMapMemory2KHR( static_cast( m_device ), reinterpret_cast( &memoryMapInfo ), &pData ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory2KHR" ); + void * pData; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkMapMemory2KHR( static_cast( m_device ), reinterpret_cast( &memoryMapInfo ), &pData ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory2KHR" ); return pData; } @@ -19132,9 +19934,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkReleaseSwapchainImagesEXT && "Function requires " ); - VkResult result = getDispatcher()->vkReleaseSwapchainImagesEXT( static_cast( m_device ), - reinterpret_cast( &releaseInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::releaseSwapchainImagesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkReleaseSwapchainImagesEXT( + static_cast( m_device ), reinterpret_cast( &releaseInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releaseSwapchainImagesEXT" ); } //=== VK_NV_device_generated_commands === @@ -19204,11 +20006,29 @@ namespace VULKAN_HPP_NAMESPACE groupIndex ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV - Device::createIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateIndirectCommandsLayoutNV( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &indirectCommandsLayout ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createIndirectCommandsLayoutNV" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV( + *this, *reinterpret_cast( &indirectCommandsLayout ), allocator ); } //=== VK_EXT_depth_bias_control === @@ -19226,23 +20046,54 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireDrmDisplayEXT && "Function requires " ); - VkResult result = - getDispatcher()->vkAcquireDrmDisplayEXT( static_cast( m_physicalDevice ), drmFd, static_cast( display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAcquireDrmDisplayEXT( static_cast( m_physicalDevice ), drmFd, static_cast( display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayKHR PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, drmFd, connectorId ); + VULKAN_HPP_NAMESPACE::DisplayKHR display; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDrmDisplayEXT( + static_cast( m_physicalDevice ), drmFd, connectorId, reinterpret_cast( &display ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getDrmDisplayEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, *reinterpret_cast( &display ) ); } //=== VK_EXT_private_data === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - Device::createPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePrivateDataSlotEXT( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &privateDataSlot ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPrivateDataSlotEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, *reinterpret_cast( &privateDataSlot ), allocator ); } VULKAN_HPP_INLINE void Device::destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, @@ -19264,9 +20115,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSetPrivateDataEXT && "Function requires or " ); - VkResult result = getDispatcher()->vkSetPrivateDataEXT( - static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateDataEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetPrivateDataEXT( + static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateDataEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, @@ -19291,12 +20142,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR qualityLevelProperties; - VkResult result = getDispatcher()->vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &qualityLevelInfo ), - reinterpret_cast( &qualityLevelProperties ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); + reinterpret_cast( &qualityLevelProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); return qualityLevelProperties; } @@ -19311,12 +20161,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR & qualityLevelProperties = structureChain.template get(); - VkResult result = getDispatcher()->vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &qualityLevelInfo ), - reinterpret_cast( &qualityLevelProperties ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); + reinterpret_cast( &qualityLevelProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); return structureChain; } @@ -19331,27 +20180,27 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first; std::vector & data = data_.second; size_t dataSize; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetEncodedVideoSessionParametersKHR( + result = static_cast( getDispatcher()->vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = getDispatcher()->vkGetEncodedVideoSessionParametersKHR( + result = static_cast( getDispatcher()->vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, - reinterpret_cast( data.data() ) ); + reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); return data_; } @@ -19366,29 +20215,29 @@ namespace VULKAN_HPP_NAMESPACE std::pair, std::vector> data_; VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first.template get(); - std::vector & data = data_.second; - size_t dataSize; - VkResult result; + std::vector & data = data_.second; + size_t dataSize; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetEncodedVideoSessionParametersKHR( + result = static_cast( getDispatcher()->vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, - nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = getDispatcher()->vkGetEncodedVideoSessionParametersKHR( + result = static_cast( getDispatcher()->vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, - reinterpret_cast( data.data() ) ); + reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); return data_; } @@ -19403,31 +20252,49 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CudaModuleNV - Device::createCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::CudaModuleNV( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::CudaModuleNV module; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCudaModuleNV( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &module ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCudaModuleNV" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CudaModuleNV( *this, *reinterpret_cast( &module ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector CudaModuleNV::getCache() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetCudaModuleCacheNV && "Function requires " ); - std::vector cacheData; - size_t cacheSize; - VkResult result; + std::vector cacheData; + size_t cacheSize; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetCudaModuleCacheNV( static_cast( m_device ), static_cast( m_module ), &cacheSize, nullptr ); - if ( ( result == VK_SUCCESS ) && cacheSize ) + result = static_cast( + getDispatcher()->vkGetCudaModuleCacheNV( static_cast( m_device ), static_cast( m_module ), &cacheSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && cacheSize ) { cacheData.resize( cacheSize ); - result = getDispatcher()->vkGetCudaModuleCacheNV( - static_cast( m_device ), static_cast( m_module ), &cacheSize, reinterpret_cast( cacheData.data() ) ); + result = static_cast( getDispatcher()->vkGetCudaModuleCacheNV( + static_cast( m_device ), static_cast( m_module ), &cacheSize, reinterpret_cast( cacheData.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CudaModuleNV::getCache" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CudaModuleNV::getCache" ); VULKAN_HPP_ASSERT( cacheSize <= cacheData.size() ); if ( cacheSize < cacheData.size() ) { @@ -19436,11 +20303,28 @@ namespace VULKAN_HPP_NAMESPACE return cacheData; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CudaFunctionNV - Device::createCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::CudaFunctionNV( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::CudaFunctionNV function; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCudaFunctionNV( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &function ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCudaFunctionNV" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CudaFunctionNV( *this, *reinterpret_cast( &function ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::cudaLaunchKernelNV( const VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV & launchInfo ) const VULKAN_HPP_NOEXCEPT @@ -19502,10 +20386,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWaitEvents2KHR && "Function requires or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); +# else if ( events.size() != dependencyInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2KHR: events.size() != dependencyInfos.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdWaitEvents2KHR( static_cast( m_commandBuffer ), events.size(), @@ -19538,9 +20426,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit2KHR && "Function requires or " ); - VkResult result = getDispatcher()->vkQueueSubmit2KHR( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit2KHR( + static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); } VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, @@ -19647,10 +20535,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDescriptorBufferOffsetsEXT && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( bufferIndices.size() == offsets.size() ); +# else if ( bufferIndices.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setDescriptorBufferOffsetsEXT: bufferIndices.size() != offsets.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdSetDescriptorBufferOffsetsEXT( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), @@ -19679,10 +20571,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferOpaqueCaptureDescriptorDataEXT && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetBufferOpaqueCaptureDescriptorDataEXT( - static_cast( m_device ), reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetBufferOpaqueCaptureDescriptorDataEXT( + static_cast( m_device ), reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferOpaqueCaptureDescriptorDataEXT" ); return data; } @@ -19694,10 +20586,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageOpaqueCaptureDescriptorDataEXT && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetImageOpaqueCaptureDescriptorDataEXT( - static_cast( m_device ), reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageOpaqueCaptureDescriptorDataEXT( + static_cast( m_device ), reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageOpaqueCaptureDescriptorDataEXT" ); return data; } @@ -19709,10 +20601,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewOpaqueCaptureDescriptorDataEXT && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetImageViewOpaqueCaptureDescriptorDataEXT( - static_cast( m_device ), reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageViewOpaqueCaptureDescriptorDataEXT( + static_cast( m_device ), reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewOpaqueCaptureDescriptorDataEXT" ); return data; } @@ -19724,10 +20616,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetSamplerOpaqueCaptureDescriptorDataEXT && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetSamplerOpaqueCaptureDescriptorDataEXT( - static_cast( m_device ), reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSamplerOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSamplerOpaqueCaptureDescriptorDataEXT( + static_cast( m_device ), reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSamplerOpaqueCaptureDescriptorDataEXT" ); return data; } @@ -19739,11 +20631,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( - static_cast( m_device ), reinterpret_cast( &info ), &data ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + static_cast( m_device ), reinterpret_cast( &info ), &data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT" ); return data; } @@ -19862,9 +20754,11 @@ namespace VULKAN_HPP_NAMESPACE std::pair data_; VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT & faultCounts = data_.first; VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT & faultInfo = data_.second; - VkResult result = getDispatcher()->vkGetDeviceFaultInfoEXT( - static_cast( m_device ), reinterpret_cast( &faultCounts ), reinterpret_cast( &faultInfo ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetDeviceFaultInfoEXT( static_cast( m_device ), + reinterpret_cast( &faultCounts ), + reinterpret_cast( &faultInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultInfoEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); @@ -19878,24 +20772,56 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireWinrtDisplayNV && "Function requires " ); - VkResult result = getDispatcher()->vkAcquireWinrtDisplayNV( static_cast( m_physicalDevice ), static_cast( m_display ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::acquireWinrtNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAcquireWinrtDisplayNV( static_cast( m_physicalDevice ), static_cast( m_display ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::acquireWinrtNV" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayKHR PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, deviceRelativeId ); + VULKAN_HPP_NAMESPACE::DisplayKHR display; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetWinrtDisplayNV( + static_cast( m_physicalDevice ), deviceRelativeId, reinterpret_cast( &display ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getWinrtDisplayNV" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, *reinterpret_cast( &display ) ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createDirectFBSurfaceEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createDirectFBSurfaceEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDirectFBSurfaceEXT( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDirectFBSurfaceEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 @@ -19936,10 +20862,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryZirconHandleFUCHSIA && "Function requires " ); - zx_handle_t zirconHandle; - VkResult result = getDispatcher()->vkGetMemoryZirconHandleFUCHSIA( - static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); + zx_handle_t zirconHandle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryZirconHandleFUCHSIA( + static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); return zirconHandle; } @@ -19951,12 +20877,12 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA memoryZirconHandleProperties; - VkResult result = - getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA( static_cast( m_device ), - static_cast( handleType ), - zirconHandle, - reinterpret_cast( &memoryZirconHandleProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA( + static_cast( m_device ), + static_cast( handleType ), + zirconHandle, + reinterpret_cast( &memoryZirconHandleProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); return memoryZirconHandleProperties; } @@ -19971,9 +20897,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreZirconHandleFUCHSIA && "Function requires " ); - VkResult result = getDispatcher()->vkImportSemaphoreZirconHandleFUCHSIA( - static_cast( m_device ), reinterpret_cast( &importSemaphoreZirconHandleInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreZirconHandleFUCHSIA" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportSemaphoreZirconHandleFUCHSIA( + static_cast( m_device ), reinterpret_cast( &importSemaphoreZirconHandleInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreZirconHandleFUCHSIA" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE zx_handle_t @@ -19982,10 +20908,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA && "Function requires " ); - zx_handle_t zirconHandle; - VkResult result = getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA( - static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); + zx_handle_t zirconHandle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA( + static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); return zirconHandle; } @@ -19994,11 +20920,29 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA - Device::createBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateBufferCollectionFUCHSIA( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &collection ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createBufferCollectionFUCHSIA" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA( + *this, *reinterpret_cast( &collection ), allocator ); } VULKAN_HPP_INLINE void BufferCollectionFUCHSIA::setImageConstraints( const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo ) const @@ -20006,11 +20950,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkSetBufferCollectionImageConstraintsFUCHSIA && "Function requires " ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetBufferCollectionImageConstraintsFUCHSIA( static_cast( m_device ), static_cast( m_collection ), - reinterpret_cast( &imageConstraintsInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::setImageConstraints" ); + reinterpret_cast( &imageConstraintsInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::setImageConstraints" ); } VULKAN_HPP_INLINE void @@ -20019,11 +20963,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkSetBufferCollectionBufferConstraintsFUCHSIA && "Function requires " ); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetBufferCollectionBufferConstraintsFUCHSIA( static_cast( m_device ), static_cast( m_collection ), - reinterpret_cast( &bufferConstraintsInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::setBufferConstraints" ); + reinterpret_cast( &bufferConstraintsInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::setBufferConstraints" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA BufferCollectionFUCHSIA::getProperties() const @@ -20032,10 +20976,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA properties; - VkResult result = getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA( static_cast( m_device ), - static_cast( m_collection ), - reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::getProperties" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA( static_cast( m_device ), + static_cast( m_collection ), + reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::getProperties" ); return properties; } @@ -20050,9 +20995,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; - VkResult result = getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( - static_cast( m_device ), static_cast( m_renderPass ), reinterpret_cast( &maxWorkgroupSize ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( + static_cast( m_device ), static_cast( m_renderPass ), reinterpret_cast( &maxWorkgroupSize ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); @@ -20085,10 +21030,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryRemoteAddressNV && "Function requires " ); VULKAN_HPP_NAMESPACE::RemoteAddressNV address; - VkResult result = getDispatcher()->vkGetMemoryRemoteAddressNV( static_cast( m_device ), - reinterpret_cast( &memoryGetRemoteAddressInfo ), - reinterpret_cast( &address ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetMemoryRemoteAddressNV( static_cast( m_device ), + reinterpret_cast( &memoryGetRemoteAddressInfo ), + reinterpret_cast( &address ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); return address; } @@ -20101,10 +21047,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelinePropertiesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::BaseOutStructure pipelineProperties; - VkResult result = getDispatcher()->vkGetPipelinePropertiesEXT( static_cast( m_device ), - reinterpret_cast( &pipelineInfo ), - reinterpret_cast( &pipelineProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPipelinePropertiesEXT( static_cast( m_device ), + reinterpret_cast( &pipelineInfo ), + reinterpret_cast( &pipelineProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); return pipelineProperties; } @@ -20156,11 +21103,28 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createScreenSurfaceQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createScreenSurfaceQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateScreenSurfaceQNX( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createScreenSurfaceQNX" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 @@ -20232,11 +21196,28 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_opacity_micromap === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::MicromapEXT - Device::createMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::MicromapEXT( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::MicromapEXT micromap; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateMicromapEXT( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( µmap ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createMicromapEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::MicromapEXT( *this, *reinterpret_cast( µmap ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::buildMicromapsEXT( @@ -20254,11 +21235,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBuildMicromapsEXT && "Function requires " ); - VkResult result = getDispatcher()->vkBuildMicromapsEXT( static_cast( m_device ), - static_cast( deferredOperation ), - infos.size(), - reinterpret_cast( infos.data() ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkBuildMicromapsEXT( static_cast( m_device ), + static_cast( deferredOperation ), + infos.size(), + reinterpret_cast( infos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildMicromapsEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -20272,9 +21254,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMicromapEXT && "Function requires " ); - VkResult result = getDispatcher()->vkCopyMicromapEXT( - static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkCopyMicromapEXT( static_cast( m_device ), + static_cast( deferredOperation ), + reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMicromapEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -20289,10 +21273,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMicromapToMemoryEXT && "Function requires " ); - VkResult result = getDispatcher()->vkCopyMicromapToMemoryEXT( static_cast( m_device ), - static_cast( deferredOperation ), - reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkCopyMicromapToMemoryEXT( static_cast( m_device ), + static_cast( deferredOperation ), + reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMicromapToMemoryEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -20307,10 +21292,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToMicromapEXT && "Function requires " ); - VkResult result = getDispatcher()->vkCopyMemoryToMicromapEXT( static_cast( m_device ), - static_cast( deferredOperation ), - reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkCopyMemoryToMicromapEXT( static_cast( m_device ), + static_cast( deferredOperation ), + reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToMicromapEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -20329,15 +21315,16 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkWriteMicromapsPropertiesEXT && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkWriteMicromapsPropertiesEXT( static_cast( m_device ), - micromaps.size(), - reinterpret_cast( micromaps.data() ), - static_cast( queryType ), - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertiesEXT" ); + std::vector data( dataSize / sizeof( DataType ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkWriteMicromapsPropertiesEXT( static_cast( m_device ), + micromaps.size(), + reinterpret_cast( micromaps.data() ), + static_cast( queryType ), + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ), + stride ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertiesEXT" ); return data; } @@ -20350,15 +21337,16 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWriteMicromapsPropertiesEXT && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkWriteMicromapsPropertiesEXT( static_cast( m_device ), - micromaps.size(), - reinterpret_cast( micromaps.data() ), - static_cast( queryType ), - sizeof( DataType ), - reinterpret_cast( &data ), - stride ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertyEXT" ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkWriteMicromapsPropertiesEXT( static_cast( m_device ), + micromaps.size(), + reinterpret_cast( micromaps.data() ), + static_cast( queryType ), + sizeof( DataType ), + reinterpret_cast( &data ), + stride ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertyEXT" ); return data; } @@ -20726,11 +21714,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetSampleMaskEXT && "Function requires or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( sampleMask.size() == ( static_cast( samples ) + 31 ) / 32 ); +# else if ( sampleMask.size() != ( static_cast( samples ) + 31 ) / 32 ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setSampleMaskEXT: sampleMask.size() != ( static_cast( samples ) + 31 ) / 32" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdSetSampleMaskEXT( static_cast( m_commandBuffer ), static_cast( samples ), @@ -21023,25 +22015,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector imageFormatProperties; uint32_t formatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceOpticalFlowImageFormatsNV( + result = static_cast( getDispatcher()->vkGetPhysicalDeviceOpticalFlowImageFormatsNV( static_cast( m_physicalDevice ), reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && formatCount ) + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && formatCount ) { imageFormatProperties.resize( formatCount ); - result = getDispatcher()->vkGetPhysicalDeviceOpticalFlowImageFormatsNV( + result = static_cast( getDispatcher()->vkGetPhysicalDeviceOpticalFlowImageFormatsNV( static_cast( m_physicalDevice ), reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, - reinterpret_cast( imageFormatProperties.data() ) ); + reinterpret_cast( imageFormatProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); VULKAN_HPP_ASSERT( formatCount <= imageFormatProperties.size() ); if ( formatCount < imageFormatProperties.size() ) { @@ -21050,11 +22042,28 @@ namespace VULKAN_HPP_NAMESPACE return imageFormatProperties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::OpticalFlowSessionNV - Device::createOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::OpticalFlowSessionNV( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateOpticalFlowSessionNV( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &session ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createOpticalFlowSessionNV" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::OpticalFlowSessionNV( *this, *reinterpret_cast( &session ), allocator ); } VULKAN_HPP_INLINE void OpticalFlowSessionNV::bindImage( VULKAN_HPP_NAMESPACE::OpticalFlowSessionBindingPointNV bindingPoint, @@ -21063,12 +22072,13 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBindOpticalFlowSessionImageNV && "Function requires " ); - VkResult result = getDispatcher()->vkBindOpticalFlowSessionImageNV( static_cast( m_device ), - static_cast( m_session ), - static_cast( bindingPoint ), - static_cast( view ), - static_cast( layout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::OpticalFlowSessionNV::bindImage" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkBindOpticalFlowSessionImageNV( static_cast( m_device ), + static_cast( m_session ), + static_cast( bindingPoint ), + static_cast( view ), + static_cast( layout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::OpticalFlowSessionNV::bindImage" ); } VULKAN_HPP_INLINE void CommandBuffer::opticalFlowExecuteNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, @@ -21176,38 +22186,79 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_shader_object === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type Device::createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::ShaderEXTs( *this, createInfos, allocator ); + std::vector shaders( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateShadersEXT( + static_cast( m_device ), + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( shaders.data() ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createShadersEXT" ); +# endif + } + + std::vector shadersRAII; + shadersRAII.reserve( shaders.size() ); + for ( auto & shader : shaders ) + { + shadersRAII.emplace_back( *this, *reinterpret_cast( &shader ), allocator ); + } + return shadersRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::ShaderEXT - Device::createShaderEXT( VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createShaderEXT( VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::ShaderEXT( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::ShaderEXT shader; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateShadersEXT( + static_cast( m_device ), + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &shader ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createShaderEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ShaderEXT( *this, *reinterpret_cast( &shader ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector ShaderEXT::getBinaryData() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderBinaryDataEXT && "Function requires " ); - std::vector data; - size_t dataSize; - VkResult result; + std::vector data; + size_t dataSize; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetShaderBinaryDataEXT( static_cast( m_device ), static_cast( m_shader ), &dataSize, nullptr ); - if ( ( result == VK_SUCCESS ) && dataSize ) + result = static_cast( + getDispatcher()->vkGetShaderBinaryDataEXT( static_cast( m_device ), static_cast( m_shader ), &dataSize, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); - result = getDispatcher()->vkGetShaderBinaryDataEXT( - static_cast( m_device ), static_cast( m_shader ), &dataSize, reinterpret_cast( data.data() ) ); + result = static_cast( getDispatcher()->vkGetShaderBinaryDataEXT( + static_cast( m_device ), static_cast( m_shader ), &dataSize, reinterpret_cast( data.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::ShaderEXT::getBinaryData" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::ShaderEXT::getBinaryData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { @@ -21220,10 +22271,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & shaders ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindShadersEXT && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( stages.size() == shaders.size() ); +# else if ( stages.size() != shaders.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindShadersEXT: stages.size() != shaders.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindShadersEXT( static_cast( m_commandBuffer ), stages.size(), @@ -21240,20 +22295,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertiesCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetFramebufferTilePropertiesQCOM( - static_cast( m_device ), static_cast( m_framebuffer ), &propertiesCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertiesCount ) + result = static_cast( getDispatcher()->vkGetFramebufferTilePropertiesQCOM( + static_cast( m_device ), static_cast( m_framebuffer ), &propertiesCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertiesCount ) { properties.resize( propertiesCount ); - result = getDispatcher()->vkGetFramebufferTilePropertiesQCOM( static_cast( m_device ), - static_cast( m_framebuffer ), - &propertiesCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkGetFramebufferTilePropertiesQCOM( static_cast( m_device ), + static_cast( m_framebuffer ), + &propertiesCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); if ( propertiesCount < properties.size() ) @@ -21283,18 +22339,18 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSetLatencySleepModeNV && "Function requires " ); - VkResult result = getDispatcher()->vkSetLatencySleepModeNV( - static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &sleepModeInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::setLatencySleepModeNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetLatencySleepModeNV( + static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &sleepModeInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::setLatencySleepModeNV" ); } VULKAN_HPP_INLINE void SwapchainKHR::latencySleepNV( const VULKAN_HPP_NAMESPACE::LatencySleepInfoNV & sleepInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkLatencySleepNV && "Function requires " ); - VkResult result = getDispatcher()->vkLatencySleepNV( - static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &sleepInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::latencySleepNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkLatencySleepNV( + static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &sleepInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::latencySleepNV" ); } VULKAN_HPP_INLINE void SwapchainKHR::setLatencyMarkerNV( const VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV & latencyMarkerInfo ) const VULKAN_HPP_NOEXCEPT @@ -21334,19 +22390,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -21376,9 +22432,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX properties; - VkResult result = getDispatcher()->vkGetScreenBufferPropertiesQNX( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetScreenBufferPropertiesQNX( + static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); return properties; } @@ -21392,9 +22448,9 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX & properties = structureChain.template get(); - VkResult result = getDispatcher()->vkGetScreenBufferPropertiesQNX( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetScreenBufferPropertiesQNX( + static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); return structureChain; } @@ -21410,19 +22466,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains; uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( - static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( + static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { @@ -21440,12 +22496,13 @@ namespace VULKAN_HPP_NAMESPACE std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = getDispatcher()->vkGetCalibratedTimestampsKHR( static_cast( m_device ), - timestampInfos.size(), - reinterpret_cast( timestampInfos.data() ), - timestamps.data(), - &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetCalibratedTimestampsKHR( static_cast( m_device ), + timestampInfos.size(), + reinterpret_cast( timestampInfos.data() ), + timestamps.data(), + &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); return data_; } @@ -21459,9 +22516,9 @@ namespace VULKAN_HPP_NAMESPACE std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = getDispatcher()->vkGetCalibratedTimestampsKHR( - static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetCalibratedTimestampsKHR( + static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampKHR" ); return data_; } diff --git a/vulkan/vulkansc.cppm b/vulkan/vulkansc.cppm index 41bec7d..20a7c1f 100644 --- a/vulkan/vulkansc.cppm +++ b/vulkan/vulkansc.cppm @@ -1757,7 +1757,7 @@ export namespace VULKAN_HPP_NAMESPACE using VULKAN_HPP_NAMESPACE::isObsoletedExtension; using VULKAN_HPP_NAMESPACE::isPromotedExtension; -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) && !defined( VULKAN_HPP_NO_EXCEPTIONS ) +#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) namespace VULKAN_HPP_RAII_NAMESPACE { //====================== diff --git a/vulkan/vulkansc.hpp b/vulkan/vulkansc.hpp index 2560c29..8799798 100644 --- a/vulkan/vulkansc.hpp +++ b/vulkan/vulkansc.hpp @@ -16,7 +16,7 @@ #include #if 17 <= VULKAN_HPP_CPP_VERSION -# include // std::string_view +# include #endif #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) @@ -6991,7 +6991,7 @@ namespace VULKAN_HPP_NAMESPACE # elif defined( __APPLE__ ) m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); # elif defined( _WIN32 ) - m_library = ::LoadLibraryA( "vulkan-1.dll" ); + m_library = ::LoadLibraryA( "vulkan-1.dll" ); # else # error unsupported platform # endif diff --git a/vulkan/vulkansc_funcs.hpp b/vulkan/vulkansc_funcs.hpp index 20a561e..db9beba 100644 --- a/vulkan/vulkansc_funcs.hpp +++ b/vulkan/vulkansc_funcs.hpp @@ -37,13 +37,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Instance instance; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &instance ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::createInstance" ); + reinterpret_cast( &instance ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::createInstance" ); - return createResultValueType( static_cast( result ), instance ); + return createResultValueType( result, instance ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -54,13 +54,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Instance instance; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &instance ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::createInstanceUnique" ); + reinterpret_cast( &instance ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::createInstanceUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( instance, ObjectDestroy( allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -102,29 +102,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDevices; uint32_t physicalDeviceCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceCount ) + result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) { physicalDevices.resize( physicalDeviceCount ); - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ); + result = static_cast( + d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); if ( physicalDeviceCount < physicalDevices.size() ) { physicalDevices.resize( physicalDeviceCount ); } - return createResultValueType( static_cast( result ), physicalDevices ); + return createResultValueType( result, physicalDevices ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d ) const { @@ -132,23 +133,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDevices( physicalDeviceAllocator ); uint32_t physicalDeviceCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceCount ) + result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) { physicalDevices.resize( physicalDeviceCount ); - result = d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ); + result = static_cast( + d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); if ( physicalDeviceCount < physicalDevices.size() ) { physicalDevices.resize( physicalDeviceCount ); } - return createResultValueType( static_cast( result ), physicalDevices ); + return createResultValueType( result, physicalDevices ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -228,16 +230,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, + static_cast( format ), + static_cast( type ), + static_cast( tiling ), + static_cast( usage ), + static_cast( flags ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); - return createResultValueType( static_cast( result ), imageFormatProperties ); + return createResultValueType( result, imageFormatProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -298,7 +301,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator, Dispatch const & d ) const { @@ -401,14 +404,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Device device; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDevice" ); + reinterpret_cast( &device ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDevice" ); - return createResultValueType( static_cast( result ), device ); + return createResultValueType( result, device ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -421,15 +424,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Device device; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDeviceUnique" ); + reinterpret_cast( &device ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDeviceUnique" ); - return createResultValueType( static_cast( result ), - UniqueHandle( device, ObjectDestroy( allocator, d ) ) ); + return createResultValueType( result, UniqueHandle( device, ObjectDestroy( allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -472,30 +474,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkEnumerateInstanceExtensionProperties( + layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, @@ -505,24 +508,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( extensionPropertiesAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkEnumerateInstanceExtensionProperties( + layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -546,30 +550,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateDeviceExtensionProperties( - m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkEnumerateDeviceExtensionProperties( + m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, @@ -579,24 +584,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( extensionPropertiesAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateDeviceExtensionProperties( - m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkEnumerateDeviceExtensionProperties( + m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -618,29 +624,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d ) { @@ -648,23 +655,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( layerPropertiesAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -701,7 +709,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d ) const { @@ -761,10 +769,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueSubmit( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkQueueSubmit( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -781,10 +790,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueWaitIdle( m_queue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueueWaitIdle( m_queue ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -801,10 +810,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkDeviceWaitIdle( m_device ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkDeviceWaitIdle( m_device ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -831,14 +840,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceMemory memory; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &memory ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemory" ); + reinterpret_cast( &memory ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemory" ); - return createResultValueType( static_cast( result ), memory ); + return createResultValueType( result, memory ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -851,14 +860,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceMemory memory; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &memory ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemoryUnique" ); + reinterpret_cast( &memory ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemoryUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( memory, ObjectFree( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -891,16 +900,16 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - void * pData; - VkResult result = d.vkMapMemory( m_device, - static_cast( memory ), - static_cast( offset ), - static_cast( size ), - static_cast( flags ), - &pData ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory" ); + void * pData; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMapMemory( m_device, + static_cast( memory ), + static_cast( offset ), + static_cast( size ), + static_cast( flags ), + &pData ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory" ); - return createResultValueType( static_cast( result ), pData ); + return createResultValueType( result, pData ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -928,10 +937,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -953,10 +963,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1001,11 +1012,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), static_cast( memoryOffset ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -1027,11 +1038,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), static_cast( memoryOffset ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -1101,15 +1112,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFence" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFence" ); - return createResultValueType( static_cast( result ), fence ); + return createResultValueType( result, fence ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1119,15 +1130,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFenceUnique" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFenceUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -1195,10 +1206,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkResetFences( m_device, fences.size(), reinterpret_cast( fences.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkResetFences( m_device, fences.size(), reinterpret_cast( fences.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1215,10 +1227,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkGetFenceStatus( m_device, static_cast( fence ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceStatus", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetFenceStatus( m_device, static_cast( fence ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return static_cast( result ); } @@ -1246,11 +1257,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkWaitForFences( m_device, fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkWaitForFences( m_device, fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } @@ -1279,14 +1289,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Semaphore semaphore; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &semaphore ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphore" ); + reinterpret_cast( &semaphore ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphore" ); - return createResultValueType( static_cast( result ), semaphore ); + return createResultValueType( result, semaphore ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1299,16 +1309,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Semaphore semaphore; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &semaphore ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreUnique" ); + reinterpret_cast( &semaphore ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( semaphore, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( semaphore, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1379,15 +1388,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Event event; - VkResult result = + VULKAN_HPP_NAMESPACE::Event event; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createEvent" ); + reinterpret_cast( &event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createEvent" ); - return createResultValueType( static_cast( result ), event ); + return createResultValueType( result, event ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1397,15 +1406,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Event event; - VkResult result = + VULKAN_HPP_NAMESPACE::Event event; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createEventUnique" ); + reinterpret_cast( &event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createEventUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( event, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -1470,10 +1479,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkGetEventStatus( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getEventStatus", - { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetEventStatus( m_device, static_cast( event ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEventStatus", { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); return static_cast( result ); } @@ -1493,10 +1501,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSetEvent( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setEvent" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetEvent( m_device, static_cast( event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setEvent" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -1513,10 +1521,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkResetEvent( m_device, static_cast( event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetEvent" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkResetEvent( m_device, static_cast( event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetEvent" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -1543,14 +1551,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::QueryPool queryPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &queryPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPool" ); + reinterpret_cast( &queryPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPool" ); - return createResultValueType( static_cast( result ), queryPool ); + return createResultValueType( result, queryPool ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1563,16 +1571,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::QueryPool queryPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &queryPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPoolUnique" ); + reinterpret_cast( &queryPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPoolUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( queryPool, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( queryPool, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -1613,15 +1620,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = d.vkGetQueryPoolResults( m_device, - static_cast( queryPool ), - firstQuery, - queryCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetQueryPoolResults( m_device, + static_cast( queryPool ), + firstQuery, + queryCount, + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ), + static_cast( stride ), + static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResults", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); @@ -1638,18 +1645,17 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - DataType data; - VkResult result = d.vkGetQueryPoolResults( m_device, - static_cast( queryPool ), - firstQuery, - queryCount, - sizeof( DataType ), - reinterpret_cast( &data ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResult", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetQueryPoolResults( m_device, + static_cast( queryPool ), + firstQuery, + queryCount, + sizeof( DataType ), + reinterpret_cast( &data ), + static_cast( stride ), + static_cast( flags ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResult", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return ResultValue( static_cast( result ), data ); } @@ -1676,14 +1682,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Buffer buffer; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &buffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBuffer" ); + reinterpret_cast( &buffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBuffer" ); - return createResultValueType( static_cast( result ), buffer ); + return createResultValueType( result, buffer ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1694,14 +1700,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Buffer buffer; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &buffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferUnique" ); + reinterpret_cast( &buffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( buffer, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -1776,14 +1782,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::BufferView view; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferView" ); + reinterpret_cast( &view ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferView" ); - return createResultValueType( static_cast( result ), view ); + return createResultValueType( result, view ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1796,14 +1802,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::BufferView view; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferViewUnique" ); + reinterpret_cast( &view ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferViewUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( view, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -1875,15 +1881,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Image image; - VkResult result = + VULKAN_HPP_NAMESPACE::Image image; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &image ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImage" ); + reinterpret_cast( &image ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImage" ); - return createResultValueType( static_cast( result ), image ); + return createResultValueType( result, image ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -1893,15 +1899,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Image image; - VkResult result = + VULKAN_HPP_NAMESPACE::Image image; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &image ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageUnique" ); + reinterpret_cast( &image ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( image, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -2006,14 +2012,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageView view; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageView" ); + reinterpret_cast( &view ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageView" ); - return createResultValueType( static_cast( result ), view ); + return createResultValueType( result, view ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2026,14 +2032,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageView view; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &view ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createImageViewUnique" ); + reinterpret_cast( &view ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageViewUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( view, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -2108,14 +2114,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCache" ); + reinterpret_cast( &pipelineCache ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCache" ); - return createResultValueType( static_cast( result ), pipelineCache ); + return createResultValueType( result, pipelineCache ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2128,16 +2134,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineCache ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCacheUnique" ); + reinterpret_cast( &pipelineCache ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCacheUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( pipelineCache, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( pipelineCache, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -2216,14 +2221,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2233,7 +2238,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -2244,14 +2249,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2268,14 +2273,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipeline", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2293,14 +2298,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; @@ -2317,7 +2322,7 @@ namespace VULKAN_HPP_NAMESPACE template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -2328,14 +2333,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); @@ -2359,14 +2364,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateGraphicsPipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelineUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2405,14 +2410,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2422,7 +2427,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -2433,14 +2438,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size(), pipelineAllocator ); - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2457,14 +2462,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipeline", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2482,14 +2487,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; @@ -2506,7 +2511,7 @@ namespace VULKAN_HPP_NAMESPACE template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -2517,14 +2522,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector pipelines( createInfos.size() ); - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( pipelines.data() ) ); - resultCheck( static_cast( result ), + reinterpret_cast( pipelines.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); @@ -2548,14 +2553,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Pipeline pipeline; - VkResult result = d.vkCreateComputePipelines( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipeline ) ); - resultCheck( static_cast( result ), + reinterpret_cast( &pipeline ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelineUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); @@ -2635,14 +2640,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayout" ); + reinterpret_cast( &pipelineLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayout" ); - return createResultValueType( static_cast( result ), pipelineLayout ); + return createResultValueType( result, pipelineLayout ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2655,16 +2660,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &pipelineLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayoutUnique" ); + reinterpret_cast( &pipelineLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayoutUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( pipelineLayout, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( pipelineLayout, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -2736,14 +2740,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Sampler sampler; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &sampler ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSampler" ); + reinterpret_cast( &sampler ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSampler" ); - return createResultValueType( static_cast( result ), sampler ); + return createResultValueType( result, sampler ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2754,14 +2758,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Sampler sampler; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &sampler ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerUnique" ); + reinterpret_cast( &sampler ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( sampler, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -2836,14 +2840,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; - VkResult result = d.vkCreateDescriptorSetLayout( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &setLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayout" ); + reinterpret_cast( &setLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayout" ); - return createResultValueType( static_cast( result ), setLayout ); + return createResultValueType( result, setLayout ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2856,16 +2860,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; - VkResult result = d.vkCreateDescriptorSetLayout( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &setLayout ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayoutUnique" ); + reinterpret_cast( &setLayout ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayoutUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( setLayout, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( setLayout, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -2943,14 +2946,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPool" ); + reinterpret_cast( &descriptorPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPool" ); - return createResultValueType( static_cast( result ), descriptorPool ); + return createResultValueType( result, descriptorPool ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -2963,16 +2966,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &descriptorPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPoolUnique" ); + reinterpret_cast( &descriptorPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPoolUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( descriptorPool, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( descriptorPool, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3017,17 +3019,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); - return createResultValueType( static_cast( result ), descriptorSets ); + return createResultValueType( result, descriptorSets ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, @@ -3036,11 +3038,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector descriptorSets( allocateInfo.descriptorSetCount, descriptorSetAllocator ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); - return createResultValueType( static_cast( result ), descriptorSets ); + return createResultValueType( result, descriptorSets ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3052,9 +3054,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); std::vector, DescriptorSetAllocator> uniqueDescriptorSets; uniqueDescriptorSets.reserve( allocateInfo.descriptorSetCount ); PoolFree deleter( *this, allocateInfo.descriptorPool, d ); @@ -3062,13 +3064,13 @@ namespace VULKAN_HPP_NAMESPACE { uniqueDescriptorSets.push_back( UniqueHandle( descriptorSet, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueDescriptorSets ) ); + return createResultValueType( result, std::move( uniqueDescriptorSets ) ); } template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, DescriptorSetAllocator>>::type Device::allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, @@ -3078,9 +3080,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VkResult result = d.vkAllocateDescriptorSets( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); std::vector, DescriptorSetAllocator> uniqueDescriptorSets( descriptorSetAllocator ); uniqueDescriptorSets.reserve( allocateInfo.descriptorSetCount ); PoolFree deleter( *this, allocateInfo.descriptorPool, d ); @@ -3088,7 +3090,7 @@ namespace VULKAN_HPP_NAMESPACE { uniqueDescriptorSets.push_back( UniqueHandle( descriptorSet, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueDescriptorSets ) ); + return createResultValueType( result, std::move( uniqueDescriptorSets ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3196,14 +3198,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &framebuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebuffer" ); + reinterpret_cast( &framebuffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebuffer" ); - return createResultValueType( static_cast( result ), framebuffer ); + return createResultValueType( result, framebuffer ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3216,16 +3218,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &framebuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebufferUnique" ); + reinterpret_cast( &framebuffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebufferUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( framebuffer, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( framebuffer, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3299,14 +3300,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass" ); - return createResultValueType( static_cast( result ), renderPass ); + return createResultValueType( result, renderPass ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3319,16 +3320,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPassUnique" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPassUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3425,14 +3425,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CommandPool commandPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &commandPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPool" ); + reinterpret_cast( &commandPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPool" ); - return createResultValueType( static_cast( result ), commandPool ); + return createResultValueType( result, commandPool ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3445,16 +3445,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::CommandPool commandPool; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &commandPool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPoolUnique" ); + reinterpret_cast( &commandPool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPoolUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( commandPool, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( commandPool, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3475,10 +3474,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetCommandPool" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetCommandPool" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -3500,17 +3500,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); - return createResultValueType( static_cast( result ), commandBuffers ); + return createResultValueType( result, commandBuffers ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, @@ -3519,11 +3519,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector commandBuffers( allocateInfo.commandBufferCount, commandBufferAllocator ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); - return createResultValueType( static_cast( result ), commandBuffers ); + return createResultValueType( result, commandBuffers ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -3535,9 +3535,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); std::vector, CommandBufferAllocator> uniqueCommandBuffers; uniqueCommandBuffers.reserve( allocateInfo.commandBufferCount ); PoolFree deleter( *this, allocateInfo.commandPool, d ); @@ -3545,13 +3545,13 @@ namespace VULKAN_HPP_NAMESPACE { uniqueCommandBuffers.push_back( UniqueHandle( commandBuffer, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueCommandBuffers ) ); + return createResultValueType( result, std::move( uniqueCommandBuffers ) ); } template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, CommandBufferAllocator>>::type Device::allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, @@ -3561,9 +3561,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector commandBuffers( allocateInfo.commandBufferCount ); - VkResult result = d.vkAllocateCommandBuffers( - m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( + m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); std::vector, CommandBufferAllocator> uniqueCommandBuffers( commandBufferAllocator ); uniqueCommandBuffers.reserve( allocateInfo.commandBufferCount ); PoolFree deleter( *this, allocateInfo.commandPool, d ); @@ -3571,7 +3571,7 @@ namespace VULKAN_HPP_NAMESPACE { uniqueCommandBuffers.push_back( UniqueHandle( commandBuffer, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueCommandBuffers ) ); + return createResultValueType( result, std::move( uniqueCommandBuffers ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3639,10 +3639,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -3659,10 +3660,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkEndCommandBuffer( m_commandBuffer ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkEndCommandBuffer( m_commandBuffer ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -3680,10 +3681,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -4596,11 +4598,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint32_t apiVersion; - VkResult result = d.vkEnumerateInstanceVersion( &apiVersion ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceVersion" ); + uint32_t apiVersion; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkEnumerateInstanceVersion( &apiVersion ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceVersion" ); - return createResultValueType( static_cast( result ), apiVersion ); + return createResultValueType( result, apiVersion ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -4620,10 +4622,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindBufferMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindBufferMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -4643,10 +4646,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkBindImageMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkBindImageMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -4718,30 +4722,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroups( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + result = static_cast( d.vkEnumeratePhysicalDeviceGroups( + m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); + return createResultValueType( result, physicalDeviceGroupProperties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroups( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const @@ -4750,25 +4754,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties( physicalDeviceGroupPropertiesAllocator ); - uint32_t physicalDeviceGroupCount; - VkResult result; + uint32_t physicalDeviceGroupCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = d.vkEnumeratePhysicalDeviceGroups( - m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + result = static_cast( d.vkEnumeratePhysicalDeviceGroups( + m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } - return createResultValueType( static_cast( result ), physicalDeviceGroupProperties ); + return createResultValueType( result, physicalDeviceGroupProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -4975,12 +4979,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, + reinterpret_cast( &imageFormatInfo ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - return createResultValueType( static_cast( result ), imageFormatProperties ); + return createResultValueType( result, imageFormatProperties ); } template @@ -4991,12 +4996,13 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, - reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, + reinterpret_cast( &imageFormatInfo ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5035,7 +5041,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d ) const { @@ -5206,14 +5212,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversion( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversion" ); + reinterpret_cast( &ycbcrConversion ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversion" ); - return createResultValueType( static_cast( result ), ycbcrConversion ); + return createResultValueType( result, ycbcrConversion ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -5226,16 +5232,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; - VkResult result = d.vkCreateSamplerYcbcrConversion( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &ycbcrConversion ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionUnique" ); + reinterpret_cast( &ycbcrConversion ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( ycbcrConversion, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( ycbcrConversion, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5479,14 +5484,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2" ); - return createResultValueType( static_cast( result ), renderPass ); + return createResultValueType( result, renderPass ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -5499,16 +5504,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::RenderPass renderPass; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &renderPass ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2Unique" ); + reinterpret_cast( &renderPass ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2Unique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( renderPass, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5602,11 +5606,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint64_t value; - VkResult result = d.vkGetSemaphoreCounterValue( m_device, static_cast( semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValue" ); + uint64_t value; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetSemaphoreCounterValue( m_device, static_cast( semaphore ), &value ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValue" ); - return createResultValueType( static_cast( result ), value ); + return createResultValueType( result, value ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5626,10 +5631,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkWaitSemaphores( m_device, reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkWaitSemaphores( m_device, reinterpret_cast( &waitInfo ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } @@ -5650,10 +5655,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSignalSemaphore( m_device, reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkSignalSemaphore( m_device, reinterpret_cast( &signalInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5742,30 +5748,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties; uint32_t toolCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } - return createResultValueType( static_cast( result ), toolProperties ); + return createResultValueType( result, toolProperties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getToolProperties( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d ) const @@ -5774,25 +5780,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties( physicalDeviceToolPropertiesAllocator ); - uint32_t toolCount; - VkResult result; + uint32_t toolCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = - d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } - return createResultValueType( static_cast( result ), toolProperties ); + return createResultValueType( result, toolProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5819,14 +5825,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlot( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlot" ); + reinterpret_cast( &privateDataSlot ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlot" ); - return createResultValueType( static_cast( result ), privateDataSlot ); + return createResultValueType( result, privateDataSlot ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -5839,16 +5845,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlot( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &privateDataSlot ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotUnique" ); + reinterpret_cast( &privateDataSlot ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( privateDataSlot, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( privateDataSlot, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5923,11 +5928,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkSetPrivateData( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkSetPrivateData( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -6068,10 +6073,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueSubmit2( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkQueueSubmit2( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6525,7 +6531,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -6612,30 +6618,30 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Bool32 & unrecordedFaults = data_.first; std::vector & faults = data_.second; uint32_t faultCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetFaultData( - m_device, static_cast( faultQueryBehavior ), reinterpret_cast( &unrecordedFaults ), &faultCount, nullptr ); - if ( ( result == VK_SUCCESS ) && faultCount ) + result = static_cast( d.vkGetFaultData( + m_device, static_cast( faultQueryBehavior ), reinterpret_cast( &unrecordedFaults ), &faultCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && faultCount ) { faults.resize( faultCount ); - result = d.vkGetFaultData( m_device, - static_cast( faultQueryBehavior ), - reinterpret_cast( &unrecordedFaults ), - &faultCount, - reinterpret_cast( faults.data() ) ); + result = static_cast( d.vkGetFaultData( m_device, + static_cast( faultQueryBehavior ), + reinterpret_cast( &unrecordedFaults ), + &faultCount, + reinterpret_cast( faults.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultData" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultData" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>>::type Device::getFaultData( VULKAN_HPP_NAMESPACE::FaultQueryBehavior faultQueryBehavior, FaultDataAllocator & faultDataAllocator, Dispatch const & d ) const @@ -6647,24 +6653,24 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Bool32 & unrecordedFaults = data_.first; std::vector & faults = data_.second; uint32_t faultCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetFaultData( - m_device, static_cast( faultQueryBehavior ), reinterpret_cast( &unrecordedFaults ), &faultCount, nullptr ); - if ( ( result == VK_SUCCESS ) && faultCount ) + result = static_cast( d.vkGetFaultData( + m_device, static_cast( faultQueryBehavior ), reinterpret_cast( &unrecordedFaults ), &faultCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && faultCount ) { faults.resize( faultCount ); - result = d.vkGetFaultData( m_device, - static_cast( faultQueryBehavior ), - reinterpret_cast( &unrecordedFaults ), - &faultCount, - reinterpret_cast( faults.data() ) ); + result = static_cast( d.vkGetFaultData( m_device, + static_cast( faultQueryBehavior ), + reinterpret_cast( &unrecordedFaults ), + &faultCount, + reinterpret_cast( faults.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultData" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultData" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6735,11 +6741,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::Bool32 supported; - VkResult result = d.vkGetPhysicalDeviceSurfaceSupportKHR( - m_physicalDevice, queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceSupportKHR( + m_physicalDevice, queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); - return createResultValueType( static_cast( result ), supported ); + return createResultValueType( result, supported ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6761,11 +6767,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( - m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( + m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); - return createResultValueType( static_cast( result ), surfaceCapabilities ); + return createResultValueType( result, surfaceCapabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6789,30 +6795,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( - m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( + m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } - return createResultValueType( static_cast( result ), surfaceFormats ); + return createResultValueType( result, surfaceFormats ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator, @@ -6822,24 +6829,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats( surfaceFormatKHRAllocator ); uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormatsKHR( - m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( + m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } - return createResultValueType( static_cast( result ), surfaceFormats ); + return createResultValueType( result, surfaceFormats ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6863,30 +6871,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes; uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( + d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( - m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( + m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } - return createResultValueType( static_cast( result ), presentModes ); + return createResultValueType( result, presentModes ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, PresentModeKHRAllocator & presentModeKHRAllocator, @@ -6896,24 +6905,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes( presentModeKHRAllocator ); uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( + d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = d.vkGetPhysicalDeviceSurfacePresentModesKHR( - m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( + m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } - return createResultValueType( static_cast( result ), presentModes ); + return createResultValueType( result, presentModes ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6942,14 +6952,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHR" ); + reinterpret_cast( &swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHR" ); - return createResultValueType( static_cast( result ), swapchain ); + return createResultValueType( result, swapchain ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -6962,16 +6972,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHRUnique" ); + reinterpret_cast( &swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6996,27 +7005,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector swapchainImages; uint32_t swapchainImageCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) + result = static_cast( + d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); - result = d.vkGetSwapchainImagesKHR( - m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ); + result = static_cast( d.vkGetSwapchainImagesKHR( + m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { swapchainImages.resize( swapchainImageCount ); } - return createResultValueType( static_cast( result ), swapchainImages ); + return createResultValueType( result, swapchainImages ); } - template ::value, int>::type> + template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, ImageAllocator & imageAllocator, Dispatch const & d ) const { @@ -7024,24 +7037,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector swapchainImages( imageAllocator ); uint32_t swapchainImageCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) + result = static_cast( + d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); - result = d.vkGetSwapchainImagesKHR( - m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ); + result = static_cast( d.vkGetSwapchainImagesKHR( + m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { swapchainImages.resize( swapchainImageCount ); } - return createResultValueType( static_cast( result ), swapchainImages ); + return createResultValueType( result, swapchainImages ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7068,10 +7082,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint32_t imageIndex; - VkResult result = d.vkAcquireNextImageKHR( - m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ); - resultCheck( static_cast( result ), + uint32_t imageIndex; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireNextImageKHR( + m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImageKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, @@ -7097,10 +7111,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } @@ -7123,11 +7137,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; - VkResult result = - d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); - return createResultValueType( static_cast( result ), deviceGroupPresentCapabilities ); + return createResultValueType( result, deviceGroupPresentCapabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7149,11 +7163,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = d.vkGetDeviceGroupSurfacePresentModesKHR( - m_device, static_cast( surface ), reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceGroupSurfacePresentModesKHR( + m_device, static_cast( surface ), reinterpret_cast( &modes ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); - return createResultValueType( static_cast( result ), modes ); + return createResultValueType( result, modes ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7177,27 +7191,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector rects; uint32_t rectCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) + result = static_cast( + d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); - result = d.vkGetPhysicalDevicePresentRectanglesKHR( - m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); + result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( + m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { rects.resize( rectCount ); } - return createResultValueType( static_cast( result ), rects ); + return createResultValueType( result, rects ); } - template ::value, int>::type> + template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Rect2DAllocator & rect2DAllocator, Dispatch const & d ) const { @@ -7205,24 +7223,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector rects( rect2DAllocator ); uint32_t rectCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) + result = static_cast( + d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); - result = d.vkGetPhysicalDevicePresentRectanglesKHR( - m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); + result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( + m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { rects.resize( rectCount ); } - return createResultValueType( static_cast( result ), rects ); + return createResultValueType( result, rects ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7242,9 +7261,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint32_t imageIndex; - VkResult result = d.vkAcquireNextImage2KHR( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ); - resultCheck( static_cast( result ), + uint32_t imageIndex; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkAcquireNextImage2KHR( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, @@ -7276,29 +7296,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator, Dispatch const & d ) const { @@ -7306,23 +7327,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayPropertiesKHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7346,30 +7368,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlanePropertiesKHR( DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, Dispatch const & d ) const @@ -7378,24 +7400,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayPlanePropertiesKHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7419,29 +7441,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector displays; uint32_t displayCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ); - if ( ( result == VK_SUCCESS ) && displayCount ) + result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) { displays.resize( displayCount ); - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ); + result = static_cast( + d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); VULKAN_HPP_ASSERT( displayCount <= displays.size() ); if ( displayCount < displays.size() ) { displays.resize( displayCount ); } - return createResultValueType( static_cast( result ), displays ); + return createResultValueType( result, displays ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, DisplayKHRAllocator & displayKHRAllocator, Dispatch const & d ) const { @@ -7449,23 +7472,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector displays( displayKHRAllocator ); uint32_t displayCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ); - if ( ( result == VK_SUCCESS ) && displayCount ) + result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) { displays.resize( displayCount ); - result = d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ); + result = static_cast( + d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); VULKAN_HPP_ASSERT( displayCount <= displays.size() ); if ( displayCount < displays.size() ) { displays.resize( displayCount ); } - return createResultValueType( static_cast( result ), displays ); + return createResultValueType( result, displays ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7490,30 +7514,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetDisplayModePropertiesKHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetDisplayModePropertiesKHR( + m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, @@ -7524,24 +7549,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayModePropertiesKHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetDisplayModePropertiesKHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetDisplayModePropertiesKHR( + m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7571,15 +7597,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &mode ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHR" ); + reinterpret_cast( &mode ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHR" ); - return createResultValueType( static_cast( result ), mode ); + return createResultValueType( result, mode ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -7593,17 +7619,16 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &mode ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHRUnique" ); + reinterpret_cast( &mode ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( mode, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( mode, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7628,11 +7653,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; - VkResult result = d.vkGetDisplayPlaneCapabilitiesKHR( - m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDisplayPlaneCapabilitiesKHR( + m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); - return createResultValueType( static_cast( result ), capabilities ); + return createResultValueType( result, capabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7659,14 +7684,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDisplayPlaneSurfaceKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHR" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHR" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -7679,16 +7704,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateDisplayPlaneSurfaceKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHRUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7720,21 +7744,21 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); + reinterpret_cast( swapchains.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); - return createResultValueType( static_cast( result ), swapchains ); + return createResultValueType( result, swapchains ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -7744,15 +7768,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector swapchains( createInfos.size(), swapchainKHRAllocator ); - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); + reinterpret_cast( swapchains.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); - return createResultValueType( static_cast( result ), swapchains ); + return createResultValueType( result, swapchains ); } template @@ -7764,15 +7788,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHR" ); + reinterpret_cast( &swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHR" ); - return createResultValueType( static_cast( result ), swapchain ); + return createResultValueType( result, swapchain ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -7786,13 +7810,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); + reinterpret_cast( swapchains.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); std::vector, SwapchainKHRAllocator> uniqueSwapchains; uniqueSwapchains.reserve( createInfos.size() ); ObjectDestroy deleter( *this, allocator, d ); @@ -7800,13 +7824,13 @@ namespace VULKAN_HPP_NAMESPACE { uniqueSwapchains.push_back( UniqueHandle( swapchain, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueSwapchains ) ); + return createResultValueType( result, std::move( uniqueSwapchains ) ); } template >::value, int>::type> + typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, SwapchainKHRAllocator>>::type Device::createSharedSwapchainsKHRUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -7817,13 +7841,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); std::vector swapchains( createInfos.size() ); - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( swapchains.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); + reinterpret_cast( swapchains.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); std::vector, SwapchainKHRAllocator> uniqueSwapchains( swapchainKHRAllocator ); uniqueSwapchains.reserve( createInfos.size() ); ObjectDestroy deleter( *this, allocator, d ); @@ -7831,7 +7855,7 @@ namespace VULKAN_HPP_NAMESPACE { uniqueSwapchains.push_back( UniqueHandle( swapchain, deleter ) ); } - return createResultValueType( static_cast( result ), std::move( uniqueSwapchains ) ); + return createResultValueType( result, std::move( uniqueSwapchains ) ); } template @@ -7843,17 +7867,16 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; - VkResult result = d.vkCreateSharedSwapchainsKHR( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &swapchain ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHRUnique" ); + reinterpret_cast( &swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHRUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( swapchain, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7876,11 +7899,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - int fd; - VkResult result = d.vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); - return createResultValueType( static_cast( result ), fd ); + return createResultValueType( result, fd ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7903,11 +7927,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; - VkResult result = d.vkGetMemoryFdPropertiesKHR( - m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryFdPropertiesKHR( + m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); - return createResultValueType( static_cast( result ), memoryFdProperties ); + return createResultValueType( result, memoryFdProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7928,10 +7952,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7951,11 +7976,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - int fd; - VkResult result = d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); - return createResultValueType( static_cast( result ), fd ); + return createResultValueType( result, fd ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7999,11 +8025,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( - m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( + m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); - return createResultValueType( static_cast( result ), surfaceCapabilities ); + return createResultValueType( result, surfaceCapabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8027,11 +8053,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8057,15 +8083,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDeviceEventEXT( + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXT" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXT" ); - return createResultValueType( static_cast( result ), fence ); + return createResultValueType( result, fence ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8077,15 +8103,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDeviceEventEXT( + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXTUnique" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXTUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -8116,16 +8142,16 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDisplayEventEXT( + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXT" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXT" ); - return createResultValueType( static_cast( result ), fence ); + return createResultValueType( result, fence ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -8138,16 +8164,16 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VULKAN_HPP_NAMESPACE::Fence fence; - VkResult result = d.vkRegisterDisplayEventEXT( + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXTUnique" ); + reinterpret_cast( &fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXTUnique" ); - return createResultValueType( static_cast( result ), + return createResultValueType( result, UniqueHandle( fence, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ @@ -8171,12 +8197,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - uint64_t counterValue; - VkResult result = - d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainCounterEXT" ); + uint64_t counterValue; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainCounterEXT" ); - return createResultValueType( static_cast( result ), counterValue ); + return createResultValueType( result, counterValue ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8274,8 +8300,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainStatusKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); @@ -8300,10 +8327,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8323,11 +8351,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - int fd; - VkResult result = d.vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); - return createResultValueType( static_cast( result ), fd ); + return createResultValueType( result, fd ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8365,31 +8394,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) + result = static_cast( + d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + result = static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); + reinterpret_cast( counterDescriptions.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); } - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template ::value && - std::is_same::value, + typename std::enable_if::value && + std::is_same::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, @@ -8417,31 +8446,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) + result = static_cast( + d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); - result = d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + result = static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); + reinterpret_cast( counterDescriptions.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); } - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8486,10 +8515,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8522,12 +8552,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - return createResultValueType( static_cast( result ), surfaceCapabilities ); + return createResultValueType( result, surfaceCapabilities ); } template @@ -8538,12 +8569,13 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities = structureChain.template get(); - VkResult result = d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8569,33 +8601,34 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } - return createResultValueType( static_cast( result ), surfaceFormats ); + return createResultValueType( result, surfaceFormats ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator, @@ -8605,27 +8638,28 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats( surfaceFormat2KHRAllocator ); uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } - return createResultValueType( static_cast( result ), surfaceFormats ); + return createResultValueType( result, surfaceFormats ); } template @@ -8637,12 +8671,12 @@ namespace VULKAN_HPP_NAMESPACE std::vector structureChains; std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); @@ -8650,13 +8684,14 @@ namespace VULKAN_HPP_NAMESPACE { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -8666,7 +8701,7 @@ namespace VULKAN_HPP_NAMESPACE { structureChains[i].template get() = surfaceFormats[i]; } - return createResultValueType( static_cast( result ), structureChains ); + return createResultValueType( result, structureChains ); } template structureChains( structureChainAllocator ); std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( - m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( + m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); @@ -8697,13 +8732,14 @@ namespace VULKAN_HPP_NAMESPACE { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } - result = d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -8713,7 +8749,7 @@ namespace VULKAN_HPP_NAMESPACE { structureChains[i].template get() = surfaceFormats[i]; } - return createResultValueType( static_cast( result ), structureChains ); + return createResultValueType( result, structureChains ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8739,30 +8775,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = - d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator, Dispatch const & d ) const @@ -8771,24 +8807,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayProperties2KHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = - d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8812,30 +8848,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneProperties2KHR( DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, Dispatch const & d ) const @@ -8844,24 +8880,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayPlaneProperties2KHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8886,30 +8922,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetDisplayModeProperties2KHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetDisplayModeProperties2KHR( + m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, @@ -8920,24 +8957,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties( displayModeProperties2KHRAllocator ); uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = d.vkGetDisplayModeProperties2KHR( - m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( d.vkGetDisplayModeProperties2KHR( + m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8961,12 +8999,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; - VkResult result = d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, - reinterpret_cast( &displayPlaneInfo ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, + reinterpret_cast( &displayPlaneInfo ), + reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); - return createResultValueType( static_cast( result ), capabilities ); + return createResultValueType( result, capabilities ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -8987,10 +9026,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9009,10 +9049,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9130,14 +9171,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; - VkResult result = d.vkCreateDebugUtilsMessengerEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &messenger ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXT" ); + reinterpret_cast( &messenger ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXT" ); - return createResultValueType( static_cast( result ), messenger ); + return createResultValueType( result, messenger ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -9150,16 +9191,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; - VkResult result = d.vkCreateDebugUtilsMessengerEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &messenger ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXTUnique" ); + reinterpret_cast( &messenger ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( messenger, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( messenger, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9308,11 +9348,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; - VkResult result = d.vkGetImageDrmFormatModifierPropertiesEXT( - m_device, static_cast( image ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getImageDrmFormatModifierPropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetImageDrmFormatModifierPropertiesEXT( + m_device, static_cast( image ), reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageDrmFormatModifierPropertiesEXT" ); - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9342,13 +9382,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; - VkResult result = d.vkGetMemoryHostPointerPropertiesEXT( m_device, - static_cast( handleType ), - pHostPointer, - reinterpret_cast( &memoryHostPointerProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemoryHostPointerPropertiesEXT( m_device, + static_cast( handleType ), + pHostPointer, + reinterpret_cast( &memoryHostPointerProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); - return createResultValueType( static_cast( result ), memoryHostPointerProperties ); + return createResultValueType( result, memoryHostPointerProperties ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9373,30 +9414,30 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains; uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = - d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } - return createResultValueType( static_cast( result ), timeDomains ); + return createResultValueType( result, timeDomains ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCalibrateableTimeDomainsEXT( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d ) const { @@ -9404,24 +9445,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains( timeDomainKHRAllocator ); uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = - d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( + d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } - return createResultValueType( static_cast( result ), timeDomains ); + return createResultValueType( result, timeDomains ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9449,11 +9490,11 @@ namespace VULKAN_HPP_NAMESPACE std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = d.vkGetCalibratedTimestampsEXT( - m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsEXT( + m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = d.vkGetCalibratedTimestampsEXT( - m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsEXT( + m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } template @@ -9487,11 +9528,11 @@ namespace VULKAN_HPP_NAMESPACE std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = - d.vkGetCalibratedTimestampsEXT( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetCalibratedTimestampsEXT( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); - return createResultValueType( static_cast( result ), data_ ); + return createResultValueType( result, data_ ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9518,30 +9559,31 @@ namespace VULKAN_HPP_NAMESPACE std::vector fragmentShadingRates; uint32_t fragmentShadingRateCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) + result = + static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( - m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( + m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { fragmentShadingRates.resize( fragmentShadingRateCount ); } - return createResultValueType( static_cast( result ), fragmentShadingRates ); + return createResultValueType( result, fragmentShadingRates ); } template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getFragmentShadingRatesKHR( PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator, @@ -9551,25 +9593,26 @@ namespace VULKAN_HPP_NAMESPACE std::vector fragmentShadingRates( physicalDeviceFragmentShadingRateKHRAllocator ); - uint32_t fragmentShadingRateCount; - VkResult result; + uint32_t fragmentShadingRateCount; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) + result = + static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); - result = d.vkGetPhysicalDeviceFragmentShadingRatesKHR( - m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( + m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { fragmentShadingRates.resize( fragmentShadingRateCount ); } - return createResultValueType( static_cast( result ), fragmentShadingRates ); + return createResultValueType( result, fragmentShadingRates ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9621,14 +9664,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateHeadlessSurfaceEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXT" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXT" ); - return createResultValueType( static_cast( result ), surface ); + return createResultValueType( result, surface ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -9641,16 +9684,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SurfaceKHR surface; - VkResult result = d.vkCreateHeadlessSurfaceEXT( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &surface ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXTUnique" ); + reinterpret_cast( &surface ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXTUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( surface, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -9879,17 +9921,18 @@ namespace VULKAN_HPP_NAMESPACE std::vector refreshableObjectTypes; uint32_t refreshableObjectTypeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceRefreshableObjectTypesKHR( m_physicalDevice, &refreshableObjectTypeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && refreshableObjectTypeCount ) + result = + static_cast( d.vkGetPhysicalDeviceRefreshableObjectTypesKHR( m_physicalDevice, &refreshableObjectTypeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && refreshableObjectTypeCount ) { refreshableObjectTypes.resize( refreshableObjectTypeCount ); - result = d.vkGetPhysicalDeviceRefreshableObjectTypesKHR( - m_physicalDevice, &refreshableObjectTypeCount, reinterpret_cast( refreshableObjectTypes.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceRefreshableObjectTypesKHR( + m_physicalDevice, &refreshableObjectTypeCount, reinterpret_cast( refreshableObjectTypes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( refreshableObjectTypeCount <= refreshableObjectTypes.size() ); if ( refreshableObjectTypeCount < refreshableObjectTypes.size() ) @@ -9902,7 +9945,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getRefreshableObjectTypesKHR( ObjectTypeAllocator & objectTypeAllocator, Dispatch const & d ) const { @@ -9910,17 +9953,18 @@ namespace VULKAN_HPP_NAMESPACE std::vector refreshableObjectTypes( objectTypeAllocator ); uint32_t refreshableObjectTypeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = d.vkGetPhysicalDeviceRefreshableObjectTypesKHR( m_physicalDevice, &refreshableObjectTypeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && refreshableObjectTypeCount ) + result = + static_cast( d.vkGetPhysicalDeviceRefreshableObjectTypesKHR( m_physicalDevice, &refreshableObjectTypeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && refreshableObjectTypeCount ) { refreshableObjectTypes.resize( refreshableObjectTypeCount ); - result = d.vkGetPhysicalDeviceRefreshableObjectTypesKHR( - m_physicalDevice, &refreshableObjectTypeCount, reinterpret_cast( refreshableObjectTypes.data() ) ); + result = static_cast( d.vkGetPhysicalDeviceRefreshableObjectTypesKHR( + m_physicalDevice, &refreshableObjectTypeCount, reinterpret_cast( refreshableObjectTypes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( refreshableObjectTypeCount <= refreshableObjectTypes.size() ); if ( refreshableObjectTypeCount < refreshableObjectTypes.size() ) @@ -10044,10 +10088,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkQueueSubmit2KHR( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkQueueSubmit2KHR( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10096,7 +10141,7 @@ namespace VULKAN_HPP_NAMESPACE template ::value, int>::type> + typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d ) const { @@ -10286,11 +10331,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - HandleType handle; - VkResult result = d.vkGetFenceSciSyncFenceNV( m_device, reinterpret_cast( &getSciSyncHandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceSciSyncFenceNV" ); + HandleType handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetFenceSciSyncFenceNV( m_device, reinterpret_cast( &getSciSyncHandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceSciSyncFenceNV" ); - return createResultValueType( static_cast( result ), handle ); + return createResultValueType( result, handle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10310,11 +10356,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - HandleType handle; - VkResult result = d.vkGetFenceSciSyncObjNV( m_device, reinterpret_cast( &getSciSyncHandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceSciSyncObjNV" ); + HandleType handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetFenceSciSyncObjNV( m_device, reinterpret_cast( &getSciSyncHandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceSciSyncObjNV" ); - return createResultValueType( static_cast( result ), handle ); + return createResultValueType( result, handle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10333,10 +10380,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportFenceSciSyncFenceNV( m_device, reinterpret_cast( &importFenceSciSyncInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceSciSyncFenceNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkImportFenceSciSyncFenceNV( m_device, reinterpret_cast( &importFenceSciSyncInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceSciSyncFenceNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10355,10 +10403,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportFenceSciSyncObjNV( m_device, reinterpret_cast( &importFenceSciSyncInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceSciSyncObjNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkImportFenceSciSyncObjNV( m_device, reinterpret_cast( &importFenceSciSyncInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceSciSyncObjNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10378,11 +10427,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = - d.vkGetPhysicalDeviceSciSyncAttributesNV( m_physicalDevice, reinterpret_cast( &sciSyncAttributesInfo ), pAttributes ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSciSyncAttributesNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSciSyncAttributesNV( + m_physicalDevice, reinterpret_cast( &sciSyncAttributesInfo ), pAttributes ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSciSyncAttributesNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10402,11 +10451,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - HandleType handle; - VkResult result = d.vkGetSemaphoreSciSyncObjNV( m_device, reinterpret_cast( &getSciSyncInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreSciSyncObjNV" ); + HandleType handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetSemaphoreSciSyncObjNV( m_device, reinterpret_cast( &getSciSyncInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreSciSyncObjNV" ); - return createResultValueType( static_cast( result ), handle ); + return createResultValueType( result, handle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10426,10 +10476,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkImportSemaphoreSciSyncObjNV( m_device, reinterpret_cast( &importSemaphoreSciSyncInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreSciSyncObjNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkImportSemaphoreSciSyncObjNV( m_device, reinterpret_cast( &importSemaphoreSciSyncInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreSciSyncObjNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_SCI*/ @@ -10453,11 +10504,12 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - NvSciBufObj handle; - VkResult result = d.vkGetMemorySciBufNV( m_device, reinterpret_cast( &getSciBufInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemorySciBufNV" ); + NvSciBufObj handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetMemorySciBufNV( m_device, reinterpret_cast( &getSciBufInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemorySciBufNV" ); - return createResultValueType( static_cast( result ), handle ); + return createResultValueType( result, handle ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10486,13 +10538,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::MemorySciBufPropertiesNV memorySciBufProperties; - VkResult result = d.vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV( m_physicalDevice, - static_cast( handleType ), - handle, - reinterpret_cast( &memorySciBufProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalMemorySciBufPropertiesNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV( m_physicalDevice, + static_cast( handleType ), + handle, + reinterpret_cast( &memorySciBufProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalMemorySciBufPropertiesNV" ); - return createResultValueType( static_cast( result ), memorySciBufProperties ); + return createResultValueType( result, memorySciBufProperties ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10511,10 +10564,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); - VkResult result = d.vkGetPhysicalDeviceSciBufAttributesNV( m_physicalDevice, pAttributes ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSciBufAttributesNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSciBufAttributesNV( m_physicalDevice, pAttributes ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSciBufAttributesNV" ); - return createResultValueType( static_cast( result ) ); + return createResultValueType( result ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_SCI*/ @@ -10607,14 +10660,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SemaphoreSciSyncPoolNV semaphorePool; - VkResult result = d.vkCreateSemaphoreSciSyncPoolNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSemaphoreSciSyncPoolNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &semaphorePool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreSciSyncPoolNV" ); + reinterpret_cast( &semaphorePool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreSciSyncPoolNV" ); - return createResultValueType( static_cast( result ), semaphorePool ); + return createResultValueType( result, semaphorePool ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE @@ -10627,16 +10680,15 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::SemaphoreSciSyncPoolNV semaphorePool; - VkResult result = d.vkCreateSemaphoreSciSyncPoolNV( + VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSemaphoreSciSyncPoolNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &semaphorePool ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreSciSyncPoolNVUnique" ); + reinterpret_cast( &semaphorePool ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreSciSyncPoolNVUnique" ); return createResultValueType( - static_cast( result ), - UniqueHandle( semaphorePool, ObjectDestroy( *this, allocator, d ) ) ); + result, UniqueHandle( semaphorePool, ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -10662,10 +10714,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX properties; - VkResult result = d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); - return createResultValueType( static_cast( result ), properties ); + return createResultValueType( result, properties ); } template @@ -10676,10 +10729,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX & properties = structureChain.template get(); - VkResult result = d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); - return createResultValueType( static_cast( result ), structureChain ); + return createResultValueType( result, structureChain ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ diff --git a/vulkan/vulkansc_handles.hpp b/vulkan/vulkansc_handles.hpp index 325a119..cf78312 100644 --- a/vulkan/vulkansc_handles.hpp +++ b/vulkan/vulkansc_handles.hpp @@ -4557,7 +4557,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = CheckpointData2NVAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -5279,10 +5279,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B0 = PipelineAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -5306,7 +5306,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -5336,10 +5336,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B0 = PipelineAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B0 = PipelineAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -5363,7 +5363,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = PipelineAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, @@ -5571,7 +5571,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B0 = DescriptorSetAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, @@ -5585,7 +5585,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = DescriptorSetAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, DescriptorSetAllocator>>::type allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, @@ -5769,7 +5769,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B0 = CommandBufferAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, @@ -5783,7 +5783,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = CommandBufferAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, CommandBufferAllocator>>::type allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, @@ -6154,7 +6154,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SparseImageMemoryRequirements2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, @@ -6187,10 +6187,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD typename ResultValueType>>::type getFaultData( VULKAN_HPP_NAMESPACE::FaultQueryBehavior faultQueryBehavior, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B2 = FaultDataAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B2 = FaultDataAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>>::type getFaultData( VULKAN_HPP_NAMESPACE::FaultQueryBehavior faultQueryBehavior, @@ -6229,10 +6229,10 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = ImageAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B1 = ImageAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, ImageAllocator & imageAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -6299,7 +6299,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B0 = SwapchainKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -6320,7 +6320,7 @@ namespace VULKAN_HPP_NAMESPACE template >, typename B0 = SwapchainKHRAllocator, - typename std::enable_if>::value, int>::type = 0> + typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, SwapchainKHRAllocator>>::type createSharedSwapchainsKHRUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, @@ -6941,7 +6941,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = QueueFamilyPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -6990,7 +6990,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = ExtensionPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, @@ -7008,7 +7008,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = LayerPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7079,7 +7079,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = QueueFamilyProperties2Allocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -7156,7 +7156,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceToolPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getToolProperties( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -7199,7 +7199,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SurfaceFormatKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator, @@ -7219,7 +7219,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PresentModeKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, PresentModeKHRAllocator & presentModeKHRAllocator, @@ -7237,10 +7237,10 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = Rect2DAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B1 = Rect2DAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Rect2DAllocator & rect2DAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7259,7 +7259,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayPropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -7277,7 +7277,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayPlanePropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlanePropertiesKHR( DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -7292,10 +7292,10 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = DisplayKHRAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B1 = DisplayKHRAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, DisplayKHRAllocator & displayKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7313,7 +7313,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayModePropertiesKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, DisplayModePropertiesKHRAllocator & displayModePropertiesKHRAllocator, @@ -7398,8 +7398,8 @@ namespace VULKAN_HPP_NAMESPACE typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PerformanceCounterKHRAllocator, typename B2 = PerformanceCounterDescriptionKHRAllocator, - typename std::enable_if::value && - std::is_same::value, + typename std::enable_if::value && + std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, @@ -7452,7 +7452,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = SurfaceFormat2KHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator, @@ -7488,7 +7488,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -7506,7 +7506,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayPlaneProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneProperties2KHR( DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; @@ -7525,7 +7525,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = DisplayModeProperties2KHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, DisplayModeProperties2KHRAllocator & displayModeProperties2KHRAllocator, @@ -7569,7 +7569,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = TimeDomainKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibrateableTimeDomainsEXT( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7589,7 +7589,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceFragmentShadingRateKHRAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getFragmentShadingRatesKHR( PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator, @@ -7606,10 +7606,10 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE> VULKAN_HPP_NODISCARD typename ResultValueType>::type getRefreshableObjectTypesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; - template , - typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, - typename B1 = ObjectTypeAllocator, - typename std::enable_if::value, int>::type = 0> + template , + typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, + typename B1 = ObjectTypeAllocator, + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getRefreshableObjectTypesKHR( ObjectTypeAllocator & objectTypeAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7763,7 +7763,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ @@ -7790,7 +7790,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = PhysicalDeviceGroupPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDeviceGroups( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, @@ -7995,7 +7995,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = ExtensionPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, @@ -8013,7 +8013,7 @@ namespace VULKAN_HPP_NAMESPACE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename B1 = LayerPropertiesAllocator, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ diff --git a/vulkan/vulkansc_hpp_macros.hpp b/vulkan/vulkansc_hpp_macros.hpp index 2902249..274f5a1 100644 --- a/vulkan/vulkansc_hpp_macros.hpp +++ b/vulkan/vulkansc_hpp_macros.hpp @@ -277,4 +277,21 @@ namespace VULKAN_HPP_NAMESPACE # define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER #endif +#if !defined( VULKAN_HPP_EXPECTED ) && ( 23 <= VULKAN_HPP_CPP_VERSION ) && defined( __cpp_lib_expected ) +# include +# define VULKAN_HPP_EXPECTED std::expected +# define VULKAN_HPP_UNEXPECTED std::unexpected +#endif + +#if !defined( VULKAN_HPP_RAII_NAMESPACE ) +# define VULKAN_HPP_RAII_NAMESPACE raii +#endif + +#if defined( VULKAN_HPP_NO_EXCEPTIONS ) && defined( VULKAN_HPP_EXPECTED ) +# define VULKAN_HPP_RAII_NO_EXCEPTIONS +# define VULKAN_HPP_RAII_CREATE_NOEXCEPT noexcept +#else +# define VULKAN_HPP_RAII_CREATE_NOEXCEPT +#endif + #endif \ No newline at end of file diff --git a/vulkan/vulkansc_raii.hpp b/vulkan/vulkansc_raii.hpp index e596157..ef647f7 100644 --- a/vulkan/vulkansc_raii.hpp +++ b/vulkan/vulkansc_raii.hpp @@ -8,15 +8,10 @@ #ifndef VULKAN_RAII_HPP #define VULKAN_RAII_HPP -#include #include // std::exchange, std::forward #include -#if !defined( VULKAN_HPP_RAII_NAMESPACE ) -# define VULKAN_HPP_RAII_NAMESPACE raii -#endif - -#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) && !defined( VULKAN_HPP_NO_EXCEPTIONS ) +#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) namespace VULKAN_HPP_NAMESPACE { namespace VULKAN_HPP_RAII_NAMESPACE @@ -33,6 +28,17 @@ namespace VULKAN_HPP_NAMESPACE # endif } + template + class CreateReturnType + { + public: +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + using Type = VULKAN_HPP_EXPECTED; +# else + using Type = T; +# endif + }; + class ContextDispatcher : public DispatchLoaderBase { public: @@ -1164,9 +1170,10 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_0 === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Instance + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector enumerateInstanceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; @@ -1195,22 +1202,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eInstance; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_allocator( static_cast( allocator ) ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( context.getDispatcher()->vkCreateInstance( reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_instance ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateInstance" ); - } - m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher( context.getDispatcher()->vkGetInstanceProcAddr, - static_cast( m_instance ) ) ); + *this = context.createInstance( createInfo, allocator ); } +# endif Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, VkInstance instance, @@ -1289,7 +1288,9 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_0 === - VULKAN_HPP_NODISCARD std::vector enumeratePhysicalDevices() const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + enumeratePhysicalDevices() const; VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; @@ -1299,15 +1300,18 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_display === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_EXT_debug_utils === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT - createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, @@ -1315,9 +1319,10 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_headless_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; @@ -1423,9 +1428,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties getMemoryProperties() const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Device + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector enumerateDeviceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; @@ -1502,7 +1508,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD std::vector getDisplayPlanePropertiesKHR() const; - VULKAN_HPP_NODISCARD std::vector getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const; //=== VK_EXT_display_surface_counter === @@ -1581,37 +1589,12 @@ namespace VULKAN_HPP_NAMESPACE class PhysicalDevices : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PhysicalDevices( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * dispatcher = instance.getDispatcher(); - std::vector physicalDevices; - uint32_t physicalDeviceCount; - VULKAN_HPP_NAMESPACE::Result result; - do - { - result = static_cast( - dispatcher->vkEnumeratePhysicalDevices( static_cast( *instance ), &physicalDeviceCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) - { - physicalDevices.resize( physicalDeviceCount ); - result = static_cast( - dispatcher->vkEnumeratePhysicalDevices( static_cast( *instance ), &physicalDeviceCount, physicalDevices.data() ) ); - } - } 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 ) - { - this->emplace_back( instance, physicalDevice ); - } - } - else - { - detail::throwResultException( result, "vkEnumeratePhysicalDevices" ); - } + *this = instance.enumeratePhysicalDevices(); } +# endif PhysicalDevices( std::nullptr_t ) {} @@ -1620,6 +1603,12 @@ namespace VULKAN_HPP_NAMESPACE PhysicalDevices( PhysicalDevices && rhs ) = default; PhysicalDevices & operator=( PhysicalDevices const & ) = delete; PhysicalDevices & operator=( PhysicalDevices && rhs ) = default; + + private: + PhysicalDevices( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class Device @@ -1633,23 +1622,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDevice; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_allocator( static_cast( allocator ) ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - physicalDevice.getDispatcher()->vkCreateDevice( static_cast( *physicalDevice ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_device ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDevice" ); - } - m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher( physicalDevice.getDispatcher()->vkGetDeviceProcAddr, - static_cast( m_device ) ) ); + *this = physicalDevice.createDevice( createInfo, allocator ); } +# endif Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VkDevice device, @@ -1730,21 +1710,25 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void waitIdle() const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DeviceMemory - allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void flushMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges ) const; void invalidateMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void resetFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences ) const; @@ -1752,75 +1736,96 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Semaphore + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Event + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::QueryPool + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Buffer + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::BufferView + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Image + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::ImageView + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PipelineCache - createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PipelineLayout - createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Sampler + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout - createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DescriptorPool - createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD std::vector - allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const; void updateDescriptorSets( VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorCopies ) const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Framebuffer + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::RenderPass + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::CommandPool + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD std::vector - allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const; //=== VK_VERSION_1_1 === @@ -1845,11 +1850,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Queue getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const; + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; @@ -1860,9 +1868,10 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_2 === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::RenderPass + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const; @@ -1878,9 +1887,11 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_3 === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; void setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, @@ -1915,9 +1926,11 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_swapchain === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR getGroupPresentCapabilitiesKHR() const; @@ -1929,13 +1942,16 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_display_swapchain === - VULKAN_HPP_NODISCARD std::vector - createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_external_memory_fd === @@ -1954,14 +1970,16 @@ namespace VULKAN_HPP_NAMESPACE void displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Fence + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_EXT_hdr_metadata === @@ -2027,9 +2045,11 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_SCI ) //=== VK_NV_external_sci_sync2 === - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::SemaphoreSciSyncPoolNV - createSemaphoreSciSyncPoolNV( VULKAN_HPP_NAMESPACE::SemaphoreSciSyncPoolCreateInfoNV const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createSemaphoreSciSyncPoolNV( VULKAN_HPP_NAMESPACE::SemaphoreSciSyncPoolCreateInfoNV const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_SCI*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) @@ -2058,23 +2078,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBuffer; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateBuffer( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_buffer ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateBuffer" ); - } + *this = device.createBuffer( createInfo, allocator ); } +# endif Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBuffer buffer, @@ -2187,23 +2198,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferView; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateBufferView( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_bufferView ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateBufferView" ); - } + *this = device.createBufferView( createInfo, allocator ); } +# endif BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBufferView bufferView, @@ -2310,23 +2312,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandPool; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateCommandPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_commandPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateCommandPool" ); - } + *this = device.createCommandPool( createInfo, allocator ); } +# endif CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCommandPool commandPool, @@ -2936,26 +2929,13 @@ namespace VULKAN_HPP_NAMESPACE class CommandBuffers : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CommandBuffers( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector commandBuffers( allocateInfo.commandBufferCount ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkAllocateCommandBuffers( - static_cast( *device ), reinterpret_cast( &allocateInfo ), commandBuffers.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( allocateInfo.commandBufferCount ); - for ( auto const & commandBuffer : commandBuffers ) - { - this->emplace_back( device, commandBuffer, static_cast( allocateInfo.commandPool ) ); - } - } - else - { - detail::throwResultException( result, "vkAllocateCommandBuffers" ); - } + *this = device.allocateCommandBuffers( allocateInfo ); } +# endif CommandBuffers( std::nullptr_t ) {} @@ -2964,6 +2944,12 @@ namespace VULKAN_HPP_NAMESPACE CommandBuffers( CommandBuffers && rhs ) = default; CommandBuffers & operator=( CommandBuffers const & ) = delete; CommandBuffers & operator=( CommandBuffers && rhs ) = default; + + private: + CommandBuffers( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class DebugUtilsMessengerEXT @@ -2977,23 +2963,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDebugUtilsMessengerEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_messenger ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDebugUtilsMessengerEXT" ); - } + *this = instance.createDebugUtilsMessengerEXT( createInfo, allocator ); } +# endif DebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkDebugUtilsMessengerEXT messenger, @@ -3101,23 +3078,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorPool; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDescriptorPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_descriptorPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDescriptorPool" ); - } + *this = device.createDescriptorPool( createInfo, allocator ); } +# endif DescriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorPool descriptorPool, @@ -3323,26 +3291,13 @@ namespace VULKAN_HPP_NAMESPACE class DescriptorSets : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorSets( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector descriptorSets( allocateInfo.descriptorSetCount ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkAllocateDescriptorSets( - static_cast( *device ), reinterpret_cast( &allocateInfo ), descriptorSets.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( allocateInfo.descriptorSetCount ); - for ( auto const & descriptorSet : descriptorSets ) - { - this->emplace_back( device, descriptorSet, static_cast( allocateInfo.descriptorPool ) ); - } - } - else - { - detail::throwResultException( result, "vkAllocateDescriptorSets" ); - } + *this = device.allocateDescriptorSets( allocateInfo ); } +# endif DescriptorSets( std::nullptr_t ) {} @@ -3351,6 +3306,12 @@ namespace VULKAN_HPP_NAMESPACE DescriptorSets( DescriptorSets && rhs ) = default; DescriptorSets & operator=( DescriptorSets const & ) = delete; DescriptorSets & operator=( DescriptorSets && rhs ) = default; + + private: + DescriptorSets( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class DescriptorSetLayout @@ -3364,23 +3325,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSetLayout; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateDescriptorSetLayout( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_descriptorSetLayout ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDescriptorSetLayout" ); - } + *this = device.createDescriptorSetLayout( createInfo, allocator ); } +# endif DescriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorSetLayout descriptorSetLayout, @@ -3488,23 +3440,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDeviceMemory; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DeviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkAllocateMemory( static_cast( *device ), - reinterpret_cast( &allocateInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_memory ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkAllocateMemory" ); - } + *this = device.allocateMemory( allocateInfo, allocator ); } +# endif DeviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDeviceMemory memory, @@ -3701,9 +3644,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD std::vector getModeProperties() const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR - createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_get_display_properties2 === @@ -3718,37 +3662,12 @@ namespace VULKAN_HPP_NAMESPACE class DisplayKHRs : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DisplayKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, uint32_t planeIndex ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * dispatcher = physicalDevice.getDispatcher(); - std::vector displays; - uint32_t displayCount; - VULKAN_HPP_NAMESPACE::Result result; - do - { - result = static_cast( - dispatcher->vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( *physicalDevice ), planeIndex, &displayCount, nullptr ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) - { - displays.resize( displayCount ); - result = static_cast( dispatcher->vkGetDisplayPlaneSupportedDisplaysKHR( - static_cast( *physicalDevice ), planeIndex, &displayCount, displays.data() ) ); - } - } 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 ) - { - this->emplace_back( physicalDevice, displayKHR ); - } - } - else - { - detail::throwResultException( result, "vkGetDisplayPlaneSupportedDisplaysKHR" ); - } + *this = physicalDevice.getDisplayPlaneSupportedDisplaysKHR( planeIndex ); } +# endif DisplayKHRs( std::nullptr_t ) {} @@ -3757,6 +3676,12 @@ namespace VULKAN_HPP_NAMESPACE DisplayKHRs( DisplayKHRs && rhs ) = default; DisplayKHRs & operator=( DisplayKHRs const & ) = delete; DisplayKHRs & operator=( DisplayKHRs && rhs ) = default; + + private: + DisplayKHRs( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class DisplayModeKHR @@ -3770,22 +3695,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayModeKHR; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_physicalDevice( display.getPhysicalDevice() ), m_dispatcher( display.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( display.getDispatcher()->vkCreateDisplayModeKHR( - static_cast( display.getPhysicalDevice() ), - static_cast( *display ), - reinterpret_cast( &createInfo ), - reinterpret_cast( static_cast( allocator ) ), - reinterpret_cast( &m_displayModeKHR ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDisplayModeKHR" ); - } + *this = display.createMode( createInfo, allocator ); } +# endif DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VkDisplayModeKHR displayModeKHR ) : m_physicalDevice( display.getPhysicalDevice() ), m_displayModeKHR( displayModeKHR ), m_dispatcher( display.getDispatcher() ) @@ -3881,23 +3798,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eEvent; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateEvent( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_event ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateEvent" ); - } + *this = device.createEvent( createInfo, allocator ); } +# endif Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkEvent event, @@ -4012,61 +3920,33 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFence; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateFence( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateFence" ); - } + *this = device.createFence( createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkRegisterDeviceEventEXT( static_cast( *device ), - reinterpret_cast( &deviceEventInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkRegisterDeviceEventEXT" ); - } + *this = device.registerEventEXT( deviceEventInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkRegisterDisplayEventEXT( static_cast( *device ), - static_cast( *display ), - reinterpret_cast( &displayEventInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_fence ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkRegisterDisplayEventEXT" ); - } + *this = device.registerDisplayEventEXT( display, displayEventInfo, allocator ); } +# endif Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkFence fence, @@ -4177,23 +4057,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFramebuffer; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateFramebuffer( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_framebuffer ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateFramebuffer" ); - } + *this = device.createFramebuffer( createInfo, allocator ); } +# endif Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkFramebuffer framebuffer, @@ -4300,23 +4171,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImage; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateImage( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_image ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateImage" ); - } + *this = device.createImage( createInfo, allocator ); } +# endif Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkImage image, @@ -4436,23 +4298,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateImageView( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_imageView ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateImageView" ); - } + *this = device.createImageView( createInfo, allocator ); } +# endif ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkImageView imageView, @@ -4559,23 +4412,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineCache; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePipelineCache( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipelineCache ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreatePipelineCache" ); - } + *this = device.createPipelineCache( createInfo, allocator ); } +# endif PipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineCache pipelineCache, @@ -4667,21 +4511,25 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_0 === - VULKAN_HPP_NODISCARD std::vector - createGraphicsPipelines( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + createGraphicsPipelines( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createGraphicsPipeline( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; - VULKAN_HPP_NODISCARD std::vector - createComputePipelines( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NODISCARD + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + createComputePipelines( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; - VULKAN_HPP_NODISCARD VULKAN_HPP_RAII_NAMESPACE::Pipeline + VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type createComputePipeline( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; @@ -4701,49 +4549,25 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache const & pipelineCache, VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateComputePipelines( static_cast( *device ), - static_cast( *pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - detail::throwResultException( m_constructorSuccessCode, "vkCreateComputePipelines" ); - } + *this = device.createComputePipeline( pipelineCache, createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache const & pipelineCache, VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - m_constructorSuccessCode = static_cast( - getDispatcher()->vkCreateGraphicsPipelines( static_cast( *device ), - static_cast( *pipelineCache ), - 1, - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipeline ) ) ); - if ( ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && - ( m_constructorSuccessCode != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - detail::throwResultException( m_constructorSuccessCode, "vkCreateGraphicsPipelines" ); - } + *this = device.createGraphicsPipeline( pipelineCache, createInfo, allocator ); } +# endif Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipeline pipeline, @@ -4855,61 +4679,25 @@ namespace VULKAN_HPP_NAMESPACE class Pipelines : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateComputePipelines( - static_cast( *device ), - static_cast( *pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - detail::throwResultException( result, "vkCreateComputePipelines" ); - } + *this = device.createComputePipelines( pipelineCache, createInfos, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector pipelines( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateGraphicsPipelines( - static_cast( *device ), - static_cast( *pipelineCache ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - pipelines.data() ) ); - if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) || ( result == VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) - { - this->reserve( createInfos.size() ); - for ( auto const & pipeline : pipelines ) - { - this->emplace_back( device, pipeline, allocator, result ); - } - } - else - { - detail::throwResultException( result, "vkCreateGraphicsPipelines" ); - } + *this = device.createGraphicsPipelines( pipelineCache, createInfos, allocator ); } +# endif Pipelines( std::nullptr_t ) {} @@ -4918,6 +4706,12 @@ namespace VULKAN_HPP_NAMESPACE Pipelines( Pipelines && rhs ) = default; Pipelines & operator=( Pipelines const & ) = delete; Pipelines & operator=( Pipelines && rhs ) = default; + + private: + Pipelines( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; class PipelineLayout @@ -4931,23 +4725,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineLayout; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePipelineLayout( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_pipelineLayout ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreatePipelineLayout" ); - } + *this = device.createPipelineLayout( createInfo, allocator ); } +# endif PipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineLayout pipelineLayout, @@ -5055,23 +4840,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PrivateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreatePrivateDataSlot( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_privateDataSlot ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreatePrivateDataSlot" ); - } + *this = device.createPrivateDataSlot( createInfo, allocator ); } +# endif PrivateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPrivateDataSlot privateDataSlot, @@ -5179,23 +4955,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueryPool; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateQueryPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_queryPool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateQueryPool" ); - } + *this = device.createQueryPool( createInfo, allocator ); } +# endif QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueryPool queryPool, @@ -5323,18 +5090,19 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueue; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, uint32_t queueFamilyIndex, uint32_t queueIndex ) - : m_dispatcher( device.getDispatcher() ) { - getDispatcher()->vkGetDeviceQueue( static_cast( *device ), queueFamilyIndex, queueIndex, reinterpret_cast( &m_queue ) ); + *this = device.getQueue( queueFamilyIndex, queueIndex ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) - : m_dispatcher( device.getDispatcher() ) { - getDispatcher()->vkGetDeviceQueue2( - static_cast( *device ), reinterpret_cast( &queueInfo ), reinterpret_cast( &m_queue ) ); + *this = device.getQueue2( queueInfo ); } +# endif Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueue queue ) : m_queue( queue ), m_dispatcher( device.getDispatcher() ) { @@ -5450,41 +5218,23 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eRenderPass; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateRenderPass( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_renderPass ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateRenderPass" ); - } + *this = device.createRenderPass( createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateRenderPass2( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_renderPass ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateRenderPass2" ); - } + *this = device.createRenderPass2( createInfo, allocator ); } +# endif RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkRenderPass renderPass, @@ -5595,23 +5345,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSampler; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateSampler( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_sampler ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSampler" ); - } + *this = device.createSampler( createInfo, allocator ); } +# endif Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSampler sampler, @@ -5718,23 +5459,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateSamplerYcbcrConversion( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_ycbcrConversion ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSamplerYcbcrConversion" ); - } + *this = device.createSamplerYcbcrConversion( createInfo, allocator ); } +# endif SamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSamplerYcbcrConversion ycbcrConversion, @@ -5842,23 +5574,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSemaphore; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = - static_cast( device.getDispatcher()->vkCreateSemaphore( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_semaphore ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSemaphore" ); - } + *this = device.createSemaphore( createInfo, allocator ); } +# endif Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSemaphore semaphore, @@ -5970,23 +5693,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SemaphoreSciSyncPoolNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SemaphoreSciSyncPoolCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateSemaphoreSciSyncPoolNV( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_semaphorePool ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSemaphoreSciSyncPoolNV" ); - } + *this = device.createSemaphoreSciSyncPoolNV( createInfo, allocator ); } +# endif SemaphoreSciSyncPoolNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSemaphoreSciSyncPoolNV semaphorePool, @@ -6095,23 +5809,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eShaderModule; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ShaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateShaderModule( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_shaderModule ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateShaderModule" ); - } + *this = device.createShaderModule( createInfo, allocator ); } +# endif ShaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkShaderModule shaderModule, @@ -6218,41 +5923,23 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSurfaceKHR; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateDisplayPlaneSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateDisplayPlaneSurfaceKHR" ); - } + *this = instance.createDisplayPlaneSurfaceKHR( createInfo, allocator ); } +# endif +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - instance.getDispatcher()->vkCreateHeadlessSurfaceEXT( static_cast( *instance ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_surface ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateHeadlessSurfaceEXT" ); - } + *this = instance.createHeadlessSurfaceEXT( createInfo, allocator ); } +# endif SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkSurfaceKHR surface, @@ -6359,23 +6046,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSwapchainKHR; public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SwapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) - , m_allocator( static_cast( allocator ) ) - , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - device.getDispatcher()->vkCreateSwapchainKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - reinterpret_cast( m_allocator ), - reinterpret_cast( &m_swapchain ) ) ); - if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - detail::throwResultException( result, "vkCreateSwapchainKHR" ); - } + *this = device.createSwapchainKHR( createInfo, allocator ); } +# endif SwapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSwapchainKHR swapchain, @@ -6491,31 +6169,14 @@ namespace VULKAN_HPP_NAMESPACE class SwapchainKHRs : public std::vector { public: +# if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SwapchainKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher = device.getDispatcher(); - std::vector swapchains( createInfos.size() ); - VULKAN_HPP_NAMESPACE::Result result = static_cast( dispatcher->vkCreateSharedSwapchainsKHR( - static_cast( *device ), - createInfos.size(), - reinterpret_cast( createInfos.data() ), - reinterpret_cast( static_cast( allocator ) ), - swapchains.data() ) ); - if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) - { - this->reserve( createInfos.size() ); - for ( auto const & swapchainKHR : swapchains ) - { - this->emplace_back( device, swapchainKHR, allocator ); - } - } - else - { - detail::throwResultException( result, "vkCreateSharedSwapchainsKHR" ); - } + *this = device.createSharedSwapchainsKHR( createInfos, allocator ); } +# endif SwapchainKHRs( std::nullptr_t ) {} @@ -6524,6 +6185,12 @@ namespace VULKAN_HPP_NAMESPACE SwapchainKHRs( SwapchainKHRs && rhs ) = default; SwapchainKHRs & operator=( SwapchainKHRs const & ) = delete; SwapchainKHRs & operator=( SwapchainKHRs && rhs ) = default; + + private: + SwapchainKHRs( std::vector && rhs ) + { + std::swap( *this, rhs ); + } }; //=========================== @@ -6532,16 +6199,62 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_VERSION_1_0 === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Instance - Context::createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Context::createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Instance( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Instance instance; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateInstance( + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &instance ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Context::createInstance" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance( *this, *reinterpret_cast( &instance ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Instance::enumeratePhysicalDevices() const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Instance::enumeratePhysicalDevices() const { - return VULKAN_HPP_RAII_NAMESPACE::PhysicalDevices( *this ); + std::vector physicalDevices; + uint32_t physicalDeviceCount; + VULKAN_HPP_NAMESPACE::Result result; + do + { + result = static_cast( + getDispatcher()->vkEnumeratePhysicalDevices( static_cast( m_instance ), &physicalDeviceCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) + { + physicalDevices.resize( physicalDeviceCount ); + result = static_cast( getDispatcher()->vkEnumeratePhysicalDevices( + static_cast( m_instance ), &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); + } + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::enumeratePhysicalDevices" ); +# endif + } + + std::vector physicalDevicesRAII; + physicalDevicesRAII.reserve( physicalDevices.size() ); + for ( auto & physicalDevice : physicalDevices ) + { + physicalDevicesRAII.emplace_back( *this, *reinterpret_cast( &physicalDevice ) ); + } + return physicalDevicesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures PhysicalDevice::getFeatures() const VULKAN_HPP_NOEXCEPT @@ -6578,14 +6291,15 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; - VkResult result = getDispatcher()->vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), - static_cast( format ), - static_cast( type ), - static_cast( tiling ), - static_cast( usage ), - static_cast( flags ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), + static_cast( format ), + static_cast( type ), + static_cast( tiling ), + static_cast( usage ), + static_cast( flags ), + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); return imageFormatProperties; } @@ -6651,11 +6365,28 @@ namespace VULKAN_HPP_NAMESPACE return result; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Device - PhysicalDevice::createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + PhysicalDevice::createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Device( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Device device; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDevice( + static_cast( m_physicalDevice ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &device ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::createDevice" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device( *this, *reinterpret_cast( &device ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector @@ -6666,18 +6397,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateInstanceExtensionProperties( - layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkEnumerateInstanceExtensionProperties( + layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -6693,21 +6425,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumerateDeviceExtensionProperties( - static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( getDispatcher()->vkEnumerateDeviceExtensionProperties( + static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), - layerName ? layerName->c_str() : nullptr, - &propertyCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), + layerName ? layerName->c_str() : nullptr, + &propertyCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -6722,17 +6455,18 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceLayerProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -6760,9 +6494,14 @@ namespace VULKAN_HPP_NAMESPACE return properties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Queue( *this, queueFamilyIndex, queueIndex ); + VULKAN_HPP_NAMESPACE::Queue queue; + getDispatcher()->vkGetDeviceQueue( static_cast( m_device ), queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue( *this, *reinterpret_cast( &queue ) ); } VULKAN_HPP_INLINE void Queue::submit( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, @@ -6770,32 +6509,48 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit && "Function requires " ); - VkResult result = getDispatcher()->vkQueueSubmit( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit( + static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); } VULKAN_HPP_INLINE void Queue::waitIdle() const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueWaitIdle && "Function requires " ); - VkResult result = getDispatcher()->vkQueueWaitIdle( static_cast( m_queue ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueWaitIdle( static_cast( m_queue ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); } VULKAN_HPP_INLINE void Device::waitIdle() const { VULKAN_HPP_ASSERT( getDispatcher()->vkDeviceWaitIdle && "Function requires " ); - VkResult result = getDispatcher()->vkDeviceWaitIdle( static_cast( m_device ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDeviceWaitIdle( static_cast( m_device ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DeviceMemory - Device::allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DeviceMemory( *this, allocateInfo, allocator ); + VULKAN_HPP_NAMESPACE::DeviceMemory memory; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAllocateMemory( + static_cast( m_device ), + reinterpret_cast( &allocateInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &memory ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateMemory" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceMemory( *this, *reinterpret_cast( &memory ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * DeviceMemory::mapMemory( VULKAN_HPP_NAMESPACE::DeviceSize offset, @@ -6804,14 +6559,14 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkMapMemory && "Function requires " ); - void * pData; - VkResult result = getDispatcher()->vkMapMemory( static_cast( m_device ), - static_cast( m_memory ), - static_cast( offset ), - static_cast( size ), - static_cast( flags ), - &pData ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); + void * pData; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMapMemory( static_cast( m_device ), + static_cast( m_memory ), + static_cast( offset ), + static_cast( size ), + static_cast( flags ), + &pData ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); return pData; } @@ -6828,9 +6583,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkFlushMappedMemoryRanges && "Function requires " ); - VkResult result = getDispatcher()->vkFlushMappedMemoryRanges( - static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkFlushMappedMemoryRanges( + static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); } VULKAN_HPP_INLINE void @@ -6838,9 +6593,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkInvalidateMappedMemoryRanges && "Function requires " ); - VkResult result = getDispatcher()->vkInvalidateMappedMemoryRanges( - static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkInvalidateMappedMemoryRanges( + static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize DeviceMemory::getCommitment() const VULKAN_HPP_NOEXCEPT @@ -6858,20 +6613,24 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory && "Function requires " ); - VkResult result = getDispatcher()->vkBindBufferMemory( static_cast( m_device ), - static_cast( m_buffer ), - static_cast( memory ), - static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Buffer::bindMemory" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkBindBufferMemory( static_cast( m_device ), + static_cast( m_buffer ), + static_cast( memory ), + static_cast( memoryOffset ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Buffer::bindMemory" ); } VULKAN_HPP_INLINE void Image::bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory && "Function requires " ); - VkResult result = getDispatcher()->vkBindImageMemory( - static_cast( m_device ), static_cast( m_image ), static_cast( memory ), static_cast( memoryOffset ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Image::bindMemory" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkBindImageMemory( static_cast( m_device ), + static_cast( m_image ), + static_cast( memory ), + static_cast( memoryOffset ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Image::bindMemory" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Buffer::getMemoryRequirements() const VULKAN_HPP_NOEXCEPT @@ -6896,29 +6655,46 @@ namespace VULKAN_HPP_NAMESPACE return memoryRequirements; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateFence( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &fence ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createFence" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } VULKAN_HPP_INLINE void Device::resetFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetFences && "Function requires " ); - VkResult result = getDispatcher()->vkResetFences( static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkResetFences( static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Fence::getStatus() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceStatus && "Function requires " ); - VkResult result = getDispatcher()->vkGetFenceStatus( static_cast( m_device ), static_cast( m_fence ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Fence::getStatus", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetFenceStatus( static_cast( m_device ), static_cast( m_fence ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Fence::getStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return static_cast( result ); } @@ -6928,37 +6704,68 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitForFences && "Function requires " ); - VkResult result = getDispatcher()->vkWaitForFences( - static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWaitForFences( + static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Semaphore - Device::createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Semaphore( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Semaphore semaphore; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSemaphore( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &semaphore ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSemaphore" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Semaphore( *this, *reinterpret_cast( &semaphore ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Event - Device::createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Event( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Event event; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateEvent( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &event ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createEvent" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Event( *this, *reinterpret_cast( &event ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Event::getStatus() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetEventStatus && "Function requires " ); - VkResult result = getDispatcher()->vkGetEventStatus( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Event::getStatus", - { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetEventStatus( static_cast( m_device ), static_cast( m_event ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Event::getStatus", { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); return static_cast( result ); } @@ -6967,23 +6774,41 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSetEvent && "Function requires " ); - VkResult result = getDispatcher()->vkSetEvent( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Event::set" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkSetEvent( static_cast( m_device ), static_cast( m_event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Event::set" ); } VULKAN_HPP_INLINE void Event::reset() const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetEvent && "Function requires " ); - VkResult result = getDispatcher()->vkResetEvent( static_cast( m_device ), static_cast( m_event ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Event::reset" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkResetEvent( static_cast( m_device ), static_cast( m_event ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Event::reset" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::QueryPool - Device::createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::QueryPool( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::QueryPool queryPool; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateQueryPool( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &queryPool ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createQueryPool" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::QueryPool( *this, *reinterpret_cast( &queryPool ), allocator ); } template @@ -6993,18 +6818,18 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueryPoolResults && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); - std::vector data( dataSize / sizeof( DataType ) ); - VkResult result = getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), - static_cast( m_queryPool ), - firstQuery, - queryCount, - data.size() * sizeof( DataType ), - reinterpret_cast( data.data() ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResults", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + std::vector data( dataSize / sizeof( DataType ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), + static_cast( m_queryPool ), + firstQuery, + queryCount, + data.size() * sizeof( DataType ), + reinterpret_cast( data.data() ), + static_cast( stride ), + static_cast( flags ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResults", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return std::make_pair( static_cast( result ), data ); } @@ -7015,41 +6840,90 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueryPoolResults && "Function requires " ); - DataType data; - VkResult result = getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), - static_cast( m_queryPool ), - firstQuery, - queryCount, - sizeof( DataType ), - reinterpret_cast( &data ), - static_cast( stride ), - static_cast( flags ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResult", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); + DataType data; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), + static_cast( m_queryPool ), + firstQuery, + queryCount, + sizeof( DataType ), + reinterpret_cast( &data ), + static_cast( stride ), + static_cast( flags ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResult", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return std::make_pair( static_cast( result ), data ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Buffer - Device::createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Buffer( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Buffer buffer; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateBuffer( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &buffer ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createBuffer" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Buffer( *this, *reinterpret_cast( &buffer ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::BufferView - Device::createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::BufferView( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::BufferView view; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateBufferView( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &view ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createBufferView" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferView( *this, *reinterpret_cast( &view ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Image - Device::createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Image( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Image image; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateImage( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &image ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createImage" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Image( *this, *reinterpret_cast( &image ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout @@ -7066,74 +6940,260 @@ namespace VULKAN_HPP_NAMESPACE return layout; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::ImageView - Device::createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::ImageView( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::ImageView view; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateImageView( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &view ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createImageView" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ImageView( *this, *reinterpret_cast( &view ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PipelineCache - Device::createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::PipelineCache( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePipelineCache( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipelineCache ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPipelineCache" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache( *this, *reinterpret_cast( &pipelineCache ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type PipelineCache::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, createInfos, allocator ); + std::vector pipelines( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateGraphicsPipelines( + static_cast( m_device ), + static_cast( m_pipelineCache ), + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( pipelines.data() ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PipelineCache::createGraphicsPipelines" ); +# endif + } + + std::vector pipelinesRAII; + pipelinesRAII.reserve( pipelines.size() ); + for ( auto & pipeline : pipelines ) + { + pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); + } + return pipelinesRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline - PipelineCache::createGraphicsPipeline( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + PipelineCache::createGraphicsPipeline( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Pipeline pipeline; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateGraphicsPipelines( + static_cast( m_device ), + static_cast( m_pipelineCache ), + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipeline ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PipelineCache::createGraphicsPipeline" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type PipelineCache::createComputePipelines( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::Pipelines( *this, createInfos, allocator ); + std::vector pipelines( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateComputePipelines( + static_cast( m_device ), + static_cast( m_pipelineCache ), + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( pipelines.data() ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PipelineCache::createComputePipelines" ); +# endif + } + + std::vector pipelinesRAII; + pipelinesRAII.reserve( pipelines.size() ); + for ( auto & pipeline : pipelines ) + { + pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); + } + return pipelinesRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Pipeline - PipelineCache::createComputePipeline( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + PipelineCache::createComputePipeline( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Pipeline pipeline; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateComputePipelines( + static_cast( m_device ), + static_cast( m_pipelineCache ), + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipeline ) ) ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PipelineCache::createComputePipeline" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PipelineLayout - Device::createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::PipelineLayout( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePipelineLayout( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &pipelineLayout ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPipelineLayout" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineLayout( *this, *reinterpret_cast( &pipelineLayout ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Sampler - Device::createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Sampler( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Sampler sampler; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSampler( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &sampler ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSampler" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Sampler( *this, *reinterpret_cast( &sampler ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout - Device::createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorSetLayout( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &setLayout ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorSetLayout" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout( *this, *reinterpret_cast( &setLayout ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DescriptorPool - Device::createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorPool( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorPool( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &descriptorPool ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorPool" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorPool( *this, *reinterpret_cast( &descriptorPool ), allocator ); } VULKAN_HPP_INLINE void DescriptorPool::reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT @@ -7144,10 +7204,32 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_device ), static_cast( m_descriptorPool ), static_cast( flags ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const { - return VULKAN_HPP_RAII_NAMESPACE::DescriptorSets( *this, allocateInfo ); + std::vector descriptorSets( allocateInfo.descriptorSetCount ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAllocateDescriptorSets( static_cast( m_device ), + reinterpret_cast( &allocateInfo ), + reinterpret_cast( descriptorSets.data() ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateDescriptorSets" ); +# endif + } + + std::vector descriptorSetsRAII; + descriptorSetsRAII.reserve( descriptorSets.size() ); + for ( auto & descriptorSet : descriptorSets ) + { + descriptorSetsRAII.emplace_back( + *this, *reinterpret_cast( &descriptorSet ), static_cast( allocateInfo.descriptorPool ) ); + } + return descriptorSetsRAII; } VULKAN_HPP_INLINE void Device::updateDescriptorSets( @@ -7163,18 +7245,52 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( descriptorCopies.data() ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Framebuffer - Device::createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Framebuffer( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateFramebuffer( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &framebuffer ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createFramebuffer" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Framebuffer( *this, *reinterpret_cast( &framebuffer ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::RenderPass - Device::createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::RenderPass renderPass; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRenderPass( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &renderPass ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRenderPass" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, *reinterpret_cast( &renderPass ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D RenderPass::getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT @@ -7188,52 +7304,92 @@ namespace VULKAN_HPP_NAMESPACE return granularity; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::CommandPool - Device::createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::CommandPool( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::CommandPool commandPool; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCommandPool( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &commandPool ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCommandPool" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandPool( *this, *reinterpret_cast( &commandPool ), allocator ); } VULKAN_HPP_INLINE void CommandPool::reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetCommandPool && "Function requires " ); - VkResult result = getDispatcher()->vkResetCommandPool( - static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandPool::reset" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkResetCommandPool( + static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandPool::reset" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - Device::allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + Device::allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const { - return VULKAN_HPP_RAII_NAMESPACE::CommandBuffers( *this, allocateInfo ); + std::vector commandBuffers( allocateInfo.commandBufferCount ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAllocateCommandBuffers( static_cast( m_device ), + reinterpret_cast( &allocateInfo ), + reinterpret_cast( commandBuffers.data() ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateCommandBuffers" ); +# endif + } + + std::vector commandBuffersRAII; + commandBuffersRAII.reserve( commandBuffers.size() ); + for ( auto & commandBuffer : commandBuffers ) + { + commandBuffersRAII.emplace_back( + *this, *reinterpret_cast( &commandBuffer ), static_cast( allocateInfo.commandPool ) ); + } + return commandBuffersRAII; } VULKAN_HPP_INLINE void CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBeginCommandBuffer && "Function requires " ); - VkResult result = getDispatcher()->vkBeginCommandBuffer( static_cast( m_commandBuffer ), - reinterpret_cast( &beginInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBeginCommandBuffer( + static_cast( m_commandBuffer ), reinterpret_cast( &beginInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); } VULKAN_HPP_INLINE void CommandBuffer::end() const { VULKAN_HPP_ASSERT( getDispatcher()->vkEndCommandBuffer && "Function requires " ); - VkResult result = getDispatcher()->vkEndCommandBuffer( static_cast( m_commandBuffer ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkEndCommandBuffer( static_cast( m_commandBuffer ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); } VULKAN_HPP_INLINE void CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetCommandBuffer && "Function requires " ); - VkResult result = - getDispatcher()->vkResetCommandBuffer( static_cast( m_commandBuffer ), static_cast( flags ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkResetCommandBuffer( static_cast( m_commandBuffer ), static_cast( flags ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); } VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, @@ -7352,10 +7508,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); +# else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers( static_cast( m_commandBuffer ), firstBinding, @@ -7765,9 +7925,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumerateInstanceVersion && "Function requires " ); - uint32_t apiVersion; - VkResult result = getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); + uint32_t apiVersion; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); return apiVersion; } @@ -7777,18 +7937,18 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory2 && "Function requires or " ); - VkResult result = getDispatcher()->vkBindBufferMemory2( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindBufferMemory2( + static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); } VULKAN_HPP_INLINE void Device::bindImageMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory2 && "Function requires or " ); - VkResult result = getDispatcher()->vkBindImageMemory2( - static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindImageMemory2( + static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags @@ -7834,20 +7994,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ); - if ( ( result == VK_SUCCESS ) && physicalDeviceGroupCount ) + result = static_cast( + getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - result = + result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, - reinterpret_cast( physicalDeviceGroupProperties.data() ) ); + reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { @@ -8003,11 +8164,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return imageFormatProperties; } @@ -8021,11 +8182,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), - reinterpret_cast( &imageFormatProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); + reinterpret_cast( &imageFormatProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return structureChain; } @@ -8111,16 +8272,40 @@ namespace VULKAN_HPP_NAMESPACE return structureChain; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Queue Device::getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Queue( *this, queueInfo ); + VULKAN_HPP_NAMESPACE::Queue queue; + getDispatcher()->vkGetDeviceQueue2( + static_cast( m_device ), reinterpret_cast( &queueInfo ), reinterpret_cast( &queue ) ); + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue( *this, *reinterpret_cast( &queue ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion - Device::createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSamplerYcbcrConversion( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &ycbcrConversion ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSamplerYcbcrConversion" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( + *this, *reinterpret_cast( &ycbcrConversion ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties @@ -8236,11 +8421,28 @@ namespace VULKAN_HPP_NAMESPACE stride ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::RenderPass - Device::createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::RenderPass renderPass; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRenderPass2( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &renderPass ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRenderPass2" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, *reinterpret_cast( &renderPass ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, @@ -8283,9 +8485,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreCounterValue && "Function requires or " ); - uint64_t value; - VkResult result = getDispatcher()->vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( m_semaphore ), &value ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); + uint64_t value; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( m_semaphore ), &value ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); return value; } @@ -8295,11 +8498,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitSemaphores && "Function requires or " ); - VkResult result = - getDispatcher()->vkWaitSemaphores( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkWaitSemaphores( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } @@ -8308,8 +8510,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSignalSemaphore && "Function requires or " ); - VkResult result = getDispatcher()->vkSignalSemaphore( static_cast( m_device ), reinterpret_cast( &signalInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkSignalSemaphore( static_cast( m_device ), reinterpret_cast( &signalInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress @@ -8357,18 +8560,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector toolProperties; uint32_t toolCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, nullptr ); - if ( ( result == VK_SUCCESS ) && toolCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); - result = getDispatcher()->vkGetPhysicalDeviceToolProperties( - static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolProperties( + static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { @@ -8377,11 +8581,28 @@ namespace VULKAN_HPP_NAMESPACE return toolProperties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot - Device::createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePrivateDataSlot( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &privateDataSlot ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPrivateDataSlot" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, *reinterpret_cast( &privateDataSlot ), allocator ); } VULKAN_HPP_INLINE void Device::setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, @@ -8391,9 +8612,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSetPrivateData && "Function requires or " ); - VkResult result = getDispatcher()->vkSetPrivateData( - static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetPrivateData( + static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, @@ -8432,10 +8653,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWaitEvents2 && "Function requires or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); +# else if ( events.size() != dependencyInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2: events.size() != dependencyInfos.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdWaitEvents2( static_cast( m_commandBuffer ), events.size(), @@ -8465,9 +8690,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit2 && "Function requires or " ); - VkResult result = getDispatcher()->vkQueueSubmit2( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit2( + static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); } VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT @@ -8585,6 +8810,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers2 && "Function requires or or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); + VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); + VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); +# else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != offsets.size()" ); @@ -8597,6 +8827,7 @@ namespace VULKAN_HPP_NAMESPACE { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != strides.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers2( static_cast( m_commandBuffer ), firstBinding, @@ -8797,25 +9028,25 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Bool32 & unrecordedFaults = data_.first; std::vector & faults = data_.second; uint32_t faultCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetFaultData( static_cast( m_device ), - static_cast( faultQueryBehavior ), - reinterpret_cast( &unrecordedFaults ), - &faultCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && faultCount ) + result = static_cast( getDispatcher()->vkGetFaultData( static_cast( m_device ), + static_cast( faultQueryBehavior ), + reinterpret_cast( &unrecordedFaults ), + &faultCount, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && faultCount ) { faults.resize( faultCount ); - result = getDispatcher()->vkGetFaultData( static_cast( m_device ), - static_cast( faultQueryBehavior ), - reinterpret_cast( &unrecordedFaults ), - &faultCount, - reinterpret_cast( faults.data() ) ); + result = static_cast( getDispatcher()->vkGetFaultData( static_cast( m_device ), + static_cast( faultQueryBehavior ), + reinterpret_cast( &unrecordedFaults ), + &faultCount, + reinterpret_cast( faults.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultData" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFaultData" ); return data_; } @@ -8828,9 +9059,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Bool32 supported; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( - static_cast( m_physicalDevice ), queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( static_cast( m_physicalDevice ), + queueFamilyIndex, + static_cast( surface ), + reinterpret_cast( &supported ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); return supported; } @@ -8842,10 +9076,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); return surfaceCapabilities; } @@ -8857,21 +9092,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -8888,21 +9124,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector presentModes; uint32_t presentModeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && presentModeCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), - static_cast( surface ), - &presentModeCount, - reinterpret_cast( presentModes.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + &presentModeCount, + reinterpret_cast( presentModes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { @@ -8913,11 +9150,28 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_KHR_swapchain === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - Device::createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSwapchainKHR( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &swapchain ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSwapchainKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, *reinterpret_cast( &swapchain ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector SwapchainKHR::getImages() const @@ -8926,21 +9180,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector swapchainImages; uint32_t swapchainImageCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetSwapchainImagesKHR( - static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, nullptr ); - if ( ( result == VK_SUCCESS ) && swapchainImageCount ) + result = static_cast( getDispatcher()->vkGetSwapchainImagesKHR( + static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); - result = getDispatcher()->vkGetSwapchainImagesKHR( static_cast( m_device ), - static_cast( m_swapchain ), - &swapchainImageCount, - reinterpret_cast( swapchainImages.data() ) ); + result = + static_cast( getDispatcher()->vkGetSwapchainImagesKHR( static_cast( m_device ), + static_cast( m_swapchain ), + &swapchainImageCount, + reinterpret_cast( swapchainImages.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getImages" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getImages" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { @@ -8954,14 +9209,15 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImageKHR && "Function requires " ); - uint32_t imageIndex; - VkResult result = getDispatcher()->vkAcquireNextImageKHR( static_cast( m_device ), - static_cast( m_swapchain ), - timeout, - static_cast( semaphore ), - static_cast( fence ), - &imageIndex ); - resultCheck( static_cast( result ), + uint32_t imageIndex; + VULKAN_HPP_NAMESPACE::Result result = + static_cast( getDispatcher()->vkAcquireNextImageKHR( static_cast( m_device ), + static_cast( m_swapchain ), + timeout, + static_cast( semaphore ), + static_cast( fence ), + &imageIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireNextImage", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, @@ -8975,10 +9231,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueuePresentKHR && "Function requires " ); - VkResult result = getDispatcher()->vkQueuePresentKHR( static_cast( m_queue ), reinterpret_cast( &presentInfo ) ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", - { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkQueuePresentKHR( static_cast( m_queue ), reinterpret_cast( &presentInfo ) ) ); + resultCheck( + result, VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } @@ -8989,9 +9245,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; - VkResult result = getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( - static_cast( m_device ), reinterpret_cast( &deviceGroupPresentCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( + static_cast( m_device ), reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); return deviceGroupPresentCapabilities; } @@ -9003,9 +9259,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires or " ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; - VkResult result = getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( - static_cast( m_device ), static_cast( surface ), reinterpret_cast( &modes ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( + static_cast( m_device ), static_cast( surface ), reinterpret_cast( &modes ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); return modes; } @@ -9018,19 +9274,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector rects; uint32_t rectCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, nullptr ); - if ( ( result == VK_SUCCESS ) && rectCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( + static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); - result = getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( - static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( static_cast( m_physicalDevice ), + static_cast( surface ), + &rectCount, + reinterpret_cast( rects.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { @@ -9044,10 +9303,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImage2KHR && "Function requires or " ); - uint32_t imageIndex; - VkResult result = getDispatcher()->vkAcquireNextImage2KHR( - static_cast( m_device ), reinterpret_cast( &acquireInfo ), &imageIndex ); - resultCheck( static_cast( result ), + uint32_t imageIndex; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireNextImage2KHR( + static_cast( m_device ), reinterpret_cast( &acquireInfo ), &imageIndex ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, @@ -9066,18 +9325,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -9093,18 +9353,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -9113,10 +9374,40 @@ namespace VULKAN_HPP_NAMESPACE return properties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector - PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type + PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const { - return VULKAN_HPP_RAII_NAMESPACE::DisplayKHRs( *this, planeIndex ); + std::vector displays; + uint32_t displayCount; + VULKAN_HPP_NAMESPACE::Result result; + do + { + result = static_cast( + getDispatcher()->vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( m_physicalDevice ), planeIndex, &displayCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) + { + displays.resize( displayCount ); + result = static_cast( getDispatcher()->vkGetDisplayPlaneSupportedDisplaysKHR( + static_cast( m_physicalDevice ), planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); + } + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); +# endif + } + + std::vector displaysRAII; + displaysRAII.reserve( displays.size() ); + for ( auto & display : displays ) + { + displaysRAII.emplace_back( *this, *reinterpret_cast( &display ) ); + } + return displaysRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector DisplayKHR::getModeProperties() const @@ -9125,21 +9416,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetDisplayModePropertiesKHR( - static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( getDispatcher()->vkGetDisplayModePropertiesKHR( + static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), - static_cast( m_display ), - &propertyCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), + static_cast( m_display ), + &propertyCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -9148,11 +9440,28 @@ namespace VULKAN_HPP_NAMESPACE return properties; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR - DisplayKHR::createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, - VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + DisplayKHR::createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, + VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDisplayModeKHR( + static_cast( m_physicalDevice ), + static_cast( m_display ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &mode ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "DisplayKHR::createMode" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR( *this, *reinterpret_cast( &mode ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR @@ -9161,36 +9470,95 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; - VkResult result = getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), - static_cast( m_displayModeKHR ), - planeIndex, - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), + static_cast( m_displayModeKHR ), + planeIndex, + reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); return capabilities; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDisplayPlaneSurfaceKHR( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDisplayPlaneSurfaceKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } //=== VK_KHR_display_swapchain === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType>::Type Device::createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHRs( *this, createInfos, allocator ); + std::vector swapchains( createInfos.size() ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSharedSwapchainsKHR( + static_cast( m_device ), + createInfos.size(), + reinterpret_cast( createInfos.data() ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( swapchains.data() ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSharedSwapchainsKHR" ); +# endif + } + + std::vector swapchainsRAII; + swapchainsRAII.reserve( swapchains.size() ); + for ( auto & swapchain : swapchains ) + { + swapchainsRAII.emplace_back( *this, *reinterpret_cast( &swapchain ), allocator ); + } + return swapchainsRAII; } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR - Device::createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSharedSwapchainsKHR( + static_cast( m_device ), + 1, + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &swapchain ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSharedSwapchainKHR" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, *reinterpret_cast( &swapchain ), allocator ); } //=== VK_KHR_external_memory_fd === @@ -9199,10 +9567,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdKHR && "Function requires " ); - int fd; - VkResult result = - getDispatcher()->vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); return fd; } @@ -9213,11 +9581,12 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdPropertiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; - VkResult result = getDispatcher()->vkGetMemoryFdPropertiesKHR( static_cast( m_device ), - static_cast( handleType ), - fd, - reinterpret_cast( &memoryFdProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetMemoryFdPropertiesKHR( static_cast( m_device ), + static_cast( handleType ), + fd, + reinterpret_cast( &memoryFdProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); return memoryFdProperties; } @@ -9228,19 +9597,19 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreFdKHR && "Function requires " ); - VkResult result = getDispatcher()->vkImportSemaphoreFdKHR( static_cast( m_device ), - reinterpret_cast( &importSemaphoreFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportSemaphoreFdKHR( + static_cast( m_device ), reinterpret_cast( &importSemaphoreFdInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreFdKHR && "Function requires " ); - int fd; - VkResult result = - getDispatcher()->vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); return fd; } @@ -9254,10 +9623,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), - static_cast( surface ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), + static_cast( surface ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); return surfaceCapabilities; } @@ -9269,34 +9639,69 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkDisplayPowerControlEXT && "Function requires " ); - VkResult result = getDispatcher()->vkDisplayPowerControlEXT( - static_cast( m_device ), static_cast( display ), reinterpret_cast( &displayPowerInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDisplayPowerControlEXT( + static_cast( m_device ), static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, deviceEventInfo, allocator ); + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkRegisterDeviceEventEXT( + static_cast( m_device ), + reinterpret_cast( &deviceEventInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &fence ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::registerEventEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::Fence - Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::Fence( *this, display, displayEventInfo, allocator ); + VULKAN_HPP_NAMESPACE::Fence fence; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkRegisterDisplayEventEXT( + static_cast( m_device ), + static_cast( *display ), + reinterpret_cast( &displayEventInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &fence ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::registerDisplayEventEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t SwapchainKHR::getCounterEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainCounterEXT && "Function requires " ); - uint64_t counterValue; - VkResult result = getDispatcher()->vkGetSwapchainCounterEXT( - static_cast( m_device ), static_cast( m_swapchain ), static_cast( counter ), &counterValue ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); + uint64_t counterValue; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSwapchainCounterEXT( + static_cast( m_device ), static_cast( m_swapchain ), static_cast( counter ), &counterValue ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); return counterValue; } @@ -9338,10 +9743,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & metadata ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetHdrMetadataEXT && "Function requires " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( swapchains.size() == metadata.size() ); +# else if ( swapchains.size() != metadata.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkSetHdrMetadataEXT( static_cast( m_device ), swapchains.size(), @@ -9355,8 +9764,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainStatusKHR && "Function requires " ); - VkResult result = getDispatcher()->vkGetSwapchainStatusKHR( static_cast( m_device ), static_cast( m_swapchain ) ); - resultCheck( static_cast( result ), + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetSwapchainStatusKHR( static_cast( m_device ), static_cast( m_swapchain ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); @@ -9369,18 +9779,19 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceFdKHR && "Function requires " ); - VkResult result = - getDispatcher()->vkImportFenceFdKHR( static_cast( m_device ), reinterpret_cast( &importFenceFdInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkImportFenceFdKHR( static_cast( m_device ), reinterpret_cast( &importFenceFdInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceFdKHR && "Function requires " ); - int fd; - VkResult result = getDispatcher()->vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); + int fd; + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); return fd; } @@ -9398,25 +9809,24 @@ namespace VULKAN_HPP_NAMESPACE std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, nullptr, nullptr ); - if ( ( result == VK_SUCCESS ) && counterCount ) + result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, nullptr, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); - result = getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), - reinterpret_cast( counterDescriptions.data() ) ); + reinterpret_cast( counterDescriptions.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), - VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { @@ -9445,9 +9855,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireProfilingLockKHR && "Function requires " ); - VkResult result = - getDispatcher()->vkAcquireProfilingLockKHR( static_cast( m_device ), reinterpret_cast( &info ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkAcquireProfilingLockKHR( static_cast( m_device ), reinterpret_cast( &info ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); } VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR() const VULKAN_HPP_NOEXCEPT @@ -9466,10 +9876,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return surfaceCapabilities; } @@ -9483,10 +9894,11 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities = structureChain.template get(); - VkResult result = getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - reinterpret_cast( &surfaceCapabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + reinterpret_cast( &surfaceCapabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return structureChain; } @@ -9499,23 +9911,25 @@ namespace VULKAN_HPP_NAMESPACE std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -9534,14 +9948,15 @@ namespace VULKAN_HPP_NAMESPACE std::vector structureChains; std::vector surfaceFormats; uint32_t surfaceFormatCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - nullptr ); - if ( ( result == VK_SUCCESS ) && surfaceFormatCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); @@ -9549,13 +9964,14 @@ namespace VULKAN_HPP_NAMESPACE { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } - result = getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &surfaceInfo ), - &surfaceFormatCount, - reinterpret_cast( surfaceFormats.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &surfaceInfo ), + &surfaceFormatCount, + reinterpret_cast( surfaceFormats.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { @@ -9577,18 +9993,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -9604,18 +10021,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( - static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -9631,21 +10049,22 @@ namespace VULKAN_HPP_NAMESPACE std::vector properties; uint32_t propertyCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetDisplayModeProperties2KHR( - static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ); - if ( ( result == VK_SUCCESS ) && propertyCount ) + result = static_cast( getDispatcher()->vkGetDisplayModeProperties2KHR( + static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); - result = getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), - static_cast( m_display ), - &propertyCount, - reinterpret_cast( properties.data() ) ); + result = static_cast( + getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), + static_cast( m_display ), + &propertyCount, + reinterpret_cast( properties.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { @@ -9661,10 +10080,11 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; - VkResult result = getDispatcher()->vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), - reinterpret_cast( &displayPlaneInfo ), - reinterpret_cast( &capabilities ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), + reinterpret_cast( &displayPlaneInfo ), + reinterpret_cast( &capabilities ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); return capabilities; } @@ -9675,18 +10095,18 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkSetDebugUtilsObjectNameEXT && "Function requires " ); - VkResult result = getDispatcher()->vkSetDebugUtilsObjectNameEXT( static_cast( m_device ), - reinterpret_cast( &nameInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetDebugUtilsObjectNameEXT( + static_cast( m_device ), reinterpret_cast( &nameInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); } VULKAN_HPP_INLINE void Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetDebugUtilsObjectTagEXT && "Function requires " ); - VkResult result = - getDispatcher()->vkSetDebugUtilsObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkSetDebugUtilsObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); } VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT @@ -9733,11 +10153,29 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &labelInfo ) ); } - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT - Instance::createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDebugUtilsMessengerEXT( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &messenger ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDebugUtilsMessengerEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT( + *this, *reinterpret_cast( &messenger ), allocator ); } VULKAN_HPP_INLINE void @@ -9786,9 +10224,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; - VkResult result = getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( - static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( + static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); return properties; } @@ -9802,12 +10240,12 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryHostPointerPropertiesEXT( static_cast( m_device ), static_cast( handleType ), pHostPointer, - reinterpret_cast( &memoryHostPointerProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); + reinterpret_cast( &memoryHostPointerProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); return memoryHostPointerProperties; } @@ -9822,19 +10260,19 @@ namespace VULKAN_HPP_NAMESPACE std::vector timeDomains; uint32_t timeDomainCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ); - if ( ( result == VK_SUCCESS ) && timeDomainCount ) + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); - result = getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( - static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ); + result = static_cast( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( + static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { @@ -9852,12 +10290,13 @@ namespace VULKAN_HPP_NAMESPACE std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = getDispatcher()->vkGetCalibratedTimestampsEXT( static_cast( m_device ), - timestampInfos.size(), - reinterpret_cast( timestampInfos.data() ), - timestamps.data(), - &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetCalibratedTimestampsEXT( static_cast( m_device ), + timestampInfos.size(), + reinterpret_cast( timestampInfos.data() ), + timestamps.data(), + &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); return data_; } @@ -9871,9 +10310,9 @@ namespace VULKAN_HPP_NAMESPACE std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; - VkResult result = getDispatcher()->vkGetCalibratedTimestampsEXT( - static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetCalibratedTimestampsEXT( + static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); return data_; } @@ -9888,21 +10327,21 @@ namespace VULKAN_HPP_NAMESPACE std::vector fragmentShadingRates; uint32_t fragmentShadingRateCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = - getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, nullptr ); - if ( ( result == VK_SUCCESS ) && fragmentShadingRateCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( + static_cast( m_physicalDevice ), &fragmentShadingRateCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); - result = getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( + result = static_cast( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, - reinterpret_cast( fragmentShadingRates.data() ) ); + reinterpret_cast( fragmentShadingRates.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { @@ -9925,11 +10364,28 @@ namespace VULKAN_HPP_NAMESPACE //=== VK_EXT_headless_surface === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR - Instance::createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, + VULKAN_HPP_NODISCARD + VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Instance::createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SurfaceKHR surface; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateHeadlessSurfaceEXT( + static_cast( m_instance ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &surface ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createHeadlessSurfaceEXT" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } //=== VK_EXT_line_rasterization === @@ -9996,6 +10452,11 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers2EXT && "Function requires or or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); + VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); + VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); +# else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != offsets.size()" ); @@ -10008,6 +10469,7 @@ namespace VULKAN_HPP_NAMESPACE { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != strides.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers2EXT( static_cast( m_commandBuffer ), firstBinding, @@ -10092,18 +10554,20 @@ namespace VULKAN_HPP_NAMESPACE std::vector refreshableObjectTypes; uint32_t refreshableObjectTypeCount; - VkResult result; + VULKAN_HPP_NAMESPACE::Result result; do { - result = getDispatcher()->vkGetPhysicalDeviceRefreshableObjectTypesKHR( - static_cast( m_physicalDevice ), &refreshableObjectTypeCount, nullptr ); - if ( ( result == VK_SUCCESS ) && refreshableObjectTypeCount ) + result = static_cast( getDispatcher()->vkGetPhysicalDeviceRefreshableObjectTypesKHR( + static_cast( m_physicalDevice ), &refreshableObjectTypeCount, nullptr ) ); + if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && refreshableObjectTypeCount ) { refreshableObjectTypes.resize( refreshableObjectTypeCount ); - result = getDispatcher()->vkGetPhysicalDeviceRefreshableObjectTypesKHR( - static_cast( m_physicalDevice ), &refreshableObjectTypeCount, reinterpret_cast( refreshableObjectTypes.data() ) ); + result = static_cast( + getDispatcher()->vkGetPhysicalDeviceRefreshableObjectTypesKHR( static_cast( m_physicalDevice ), + &refreshableObjectTypeCount, + reinterpret_cast( refreshableObjectTypes.data() ) ) ); } - } while ( result == VK_INCOMPLETE ); + } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( refreshableObjectTypeCount <= refreshableObjectTypes.size() ); if ( refreshableObjectTypeCount < refreshableObjectTypes.size() ) @@ -10138,10 +10602,14 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWaitEvents2KHR && "Function requires or " ); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); +# else if ( events.size() != dependencyInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2KHR: events.size() != dependencyInfos.size()" ); } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdWaitEvents2KHR( static_cast( m_commandBuffer ), events.size(), @@ -10174,9 +10642,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit2KHR && "Function requires or " ); - VkResult result = getDispatcher()->vkQueueSubmit2KHR( - static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit2KHR( + static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); } VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, @@ -10290,10 +10758,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceSciSyncFenceNV && "Function requires or " ); - HandleType handle; - VkResult result = getDispatcher()->vkGetFenceSciSyncFenceNV( - static_cast( m_device ), reinterpret_cast( &getSciSyncHandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceSciSyncFenceNV" ); + HandleType handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetFenceSciSyncFenceNV( + static_cast( m_device ), reinterpret_cast( &getSciSyncHandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceSciSyncFenceNV" ); return handle; } @@ -10305,10 +10773,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceSciSyncObjNV && "Function requires or " ); - HandleType handle; - VkResult result = getDispatcher()->vkGetFenceSciSyncObjNV( - static_cast( m_device ), reinterpret_cast( &getSciSyncHandleInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceSciSyncObjNV" ); + HandleType handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetFenceSciSyncObjNV( + static_cast( m_device ), reinterpret_cast( &getSciSyncHandleInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceSciSyncObjNV" ); return handle; } @@ -10318,9 +10786,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceSciSyncFenceNV && "Function requires or " ); - VkResult result = getDispatcher()->vkImportFenceSciSyncFenceNV( static_cast( m_device ), - reinterpret_cast( &importFenceSciSyncInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceSciSyncFenceNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportFenceSciSyncFenceNV( + static_cast( m_device ), reinterpret_cast( &importFenceSciSyncInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceSciSyncFenceNV" ); } VULKAN_HPP_INLINE void Device::importFenceSciSyncObjNV( const VULKAN_HPP_NAMESPACE::ImportFenceSciSyncInfoNV & importFenceSciSyncInfo ) const @@ -10328,9 +10796,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceSciSyncObjNV && "Function requires or " ); - VkResult result = getDispatcher()->vkImportFenceSciSyncObjNV( static_cast( m_device ), - reinterpret_cast( &importFenceSciSyncInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceSciSyncObjNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportFenceSciSyncObjNV( + static_cast( m_device ), reinterpret_cast( &importFenceSciSyncInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceSciSyncObjNV" ); } VULKAN_HPP_INLINE void PhysicalDevice::getSciSyncAttributesNV( const VULKAN_HPP_NAMESPACE::SciSyncAttributesInfoNV & sciSyncAttributesInfo, @@ -10339,9 +10807,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSciSyncAttributesNV && "Function requires or " ); - VkResult result = getDispatcher()->vkGetPhysicalDeviceSciSyncAttributesNV( - static_cast( m_physicalDevice ), reinterpret_cast( &sciSyncAttributesInfo ), pAttributes ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSciSyncAttributesNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceSciSyncAttributesNV( + static_cast( m_physicalDevice ), reinterpret_cast( &sciSyncAttributesInfo ), pAttributes ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSciSyncAttributesNV" ); } template @@ -10350,10 +10818,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreSciSyncObjNV && "Function requires " ); - HandleType handle; - VkResult result = getDispatcher()->vkGetSemaphoreSciSyncObjNV( - static_cast( m_device ), reinterpret_cast( &getSciSyncInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreSciSyncObjNV" ); + HandleType handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreSciSyncObjNV( + static_cast( m_device ), reinterpret_cast( &getSciSyncInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreSciSyncObjNV" ); return handle; } @@ -10362,9 +10830,9 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreSciSyncObjNV && "Function requires " ); - VkResult result = getDispatcher()->vkImportSemaphoreSciSyncObjNV( - static_cast( m_device ), reinterpret_cast( &importSemaphoreSciSyncInfo ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreSciSyncObjNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportSemaphoreSciSyncObjNV( + static_cast( m_device ), reinterpret_cast( &importSemaphoreSciSyncInfo ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreSciSyncObjNV" ); } # endif /*VK_USE_PLATFORM_SCI*/ @@ -10375,10 +10843,10 @@ namespace VULKAN_HPP_NAMESPACE { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemorySciBufNV && "Function requires " ); - NvSciBufObj handle; - VkResult result = - getDispatcher()->vkGetMemorySciBufNV( static_cast( m_device ), reinterpret_cast( &getSciBufInfo ), &handle ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getMemorySciBufNV" ); + NvSciBufObj handle; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemorySciBufNV( + static_cast( m_device ), reinterpret_cast( &getSciBufInfo ), &handle ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemorySciBufNV" ); return handle; } @@ -10390,12 +10858,12 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::MemorySciBufPropertiesNV memorySciBufProperties; - VkResult result = + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceExternalMemorySciBufPropertiesNV( static_cast( m_physicalDevice ), static_cast( handleType ), handle, - reinterpret_cast( &memorySciBufProperties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalMemorySciBufPropertiesNV" ); + reinterpret_cast( &memorySciBufProperties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalMemorySciBufPropertiesNV" ); return memorySciBufProperties; } @@ -10405,8 +10873,9 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSciBufAttributesNV && "Function requires " ); - VkResult result = getDispatcher()->vkGetPhysicalDeviceSciBufAttributesNV( static_cast( m_physicalDevice ), pAttributes ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSciBufAttributesNV" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( + getDispatcher()->vkGetPhysicalDeviceSciBufAttributesNV( static_cast( m_physicalDevice ), pAttributes ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSciBufAttributesNV" ); } # endif /*VK_USE_PLATFORM_SCI*/ @@ -10468,11 +10937,29 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_SCI ) //=== VK_NV_external_sci_sync2 === - VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_RAII_NAMESPACE::SemaphoreSciSyncPoolNV - Device::createSemaphoreSciSyncPoolNV( VULKAN_HPP_NAMESPACE::SemaphoreSciSyncPoolCreateInfoNV const & createInfo, + VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CreateReturnType::Type + Device::createSemaphoreSciSyncPoolNV( VULKAN_HPP_NAMESPACE::SemaphoreSciSyncPoolCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const + VULKAN_HPP_RAII_CREATE_NOEXCEPT { - return VULKAN_HPP_RAII_NAMESPACE::SemaphoreSciSyncPoolNV( *this, createInfo, allocator ); + VULKAN_HPP_NAMESPACE::SemaphoreSciSyncPoolNV semaphorePool; + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSemaphoreSciSyncPoolNV( + static_cast( m_device ), + reinterpret_cast( &createInfo ), + reinterpret_cast( static_cast( allocator ) ), + reinterpret_cast( &semaphorePool ) ) ); + if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) + { +# if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) + return VULKAN_HPP_UNEXPECTED( result ); +# else + VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSemaphoreSciSyncPoolNV" ); +# endif + } + + return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SemaphoreSciSyncPoolNV( + *this, *reinterpret_cast( &semaphorePool ), allocator ); } # endif /*VK_USE_PLATFORM_SCI*/ @@ -10486,9 +10973,9 @@ namespace VULKAN_HPP_NAMESPACE "Function requires " ); VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX properties; - VkResult result = getDispatcher()->vkGetScreenBufferPropertiesQNX( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetScreenBufferPropertiesQNX( + static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); return properties; } @@ -10502,9 +10989,9 @@ namespace VULKAN_HPP_NAMESPACE StructureChain structureChain; VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX & properties = structureChain.template get(); - VkResult result = getDispatcher()->vkGetScreenBufferPropertiesQNX( - static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ); - resultCheck( static_cast( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); + VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetScreenBufferPropertiesQNX( + static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); + resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); return structureChain; }