From d74e5f6199103bfa5902a3ffb0b72bbca759813d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Tue, 16 Jan 2018 14:59:54 +0100 Subject: [PATCH] Change functions returning a UniqueHandle to returning a ResultValue::type, making VULKAN_HPP_NO_SMART_HANDLE and VULKAN_HPP_NO_EXCEPTIONS really independent. (#173) --- VulkanHppGenerator.cpp | 201 +++++++++--------- VulkanHppGenerator.hpp | 5 +- vulkan/vulkan.hpp | 459 +++++++++++++++++++++++++++-------------- 3 files changed, 403 insertions(+), 262 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index ce5d407..8a7eb7e 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -484,6 +484,11 @@ const std::string resultValueHeader = R"( , value( v ) {} + ResultValue( Result r, T && v ) + : result( r ) + , value( std::move( v ) ) + {} + Result result; T value; @@ -496,7 +501,7 @@ const std::string resultValueHeader = R"( #ifdef VULKAN_HPP_NO_EXCEPTIONS typedef ResultValue type; #else - typedef T type; + typedef T type; #endif }; @@ -567,6 +572,23 @@ const std::string createResultValueHeader = R"( return ResultValue( result, data ); } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE typename ResultValueType>::type createResultValue( Result result, T & data, char const * message, typename UniqueHandleTraits::deleter const& deleter ) + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( result == Result::eSuccess ); + return ResultValue>( result, UniqueHandle(data, deleter) ); +#else + if ( result != Result::eSuccess ) + { + throwResultException( result, message ); + } + return UniqueHandle(data, deleter); +#endif + } +#endif + )"; const std::string uniqueHandleHeader = R"( @@ -991,7 +1013,7 @@ std::string startUpperCase(std::string const& input) std::string startLowerCase(std::string const& input) { - return static_cast(tolower(input[0])) + input.substr(1); + return input.empty() ? "" : static_cast(tolower(input[0])) + input.substr(1); } std::string strip(std::string const& value, std::string const& prefix, std::string const& postfix) @@ -3199,14 +3221,7 @@ void VulkanHppGenerator::writeFunction(std::ostream & os, std::string const& ind os << indentation << "{" << std::endl; if (enhanced) { - if (unique) - { - writeFunctionBodyUnique(os, indentation, commandData, singular); - } - else - { - writeFunctionBodyEnhanced(os, indentation, commandData, singular, isStructureChain); - } + writeFunctionBodyEnhanced(os, indentation, commandData, singular, unique, isStructureChain); } else { @@ -3216,7 +3231,7 @@ void VulkanHppGenerator::writeFunction(std::ostream & os, std::string const& ind } } -void VulkanHppGenerator::writeFunctionBodyEnhanced(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool isStructureChain) +void VulkanHppGenerator::writeFunctionBodyEnhanced(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool unique, bool isStructureChain) { if (1 < commandData.vectorParams.size()) { @@ -3269,7 +3284,7 @@ void VulkanHppGenerator::writeFunctionBodyEnhanced(std::ostream & os, std::strin if ((commandData.returnType == "Result") || !commandData.successCodes.empty()) { - writeFunctionBodyEnhancedReturnResultValue(os, indentation, returnName, commandData, singular); + writeFunctionBodyEnhancedReturnResultValue(os, indentation, returnName, commandData, singular, unique); } else if ((commandData.returnParam != ~0) && (commandData.returnType != commandData.enhancedReturnType)) { @@ -3491,18 +3506,69 @@ ${i} } } } -void VulkanHppGenerator::writeFunctionBodyEnhancedReturnResultValue(std::ostream & os, std::string const& indentation, std::string const& returnName, CommandData const& commandData, bool singular) +void VulkanHppGenerator::writeFunctionBodyEnhancedReturnResultValue(std::ostream & os, std::string const& indentation, std::string const& returnName, CommandData const& commandData, bool singular, bool unique) { + std::string type = (commandData.returnParam != ~0) ? commandData.params[commandData.returnParam].pureType : ""; + std::string returnVectorName = (commandData.returnParam != ~0) ? strip(commandData.params[commandData.returnParam].name, "p", "s") : ""; + + if (unique) + { + // the unique version needs a Deleter object for destruction of the newly created stuff + os << std::endl + << indentation << " " << type << "Deleter deleter( "; + if (m_deleters.find(commandData.className) != m_deleters.end()) + { + // if the Deleter is specific to the command's class, add '*this' to the deleter + os << "*this, "; + } + + // get the DeleterData corresponding to the returned type + std::map::const_iterator ddit = m_deleters.find(type); + assert(ddit != m_deleters.end()); + if (ddit->second.pool.empty()) + { + // if this type isn't pooled, use the allocator (provided as a function argument) + os << "allocator"; + } + else + { + // otherwise use the pool, which always is a member of the second argument + os << startLowerCase(strip(commandData.params[1].name, "p")) << "." << startLowerCase(ddit->second.pool); + } + os << " );" << std::endl; + } + + bool returnUniqueVector = unique && !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end()); + if (returnUniqueVector) + { + std::string const stringTemplate = +R"(${i} std::vector unique${returnVectorName}s; +${i} unique${returnVectorName}s.reserve( ${localName}s.size() ); +${i} for ( auto const& ${localName} : ${localName}s ) +${i} { +${i} unique${returnVectorName}s.push_back( Unique${type}( ${localName}, deleter ) ); +${i} } + +)"; + + os << replaceWithMap(stringTemplate, std::map{ + { "i", indentation }, + { "type", type }, + { "returnVectorName", returnVectorName }, + { "localName", startLowerCase(returnVectorName) } + }); + } + // if the return type is "Result" or there is at least one success code, create the Result/Value construct to return os << indentation << " return createResultValue( result, "; if (commandData.returnParam != ~0) { // if there's a return parameter, list it in the Result/Value constructor - os << returnName << ", "; + os << (returnUniqueVector ? "unique" + returnVectorName + "s" : returnName) << ", "; } // now the function name (with full namespace) as a string - os << "\"VULKAN_HPP_NAMESPACE::" << (commandData.className.empty() ? "" : commandData.className + "::") << (singular ? stripPluralS(commandData.reducedName) : commandData.reducedName) << "\""; + os << "\"VULKAN_HPP_NAMESPACE::" << (commandData.className.empty() ? "" : commandData.className + "::") << (singular ? stripPluralS(commandData.reducedName) : commandData.reducedName) << (unique ? "Unique" : "") << "\""; if (!commandData.twoStep && (1 < commandData.successCodes.size())) { @@ -3514,6 +3580,12 @@ void VulkanHppGenerator::writeFunctionBodyEnhancedReturnResultValue(std::ostream } os << " }"; } + + if (unique && !returnUniqueVector) + { + os << ", deleter"; + } + os << " );" << std::endl; } @@ -3582,93 +3654,6 @@ void VulkanHppGenerator::writeFunctionBodyStandard(std::ostream & os, std::strin os << ";" << std::endl; } -void VulkanHppGenerator::writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular) -{ - // the unique version needs a Deleter object for destruction of the newly created stuff - std::string type = commandData.params[commandData.returnParam].pureType; - std::string typeValue = startLowerCase(type); - os << indentation << " " << type << "Deleter deleter( "; - if (m_deleters.find(commandData.className) != m_deleters.end()) - { - // if the Deleter is specific to the command's class, add '*this' to the deleter - os << "*this, "; - } - - // get the DeleterData corresponding to the returned type - std::map::const_iterator ddit = m_deleters.find(type); - assert(ddit != m_deleters.end()); - if (ddit->second.pool.empty()) - { - // if this type isn't pooled, use the allocator (provided as a function argument) - os << "allocator"; - } - else - { - // otherwise use the pool, which always is a member of the second argument - os << startLowerCase(strip(commandData.params[1].name, "p")) << "." << startLowerCase(ddit->second.pool); - } - os << " );" << std::endl; - - bool returnsVector = !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end()); - if (returnsVector) - { - // if a vector of data is returned, use a local variable to hold the returned data from the non-unique function call - os << indentation << " std::vector<" << type << ",Allocator> " << typeValue << "s = "; - } - else - { - // otherwise create a Unique stuff out of the returned data from the non-unique function call - os << indentation << " return Unique" << type << "( "; - } - - // the call to the non-unique function - os << (singular ? stripPluralS(commandData.fullName) : commandData.fullName) << "( "; - bool argEncountered = false; - for (size_t i = commandData.className.empty() ? 0 : 1; i < commandData.params.size(); i++) - { - if (commandData.skippedParams.find(i) == commandData.skippedParams.end()) - { - if (argEncountered) - { - os << ", "; - } - argEncountered = true; - - // strip off the leading 'p' for pointer arguments - std::string argumentName = (commandData.params[i].type.back() == '*') ? startLowerCase(strip(commandData.params[i].name, "p")) : commandData.params[i].name; - if (singular && (commandData.vectorParams.find(i) != commandData.vectorParams.end())) - { - // and strip off the plural 's' if appropriate - argumentName = stripPluralS(argumentName); - } - os << argumentName; - } - } - os << " )"; - if (returnsVector) - { - std::string const stringTemplate = R"(; -${i} std::vector unique${type}s; -${i} unique${type}s.reserve( ${typeValue}s.size() ); -${i} for ( auto ${typeValue} : ${typeValue}s ) -${i} { -${i} unique${type}s.push_back( Unique${type}( ${typeValue}, deleter ) ); -${i} } -${i} return unique${type}s; -)"; - os << replaceWithMap(stringTemplate, std::map{ - { "i", indentation }, - { "type", type }, - { "typeValue", typeValue } - }); - } - else - { - // for non-vector returns, just add the deleter (local variable) to the Unique-stuff constructor - os << ", deleter );" << std::endl; - } -} - void VulkanHppGenerator::writeFunctionHeaderArguments(std::ostream & os, CommandData const& commandData, bool enhanced, bool singular, bool withDefaults) { os << "("; @@ -3855,23 +3840,23 @@ void VulkanHppGenerator::writeFunctionHeaderReturnType(std::ostream & os, std::s if (enhanced) { // the enhanced function might return some pretty complex return stuff + if (isStructureChain || (!singular && (commandData.enhancedReturnType.find("Allocator") != std::string::npos))) + { + // for the non-singular case with allocation, we need to prepend with 'typename' to keep compilers happy + templateString = "typename "; + } if (unique) { // the unique version returns something prefixed with 'Unique'; potentially a vector of that stuff // it's a vector, if it's not the singular version and the return parameter is a vector parameter bool returnsVector = !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end()); - templateString = returnsVector ? "std::vector " : "Unique${returnType} "; + templateString += returnsVector ? "ResultValueType>::type " : "ResultValueType::type "; returnType = isStructureChain ? "StructureChain" : commandData.params[commandData.returnParam].pureType; } else if ((commandData.enhancedReturnType != commandData.returnType) && (commandData.returnType != "void")) { // if the enhanced return type differs from the original return type, and it's not void, we return a ResultValueType<...>::type - if (isStructureChain || (!singular && (commandData.enhancedReturnType.find("Allocator") != std::string::npos))) - { - // for the non-singular case with allocation, we need to prepend with 'typename' to keep compilers happy - templateString = "typename "; - } templateString += "ResultValueType<${returnType}>::type "; assert(commandData.returnType == "Result"); diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index f521494..422e2aa 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -245,7 +245,7 @@ class VulkanHppGenerator void writeDeleterForwardDeclarations(std::ostream &os, std::pair> const& deleterTypes); void writeExceptionsForEnum(std::ostream & os, EnumData const& enumData); void writeFunction(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool definition, bool enhanced, bool singular, bool unique, bool isStructureChain); - void writeFunctionBodyEnhanced(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool isStructureChain); + void writeFunctionBodyEnhanced(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool unique, bool isStructureChain); void writeFunctionBodyEnhanced(std::ostream & os, std::string const& templateString, std::string const& indentation, CommandData const& commandData, bool singular); void writeFunctionBodyTwoStep(std::ostream & os, std::string const &templateString, std::string const& indentation, std::string const& returnName, std::string const& sizeName, CommandData const& commandData); std::string writeFunctionBodyEnhancedLocalReturnVariable(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool isStructureChain); @@ -256,9 +256,8 @@ class VulkanHppGenerator void writeFunctionBodyEnhancedCallTwoStepChecked(std::ostream & os, std::string const& indentation, std::string const& returnName, std::string const& sizeName, CommandData const& commandData); void writeFunctionBodyEnhancedLocalCountVariable(std::ostream & os, std::string const& indentation, CommandData const& commandData); void writeFunctionBodyEnhancedMultiVectorSizeCheck(std::ostream & os, std::string const& indentation, CommandData const& commandData); - void writeFunctionBodyEnhancedReturnResultValue(std::ostream & os, std::string const& indentation, std::string const& returnName, CommandData const& commandData, bool singular); + void writeFunctionBodyEnhancedReturnResultValue(std::ostream & os, std::string const& indentation, std::string const& returnName, CommandData const& commandData, bool singular, bool unique); void writeFunctionBodyStandard(std::ostream & os, std::string const& indentation, CommandData const& commandData); - void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular); void writeFunctionHeaderArguments(std::ostream & os, CommandData const& commandData, bool enhanced, bool singular, bool withDefaults); void writeFunctionHeaderArgumentsEnhanced(std::ostream & os, CommandData const& commandData, bool singular, bool withDefaults); void writeFunctionHeaderArgumentsStandard(std::ostream & os, CommandData const& commandData); diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 55ca8e0..0ae90c0 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -351,7 +351,7 @@ namespace VULKAN_HPP_NAMESPACE ~UniqueHandle() { - if ( m_value ) this->destroy( m_value ); + if ( m_value ) this->destroy( m_value ); } UniqueHandle & operator=( UniqueHandle const& ) = delete; @@ -402,7 +402,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_value != value ) { - if ( m_value ) this->destroy( m_value ); + if ( m_value ) this->destroy( m_value ); m_value = value; } } @@ -866,6 +866,11 @@ namespace VULKAN_HPP_NAMESPACE , value( v ) {} + ResultValue( Result r, T && v ) + : result( r ) + , value( std::move( v ) ) + {} + Result result; T value; @@ -878,7 +883,7 @@ namespace VULKAN_HPP_NAMESPACE #ifdef VULKAN_HPP_NO_EXCEPTIONS typedef ResultValue type; #else - typedef T type; + typedef T type; #endif }; @@ -947,6 +952,23 @@ namespace VULKAN_HPP_NAMESPACE return ResultValue( result, data ); } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE typename ResultValueType>::type createResultValue( Result result, T & data, char const * message, typename UniqueHandleTraits::deleter const& deleter ) + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( result == Result::eSuccess ); + return ResultValue>( result, UniqueHandle(data, deleter) ); +#else + if ( result != Result::eSuccess ) + { + throwResultException( result, message ); + } + return UniqueHandle(data, deleter); +#endif + } +#endif + using SampleMask = uint32_t; using Bool32 = uint32_t; @@ -26808,7 +26830,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDeviceMemory allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; + ResultValueType::type allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26871,7 +26893,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createFence( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueFence createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26896,7 +26918,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSemaphore createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26909,7 +26931,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createEvent( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueEvent createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26936,7 +26958,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueQueryPool createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26955,7 +26977,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createBuffer( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueBuffer createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26968,7 +26990,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueBufferView createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26981,7 +27003,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createImage( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueImage createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26999,7 +27021,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createImageView( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueImageView createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27012,7 +27034,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueShaderModule createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27025,7 +27047,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniquePipelineCache createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27052,8 +27074,8 @@ namespace VULKAN_HPP_NAMESPACE ResultValueType::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE template > - std::vector createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; - UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; + typename ResultValueType>::type createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27064,8 +27086,8 @@ namespace VULKAN_HPP_NAMESPACE ResultValueType::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE template > - std::vector createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; - UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; + typename ResultValueType>::type createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27078,7 +27100,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniquePipelineLayout createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27091,7 +27113,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createSampler( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSampler createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27104,7 +27126,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorSetLayout createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27117,7 +27139,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorPool createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27138,7 +27160,7 @@ namespace VULKAN_HPP_NAMESPACE typename ResultValueType>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE template > - std::vector allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const; + typename ResultValueType>::type allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27156,7 +27178,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueFramebuffer createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27169,7 +27191,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueRenderPass createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27187,7 +27209,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueCommandPool createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27208,7 +27230,7 @@ namespace VULKAN_HPP_NAMESPACE typename ResultValueType>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE template > - std::vector allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const; + typename ResultValueType>::type allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27224,8 +27246,8 @@ namespace VULKAN_HPP_NAMESPACE ResultValueType::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE template > - std::vector createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator = nullptr ) const; - UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + typename ResultValueType>::type createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27233,7 +27255,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSwapchainKHR createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27274,7 +27296,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueIndirectCommandsLayoutNVX createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27287,7 +27309,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueObjectTableNVX createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27438,7 +27460,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorUpdateTemplateKHR createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27491,7 +27513,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSamplerYcbcrConversionKHR createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27504,7 +27526,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueValidationCacheEXT createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28214,10 +28236,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, memory, "VULKAN_HPP_NAMESPACE::Device::allocateMemory" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDeviceMemory Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const { + DeviceMemory memory; + Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); + DeviceMemoryDeleter deleter( *this, allocator ); - return UniqueDeviceMemory( allocateMemory( allocateInfo, allocator ), deleter ); + return createResultValue( result, memory, "VULKAN_HPP_NAMESPACE::Device::allocateMemoryUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28369,10 +28394,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, fence, "VULKAN_HPP_NAMESPACE::Device::createFence" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueFence Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator ) const { + Fence fence; + Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); + FenceDeleter deleter( *this, allocator ); - return UniqueFence( createFence( createInfo, allocator ), deleter ); + return createResultValue( result, fence, "VULKAN_HPP_NAMESPACE::Device::createFenceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28437,10 +28465,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, semaphore, "VULKAN_HPP_NAMESPACE::Device::createSemaphore" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSemaphore Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator ) const { + Semaphore semaphore; + Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); + SemaphoreDeleter deleter( *this, allocator ); - return UniqueSemaphore( createSemaphore( createInfo, allocator ), deleter ); + return createResultValue( result, semaphore, "VULKAN_HPP_NAMESPACE::Device::createSemaphoreUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28468,10 +28499,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, event, "VULKAN_HPP_NAMESPACE::Device::createEvent" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueEvent Device::createEventUnique( const EventCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createEventUnique( const EventCreateInfo & createInfo, Optional allocator ) const { + Event event; + Result result = static_cast( vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); + EventDeleter deleter( *this, allocator ); - return UniqueEvent( createEvent( createInfo, allocator ), deleter ); + return createResultValue( result, event, "VULKAN_HPP_NAMESPACE::Device::createEventUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28538,10 +28572,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, queryPool, "VULKAN_HPP_NAMESPACE::Device::createQueryPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueQueryPool Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator ) const { + QueryPool queryPool; + Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); + QueryPoolDeleter deleter( *this, allocator ); - return UniqueQueryPool( createQueryPool( createInfo, allocator ), deleter ); + return createResultValue( result, queryPool, "VULKAN_HPP_NAMESPACE::Device::createQueryPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28582,10 +28619,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, buffer, "VULKAN_HPP_NAMESPACE::Device::createBuffer" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueBuffer Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator ) const { + Buffer buffer; + Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); + BufferDeleter deleter( *this, allocator ); - return UniqueBuffer( createBuffer( createInfo, allocator ), deleter ); + return createResultValue( result, buffer, "VULKAN_HPP_NAMESPACE::Device::createBufferUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28613,10 +28653,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createBufferView" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueBufferView Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator ) const { + BufferView view; + Result result = static_cast( vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); + BufferViewDeleter deleter( *this, allocator ); - return UniqueBufferView( createBufferView( createInfo, allocator ), deleter ); + return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createBufferViewUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28644,10 +28687,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, image, "VULKAN_HPP_NAMESPACE::Device::createImage" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueImage Device::createImageUnique( const ImageCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createImageUnique( const ImageCreateInfo & createInfo, Optional allocator ) const { + Image image; + Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); + ImageDeleter deleter( *this, allocator ); - return UniqueImage( createImage( createInfo, allocator ), deleter ); + return createResultValue( result, image, "VULKAN_HPP_NAMESPACE::Device::createImageUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28688,10 +28734,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createImageView" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueImageView Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator ) const { + ImageView view; + Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); + ImageViewDeleter deleter( *this, allocator ); - return UniqueImageView( createImageView( createInfo, allocator ), deleter ); + return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createImageViewUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28719,10 +28768,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, shaderModule, "VULKAN_HPP_NAMESPACE::Device::createShaderModule" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueShaderModule Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator ) const { + ShaderModule shaderModule; + Result result = static_cast( vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); + ShaderModuleDeleter deleter( *this, allocator ); - return UniqueShaderModule( createShaderModule( createInfo, allocator ), deleter ); + return createResultValue( result, shaderModule, "VULKAN_HPP_NAMESPACE::Device::createShaderModuleUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28750,10 +28802,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, pipelineCache, "VULKAN_HPP_NAMESPACE::Device::createPipelineCache" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniquePipelineCache Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator ) const { + PipelineCache pipelineCache; + Result result = static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); + PipelineCacheDeleter deleter( *this, allocator ); - return UniquePipelineCache( createPipelineCache( createInfo, allocator ), deleter ); + return createResultValue( result, pipelineCache, "VULKAN_HPP_NAMESPACE::Device::createPipelineCacheUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28827,22 +28882,28 @@ namespace VULKAN_HPP_NAMESPACE } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const { + std::vector pipelines( createInfos.size() ); + Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); + PipelineDeleter deleter( *this, allocator ); - std::vector pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator ); std::vector uniquePipelines; uniquePipelines.reserve( pipelines.size() ); - for ( auto pipeline : pipelines ) + for ( auto const& pipeline : pipelines ) { uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); } - return uniquePipelines; + + return createResultValue( result, uniquePipelines, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelinesUnique" ); } - VULKAN_HPP_INLINE UniquePipeline Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) const { + Pipeline pipeline; + Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); + PipelineDeleter deleter( *this, allocator ); - return UniquePipeline( createGraphicsPipeline( pipelineCache, createInfo, allocator ), deleter ); + return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelineUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28867,22 +28928,28 @@ namespace VULKAN_HPP_NAMESPACE } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const { + std::vector pipelines( createInfos.size() ); + Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); + PipelineDeleter deleter( *this, allocator ); - std::vector pipelines = createComputePipelines( pipelineCache, createInfos, allocator ); std::vector uniquePipelines; uniquePipelines.reserve( pipelines.size() ); - for ( auto pipeline : pipelines ) + for ( auto const& pipeline : pipelines ) { uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); } - return uniquePipelines; + + return createResultValue( result, uniquePipelines, "VULKAN_HPP_NAMESPACE::Device::createComputePipelinesUnique" ); } - VULKAN_HPP_INLINE UniquePipeline Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) const { + Pipeline pipeline; + Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); + PipelineDeleter deleter( *this, allocator ); - return UniquePipeline( createComputePipeline( pipelineCache, createInfo, allocator ), deleter ); + return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createComputePipelineUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28910,10 +28977,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, pipelineLayout, "VULKAN_HPP_NAMESPACE::Device::createPipelineLayout" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniquePipelineLayout Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const { + PipelineLayout pipelineLayout; + Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); + PipelineLayoutDeleter deleter( *this, allocator ); - return UniquePipelineLayout( createPipelineLayout( createInfo, allocator ), deleter ); + return createResultValue( result, pipelineLayout, "VULKAN_HPP_NAMESPACE::Device::createPipelineLayoutUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28941,10 +29011,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, sampler, "VULKAN_HPP_NAMESPACE::Device::createSampler" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSampler Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator ) const { + Sampler sampler; + Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); + SamplerDeleter deleter( *this, allocator ); - return UniqueSampler( createSampler( createInfo, allocator ), deleter ); + return createResultValue( result, sampler, "VULKAN_HPP_NAMESPACE::Device::createSamplerUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28972,10 +29045,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, setLayout, "VULKAN_HPP_NAMESPACE::Device::createDescriptorSetLayout" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorSetLayout Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const { + DescriptorSetLayout setLayout; + Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); + DescriptorSetLayoutDeleter deleter( *this, allocator ); - return UniqueDescriptorSetLayout( createDescriptorSetLayout( createInfo, allocator ), deleter ); + return createResultValue( result, setLayout, "VULKAN_HPP_NAMESPACE::Device::createDescriptorSetLayoutUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29003,10 +29079,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, descriptorPool, "VULKAN_HPP_NAMESPACE::Device::createDescriptorPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorPool Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const { + DescriptorPool descriptorPool; + Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); + DescriptorPoolDeleter deleter( *this, allocator ); - return UniqueDescriptorPool( createDescriptorPool( createInfo, allocator ), deleter ); + return createResultValue( result, descriptorPool, "VULKAN_HPP_NAMESPACE::Device::createDescriptorPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29049,17 +29128,20 @@ namespace VULKAN_HPP_NAMESPACE } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const { + std::vector descriptorSets( allocateInfo.descriptorSetCount ); + Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool ); - std::vector descriptorSets = allocateDescriptorSets( allocateInfo ); std::vector uniqueDescriptorSets; uniqueDescriptorSets.reserve( descriptorSets.size() ); - for ( auto descriptorSet : descriptorSets ) + for ( auto const& descriptorSet : descriptorSets ) { uniqueDescriptorSets.push_back( UniqueDescriptorSet( descriptorSet, deleter ) ); } - return uniqueDescriptorSets; + + return createResultValue( result, uniqueDescriptorSets, "VULKAN_HPP_NAMESPACE::Device::allocateDescriptorSetsUnique" ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29099,10 +29181,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, framebuffer, "VULKAN_HPP_NAMESPACE::Device::createFramebuffer" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueFramebuffer Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator ) const { + Framebuffer framebuffer; + Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); + FramebufferDeleter deleter( *this, allocator ); - return UniqueFramebuffer( createFramebuffer( createInfo, allocator ), deleter ); + return createResultValue( result, framebuffer, "VULKAN_HPP_NAMESPACE::Device::createFramebufferUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29130,10 +29215,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, renderPass, "VULKAN_HPP_NAMESPACE::Device::createRenderPass" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueRenderPass Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator ) const { + RenderPass renderPass; + Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); + RenderPassDeleter deleter( *this, allocator ); - return UniqueRenderPass( createRenderPass( createInfo, allocator ), deleter ); + return createResultValue( result, renderPass, "VULKAN_HPP_NAMESPACE::Device::createRenderPassUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29174,10 +29262,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, commandPool, "VULKAN_HPP_NAMESPACE::Device::createCommandPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueCommandPool Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator ) const { + CommandPool commandPool; + Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); + CommandPoolDeleter deleter( *this, allocator ); - return UniqueCommandPool( createCommandPool( createInfo, allocator ), deleter ); + return createResultValue( result, commandPool, "VULKAN_HPP_NAMESPACE::Device::createCommandPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29220,17 +29311,20 @@ namespace VULKAN_HPP_NAMESPACE } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const { + std::vector commandBuffers( allocateInfo.commandBufferCount ); + Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + CommandBufferDeleter deleter( *this, allocateInfo.commandPool ); - std::vector commandBuffers = allocateCommandBuffers( allocateInfo ); std::vector uniqueCommandBuffers; uniqueCommandBuffers.reserve( commandBuffers.size() ); - for ( auto commandBuffer : commandBuffers ) + for ( auto const& commandBuffer : commandBuffers ) { uniqueCommandBuffers.push_back( UniqueCommandBuffer( commandBuffer, deleter ) ); } - return uniqueCommandBuffers; + + return createResultValue( result, uniqueCommandBuffers, "VULKAN_HPP_NAMESPACE::Device::allocateCommandBuffersUnique" ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29266,22 +29360,28 @@ namespace VULKAN_HPP_NAMESPACE } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator ) const { + std::vector swapchains( createInfos.size() ); + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); + SwapchainKHRDeleter deleter( *this, allocator ); - std::vector swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator ); - std::vector uniqueSwapchainKHRs; - uniqueSwapchainKHRs.reserve( swapchainKHRs.size() ); - for ( auto swapchainKHR : swapchainKHRs ) + std::vector uniqueSwapchains; + uniqueSwapchains.reserve( swapchains.size() ); + for ( auto const& swapchain : swapchains ) { - uniqueSwapchainKHRs.push_back( UniqueSwapchainKHR( swapchainKHR, deleter ) ); + uniqueSwapchains.push_back( UniqueSwapchainKHR( swapchain, deleter ) ); } - return uniqueSwapchainKHRs; + + return createResultValue( result, uniqueSwapchains, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainsKHRUnique" ); } - VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const { + SwapchainKHR swapchain; + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); + SwapchainKHRDeleter deleter( *this, allocator ); - return UniqueSwapchainKHR( createSharedSwapchainKHR( createInfo, allocator ), deleter ); + return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29298,10 +29398,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSwapchainKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const { + SwapchainKHR swapchain; + Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); + SwapchainKHRDeleter deleter( *this, allocator ); - return UniqueSwapchainKHR( createSwapchainKHR( createInfo, allocator ), deleter ); + return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSwapchainKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29407,10 +29510,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, indirectCommandsLayout, "VULKAN_HPP_NAMESPACE::Device::createIndirectCommandsLayoutNVX" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueIndirectCommandsLayoutNVX Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const { + IndirectCommandsLayoutNVX indirectCommandsLayout; + Result result = static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); + IndirectCommandsLayoutNVXDeleter deleter( *this, allocator ); - return UniqueIndirectCommandsLayoutNVX( createIndirectCommandsLayoutNVX( createInfo, allocator ), deleter ); + return createResultValue( result, indirectCommandsLayout, "VULKAN_HPP_NAMESPACE::Device::createIndirectCommandsLayoutNVXUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29438,10 +29544,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, objectTable, "VULKAN_HPP_NAMESPACE::Device::createObjectTableNVX" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueObjectTableNVX Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const { + ObjectTableNVX objectTable; + Result result = static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &objectTable ) ) ); + ObjectTableNVXDeleter deleter( *this, allocator ); - return UniqueObjectTableNVX( createObjectTableNVX( createInfo, allocator ), deleter ); + return createResultValue( result, objectTable, "VULKAN_HPP_NAMESPACE::Device::createObjectTableNVXUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29805,10 +29914,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, descriptorUpdateTemplate, "VULKAN_HPP_NAMESPACE::Device::createDescriptorUpdateTemplateKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorUpdateTemplateKHR Device::createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator ) const { + DescriptorUpdateTemplateKHR descriptorUpdateTemplate; + Result result = static_cast( vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); + DescriptorUpdateTemplateKHRDeleter deleter( *this, allocator ); - return UniqueDescriptorUpdateTemplateKHR( createDescriptorUpdateTemplateKHR( createInfo, allocator ), deleter ); + return createResultValue( result, descriptorUpdateTemplate, "VULKAN_HPP_NAMESPACE::Device::createDescriptorUpdateTemplateKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29965,10 +30077,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, ycbcrConversion, "VULKAN_HPP_NAMESPACE::Device::createSamplerYcbcrConversionKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSamplerYcbcrConversionKHR Device::createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator ) const { + SamplerYcbcrConversionKHR ycbcrConversion; + Result result = static_cast( vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); + SamplerYcbcrConversionKHRDeleter deleter( *this, allocator ); - return UniqueSamplerYcbcrConversionKHR( createSamplerYcbcrConversionKHR( createInfo, allocator ), deleter ); + return createResultValue( result, ycbcrConversion, "VULKAN_HPP_NAMESPACE::Device::createSamplerYcbcrConversionKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29996,10 +30111,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, validationCache, "VULKAN_HPP_NAMESPACE::Device::createValidationCacheEXT" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueValidationCacheEXT Device::createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator ) const { + ValidationCacheEXT validationCache; + Result result = static_cast( vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); + ValidationCacheEXTDeleter deleter( *this, allocator ); - return UniqueValidationCacheEXT( createValidationCacheEXT( createInfo, allocator ), deleter ); + return createResultValue( result, validationCache, "VULKAN_HPP_NAMESPACE::Device::createValidationCacheEXTUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -30177,7 +30295,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDevice( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDevice createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -30542,10 +30660,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, device, "VULKAN_HPP_NAMESPACE::PhysicalDevice::createDevice" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDevice PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator ) const { + Device device; + Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); + DeviceDeleter deleter( allocator ); - return UniqueDevice( createDevice( createInfo, allocator ), deleter ); + return createResultValue( result, device, "VULKAN_HPP_NAMESPACE::PhysicalDevice::createDeviceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31458,7 +31579,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ @@ -31467,7 +31588,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31476,7 +31597,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MIR_KHR*/ @@ -31491,7 +31612,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_VI_NN*/ @@ -31501,7 +31622,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ @@ -31511,7 +31632,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -31521,7 +31642,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ @@ -31531,7 +31652,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XCB_KHR*/ @@ -31540,7 +31661,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDebugReportCallbackEXT createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31565,7 +31686,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_IOS_MVK*/ @@ -31575,7 +31696,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MACOS_MVK*/ @@ -31710,10 +31831,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createAndroidSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createAndroidSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createAndroidSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31731,10 +31855,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createDisplayPlaneSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createDisplayPlaneSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createDisplayPlaneSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31752,10 +31879,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMirSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createMirSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMirSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31785,10 +31915,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createViSurfaceNN" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createViSurfaceNN( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createViSurfaceNNUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31807,10 +31940,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWaylandSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createWaylandSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWaylandSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31829,10 +31965,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWin32SurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createWin32SurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWin32SurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31851,10 +31990,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXlibSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createXlibSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXlibSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31873,10 +32015,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXcbSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createXcbSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXcbSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31894,10 +32039,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, callback, "VULKAN_HPP_NAMESPACE::Instance::createDebugReportCallbackEXT" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDebugReportCallbackEXT Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const { + DebugReportCallbackEXT callback; + Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); + DebugReportCallbackEXTDeleter deleter( *this, allocator ); - return UniqueDebugReportCallbackEXT( createDebugReportCallbackEXT( createInfo, allocator ), deleter ); + return createResultValue( result, callback, "VULKAN_HPP_NAMESPACE::Instance::createDebugReportCallbackEXTUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31971,10 +32119,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createIOSSurfaceMVK" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createIOSSurfaceMVK( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createIOSSurfaceMVKUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -31993,10 +32144,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMacOSSurfaceMVK" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createMacOSSurfaceMVK( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMacOSSurfaceMVKUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -32076,7 +32230,7 @@ namespace VULKAN_HPP_NAMESPACE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); + ResultValueType::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -32113,10 +32267,13 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, instance, "VULKAN_HPP_NAMESPACE::createInstance" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator ) + VULKAN_HPP_INLINE ResultValueType::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator ) { + Instance instance; + Result result = static_cast( vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); + InstanceDeleter deleter( allocator ); - return UniqueInstance( createInstance( createInfo, allocator ), deleter ); + return createResultValue( result, instance, "VULKAN_HPP_NAMESPACE::createInstanceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/