From fba2516d9c04f26f6f9309a094ca783e11aefe1d Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Mon, 20 Jul 2020 13:48:03 +0200 Subject: [PATCH] Remove implicit cast operators on ResultValue As it turned out to not provide a complete solution to the C++-API-change issue on logical-change of the C-API, we simply remove those implicit cast operators. That is, accessing the result and the value need to be explicit. --- README.md | 3 +- VulkanHppGenerator.cpp | 83 ++++++++++++-- samples/14_InitPipeline/14_InitPipeline.cpp | 11 +- .../PipelineDerivative/PipelineDerivative.cpp | 23 +++- samples/RayTracing/RayTracing.cpp | 11 +- tests/DeviceFunctions/DeviceFunctions.cpp | 2 + tests/ResultValue/CMakeLists.txt | 34 ------ tests/ResultValue/ResultValue.cpp | 67 ----------- vulkan/vulkan.hpp | 106 +++++++++++++++--- 9 files changed, 206 insertions(+), 134 deletions(-) delete mode 100644 tests/ResultValue/CMakeLists.txt delete mode 100644 tests/ResultValue/ResultValue.cpp diff --git a/README.md b/README.md index 9f3714b..b172e4a 100644 --- a/README.md +++ b/README.md @@ -271,8 +271,7 @@ switch (result.result) } ``` -Note, that there are implicit cast operators in vk::ResultValue, which allow direct assignments of the returned value. That way, any success code is imlicitly ignored. If you want to make sure, you don't miss any such cases and correctly handle or explicitly ignore the success codes, define VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST before including vulkan.hpp. -As time passes, some vulkan functions might change, such that they start to support more result codes than `vk::Result::eSuccess` as a success code. That logical change would not be visible in the C-API, but in the C++-API, as such a function would now return a `vk::ResultValue` instead of just `SomeType`. If you have VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST defined, you suddenly get compiler errors, that force you to handle the changed logic. +As time passes, some vulkan functions might change, such that they start to support more result codes than `vk::Result::eSuccess` as a success code. That logical change would not be visible in the C-API, but in the C++-API, as such a function would now return a `vk::ResultValue` instead of just `SomeType`. In such (rare) cases, you would have to adjust your cpp-sources to reflect that API change. If exception handling is disabled by defining `VULKAN_HPP_NO_EXCEPTIONS` the type of `ResultValue::type` is a struct holding a `vk::Result` and a `SomeType`. This struct supports unpacking the return values by using `std::tie`. diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 64627e0..fd85455 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -2557,7 +2557,7 @@ ${i} ${uniqueTypeVariable}s.push_back( UniqueHandle<${type}, Dispatch>( ${t ${i} } ${i} } -${i} return createResultValue( result, ${uniqueTypeVariable}s, VULKAN_HPP_NAMESPACE_STRING "::${class}::${commandName}Unique"${successCodes} ); +${i} return createResultValue( result, std::move( ${uniqueTypeVariable}s ), VULKAN_HPP_NAMESPACE_STRING "::${class}::${commandName}Unique"${successCodes} ); )"; std::string type = ( returnParamIndex != INVALID_INDEX ) ? commandData.params[returnParamIndex].type.type : ""; @@ -8631,21 +8631,25 @@ namespace std operator std::tuple() VULKAN_HPP_NOEXCEPT { return std::tuple(result, value); } #if !defined(VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST) + VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") operator T const& () const & VULKAN_HPP_NOEXCEPT { return value; } + VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") operator T& () & VULKAN_HPP_NOEXCEPT { return value; } + VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") operator T const&& () const && VULKAN_HPP_NOEXCEPT { return std::move( value ); } + VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") operator T&& () && VULKAN_HPP_NOEXCEPT { return std::move( value ); @@ -8672,17 +8676,40 @@ namespace std operator std::tuple&>() VULKAN_HPP_NOEXCEPT { return std::tuple&>(result, value); } # if !defined(VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST) + VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") operator UniqueHandle& () & VULKAN_HPP_NOEXCEPT { return value; } + VULKAN_HPP_DEPRECATED("Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue.") operator UniqueHandle() VULKAN_HPP_NOEXCEPT { return std::move(value); } # endif }; + + template + struct ResultValue>> + { +# ifdef VULKAN_HPP_HAS_NOEXCEPT + ResultValue( Result r, std::vector> && v ) VULKAN_HPP_NOEXCEPT +# else + ResultValue( Result r, std::vector> && v ) +# endif + : result( r ) + , value( std::move( v ) ) + {} + + Result result; + std::vector> value; + + operator std::tuple> &>() VULKAN_HPP_NOEXCEPT + { + return std::tuple> &>( result, value ); + } + }; #endif template @@ -8782,19 +8809,59 @@ namespace std } template - VULKAN_HPP_INLINE ResultValue> createResultValue( Result result, T & data, char const * message, std::initializer_list successCodes, typename UniqueHandleTraits::deleter const& deleter ) + VULKAN_HPP_INLINE ResultValue> + createResultValue( Result result, + T & data, + char const * message, + std::initializer_list successCodes, + typename UniqueHandleTraits::deleter const & deleter ) { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - ignore(message); +# ifdef VULKAN_HPP_NO_EXCEPTIONS + ignore( message ); VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); - return ResultValue>( result, UniqueHandle(data, deleter) ); -#else +# else if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) { throwResultException( result, message ); } - return ResultValue>( result, UniqueHandle(data, deleter) ); -#endif +# endif + return ResultValue>( result, UniqueHandle( data, deleter ) ); + } + + template + VULKAN_HPP_INLINE typename ResultValueType>>::type + createResultValue( Result result, std::vector> && data, char const * message ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + ignore( message ); + VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess ); + return ResultValue>>( result, std::move( data ) ); +# else + if ( result != Result::eSuccess ) + { + throwResultException( result, message ); + } + return std::move( data ); +# endif + } + + template + VULKAN_HPP_INLINE ResultValue>> + createResultValue( Result result, + std::vector> && data, + char const * message, + std::initializer_list successCodes ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + ignore( message ); + VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); +# else + if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) + { + throwResultException( result, message ); + } +# endif + return ResultValue>>( result, std::move( data ) ); } #endif )"; diff --git a/samples/14_InitPipeline/14_InitPipeline.cpp b/samples/14_InitPipeline/14_InitPipeline.cpp index 036314a..639889b 100644 --- a/samples/14_InitPipeline/14_InitPipeline.cpp +++ b/samples/14_InitPipeline/14_InitPipeline.cpp @@ -161,7 +161,16 @@ int main( int /*argc*/, char ** /*argv*/ ) renderPass.get() // renderPass ); - vk::UniquePipeline pipeline = device->createGraphicsPipelineUnique( nullptr, graphicsPipelineCreateInfo ); + vk::ResultValue pipeline = + device->createGraphicsPipelineUnique( nullptr, graphicsPipelineCreateInfo ); + switch ( pipeline.result ) + { + case vk::Result::eSuccess: break; + case vk::Result::ePipelineCompileRequiredEXT: + // something meaningfull here + break; + default: assert( false ); // should never happen + } /* VULKAN_KEY_END */ } diff --git a/samples/PipelineDerivative/PipelineDerivative.cpp b/samples/PipelineDerivative/PipelineDerivative.cpp index d124869..d3645d2 100644 --- a/samples/PipelineDerivative/PipelineDerivative.cpp +++ b/samples/PipelineDerivative/PipelineDerivative.cpp @@ -204,8 +204,17 @@ int main( int /*argc*/, char ** /*argv*/ ) pipelineLayout.get(), renderPass.get() ); - vk::UniquePipeline basePipeline = + vk::UniquePipeline basePipeline; + vk::ResultValue rvPipeline = device->createGraphicsPipelineUnique( pipelineCache.get(), graphicsPipelineCreateInfo ); + switch ( rvPipeline.result ) + { + case vk::Result::eSuccess: basePipeline = std::move( rvPipeline.value ); break; + case vk::Result::ePipelineCompileRequiredEXT: + // something meaningfull here + break; + default: assert( false ); // should never happen + } // Now create the derivative pipeline, using a different fragment shader // This shader will shade the cube faces with interpolated colors @@ -236,8 +245,16 @@ void main() graphicsPipelineCreateInfo.basePipelineIndex = -1; // And create the derived pipeline - vk::UniquePipeline derivedPipeline = - device->createGraphicsPipelineUnique( pipelineCache.get(), graphicsPipelineCreateInfo ); + vk::UniquePipeline derivedPipeline; + rvPipeline = device->createGraphicsPipelineUnique( *pipelineCache, graphicsPipelineCreateInfo ); + switch ( rvPipeline.result ) + { + case vk::Result::eSuccess: derivedPipeline = std::move( rvPipeline.value ); break; + case vk::Result::ePipelineCompileRequiredEXT: + // something meaningfull here + break; + default: assert( false ); // should never happen + } /* VULKAN_KEY_END */ diff --git a/samples/RayTracing/RayTracing.cpp b/samples/RayTracing/RayTracing.cpp index 894c52d..1df8530 100644 --- a/samples/RayTracing/RayTracing.cpp +++ b/samples/RayTracing/RayTracing.cpp @@ -1097,8 +1097,17 @@ int main( int /*argc*/, char ** /*argv*/ ) uint32_t maxRecursionDepth = 2; vk::RayTracingPipelineCreateInfoNV rayTracingPipelineCreateInfo( {}, shaderStages, shaderGroups, maxRecursionDepth, *rayTracingPipelineLayout ); - vk::UniquePipeline rayTracingPipeline = + vk::UniquePipeline rayTracingPipeline; + vk::ResultValue rvPipeline = device->createRayTracingPipelineNVUnique( nullptr, rayTracingPipelineCreateInfo ); + switch ( rvPipeline.result ) + { + case vk::Result::eSuccess: rayTracingPipeline = std::move( rvPipeline.value ); break; + case vk::Result::ePipelineCompileRequiredEXT: + // something meaningfull here + break; + default: assert( false ); // should never happen + } uint32_t shaderGroupHandleSize = physicalDevice.getProperties2() diff --git a/tests/DeviceFunctions/DeviceFunctions.cpp b/tests/DeviceFunctions/DeviceFunctions.cpp index d6fe4fb..6ed9f66 100644 --- a/tests/DeviceFunctions/DeviceFunctions.cpp +++ b/tests/DeviceFunctions/DeviceFunctions.cpp @@ -67,6 +67,8 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DeviceMemory deviceMemory = device->allocateMemory( {} ); vk::UniqueDeviceMemory uniqueDeviceMemory = vk::UniqueDeviceMemory( deviceMemory, *device ); + + vk::ResultValue> pipelines = device->createGraphicsPipelinesUnique( nullptr, {} ); } catch ( vk::SystemError const & err ) { diff --git a/tests/ResultValue/CMakeLists.txt b/tests/ResultValue/CMakeLists.txt deleted file mode 100644 index 3da9aaa..0000000 --- a/tests/ResultValue/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright(c) 2020, Collabora Ltd. 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. - -cmake_minimum_required(VERSION 3.2) - -project(ResultValue) - -set(HEADERS -) - -set(SOURCES - ResultValue.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(ResultValue - ${HEADERS} - ${SOURCES} -) - -set_target_properties(ResultValue PROPERTIES FOLDER "Tests") diff --git a/tests/ResultValue/ResultValue.cpp b/tests/ResultValue/ResultValue.cpp deleted file mode 100644 index ec2afb8..0000000 --- a/tests/ResultValue/ResultValue.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright(c) 2020, Collabora Ltd. 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 Tests : ResultValue -// Compile-test for ResultValue - -#define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 - -#include "vulkan/vulkan.hpp" - -VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE - -void as_value( int ) {} -void as_ref( int & ) {} -void as_rvref( int && ) {} -void as_cref( const int & ) {} -void as_crvref( const int && ) {} - -void as_cref( const vk::UniquePipeline & ) {} - -int main( int /*argc*/, char ** /*argv*/ ) -{ -#if defined( VULKAN_DISABLE_IMPLICIT_RESULT_VALUE_CAST ) - static_assert( false, "Conversions not enabled" ); -#endif - - using result = vk::ResultValue; - - auto val = result{ vk::Result{}, 42 }; - const auto cval = result{ vk::Result{}, 42 }; - - as_value( val ); - as_value( cval ); - - as_ref( val ); - // as_ref(cval); // should fail - as_cref( val ); - as_cref( cval ); - - as_rvref( std::move( val ) ); - // as_rvref(std::move(cval)); // should fail - as_crvref( std::move( val ) ); - as_crvref( std::move( cval ) ); - - vk::Pipeline pipe( VkPipeline( 0x8 ) ); // fake a Pipeline here, to have something different from zero - vk::UniquePipeline pipeline( pipe ); - vk::ResultValue rv( {}, std::move( pipeline ) ); - - as_cref( rv ); // does not move out handle - assert( rv.value ); - - auto p = std::move( rv.value ); - p.release(); // release the faked Pipeline, to prevent error on trying to destroy it - - return 0; -} diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 5536d77..c339df5 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -16299,21 +16299,29 @@ namespace VULKAN_HPP_NAMESPACE } #if !defined( VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST ) + VULKAN_HPP_DEPRECATED( + "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) operator T const &() const & VULKAN_HPP_NOEXCEPT { return value; } + VULKAN_HPP_DEPRECATED( + "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) operator T &() & VULKAN_HPP_NOEXCEPT { return value; } + VULKAN_HPP_DEPRECATED( + "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) operator T const &&() const && VULKAN_HPP_NOEXCEPT { return std::move( value ); } + VULKAN_HPP_DEPRECATED( + "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) operator T &&() && VULKAN_HPP_NOEXCEPT { return std::move( value ); @@ -16343,17 +16351,42 @@ namespace VULKAN_HPP_NAMESPACE } # if !defined( VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST ) + VULKAN_HPP_DEPRECATED( + "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) operator UniqueHandle &() & VULKAN_HPP_NOEXCEPT { return value; } + VULKAN_HPP_DEPRECATED( + "Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue." ) operator UniqueHandle() VULKAN_HPP_NOEXCEPT { return std::move( value ); } # endif }; + + template + struct ResultValue>> + { +# ifdef VULKAN_HPP_HAS_NOEXCEPT + ResultValue( Result r, std::vector> && v ) VULKAN_HPP_NOEXCEPT +# else + ResultValue( Result r, std::vector> && v ) +# endif + : result( r ) + , value( std::move( v ) ) + {} + + Result result; + std::vector> value; + + operator std::tuple> &>() VULKAN_HPP_NOEXCEPT + { + return std::tuple> &>( result, value ); + } + }; #endif template @@ -16467,14 +16500,49 @@ namespace VULKAN_HPP_NAMESPACE # ifdef VULKAN_HPP_NO_EXCEPTIONS ignore( message ); VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); - return ResultValue>( result, UniqueHandle( data, deleter ) ); # else if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) { throwResultException( result, message ); } - return ResultValue>( result, UniqueHandle( data, deleter ) ); # endif + return ResultValue>( result, UniqueHandle( data, deleter ) ); + } + + template + VULKAN_HPP_INLINE typename ResultValueType>>::type + createResultValue( Result result, std::vector> && data, char const * message ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + ignore( message ); + VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess ); + return ResultValue>>( result, std::move( data ) ); +# else + if ( result != Result::eSuccess ) + { + throwResultException( result, message ); + } + return std::move( data ); +# endif + } + + template + VULKAN_HPP_INLINE ResultValue>> + createResultValue( Result result, + std::vector> && data, + char const * message, + std::initializer_list successCodes ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + ignore( message ); + VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); +# else + if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) + { + throwResultException( result, message ); + } +# endif + return ResultValue>>( result, std::move( data ) ); } #endif @@ -89785,7 +89853,7 @@ namespace VULKAN_HPP_NAMESPACE } return createResultValue( - result, uniqueCommandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); + result, std::move( uniqueCommandBuffers ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); } template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -89811,7 +89879,7 @@ namespace VULKAN_HPP_NAMESPACE } return createResultValue( - result, uniqueCommandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); + result, std::move( uniqueCommandBuffers ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); } # endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -89877,7 +89945,7 @@ namespace VULKAN_HPP_NAMESPACE } return createResultValue( - result, uniqueDescriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); + result, std::move( uniqueDescriptorSets ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); } template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -89903,7 +89971,7 @@ namespace VULKAN_HPP_NAMESPACE } return createResultValue( - result, uniqueDescriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); + result, std::move( uniqueDescriptorSets ), VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); } # endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -90645,7 +90713,7 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, - uniquePipelines, + std::move( uniquePipelines ), VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); } @@ -90680,7 +90748,7 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, - uniquePipelines, + std::move( uniquePipelines ), VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); } @@ -91224,7 +91292,7 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, - uniquePipelines, + std::move( uniquePipelines ), VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); } @@ -91259,7 +91327,7 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, - uniquePipelines, + std::move( uniquePipelines ), VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); } @@ -91768,7 +91836,7 @@ namespace VULKAN_HPP_NAMESPACE } return createResultValue( result, - uniquePipelines, + std::move( uniquePipelines ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -91807,7 +91875,7 @@ namespace VULKAN_HPP_NAMESPACE } return createResultValue( result, - uniquePipelines, + std::move( uniquePipelines ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, @@ -91957,7 +92025,7 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, - uniquePipelines, + std::move( uniquePipelines ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); } @@ -91992,7 +92060,7 @@ namespace VULKAN_HPP_NAMESPACE return createResultValue( result, - uniquePipelines, + std::move( uniquePipelines ), VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); } @@ -92522,8 +92590,9 @@ namespace VULKAN_HPP_NAMESPACE } } - return createResultValue( - result, uniqueSwapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); + return createResultValue( result, + std::move( uniqueSwapchainKHRs ), + VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); } template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE @@ -92552,8 +92621,9 @@ namespace VULKAN_HPP_NAMESPACE } } - return createResultValue( - result, uniqueSwapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); + return createResultValue( result, + std::move( uniqueSwapchainKHRs ), + VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); } template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE