diff --git a/RAII_Samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp b/RAII_Samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp index 4d5f003..cd621b6 100644 --- a/RAII_Samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp +++ b/RAII_Samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp @@ -48,8 +48,8 @@ int main( int /*argc*/, char ** /*argv*/ ) << "physicalDevices:\n"; for ( size_t j = 0; j < groupProperties[i].physicalDeviceCount; j++ ) { - vk::raii::PhysicalDevice physicalDevice( static_cast( groupProperties[i].physicalDevices[j] ), - instance.getDispatcher() ); + vk::raii::PhysicalDevice physicalDevice( + instance, static_cast( groupProperties[i].physicalDevices[j] ) ); std::cout << "\t\t" << j << " : " << physicalDevice.getProperties().deviceName << "\n"; } std::cout << "\t" @@ -58,8 +58,8 @@ int main( int /*argc*/, char ** /*argv*/ ) if ( 1 < groupProperties[i].physicalDeviceCount ) { - vk::raii::PhysicalDevice physicalDevice( static_cast( groupProperties[i].physicalDevices[0] ), - instance.getDispatcher() ); + vk::raii::PhysicalDevice physicalDevice( + instance, static_cast( groupProperties[i].physicalDevices[0] ) ); // get the QueueFamilyProperties of the first PhysicalDevice std::vector queueFamilyProperties = physicalDevice.getQueueFamilyProperties(); diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 8a3bcf7..95fdbb8 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -2236,39 +2236,73 @@ std::string VulkanHppGenerator::generateBitmasks( std::vector const return addTitleAndProtection( title, str ); } -std::string VulkanHppGenerator::generateCallArgumentsEnhanced( std::vector const & params, - size_t initialSkipCount, - bool nonConstPointerAsNullptr, - std::set const & singularParams, - bool raiiHandleMemberFunction ) const +std::string VulkanHppGenerator::generateCallArgumentsEnhanced( CommandData const & commandData, + size_t initialSkipCount, + bool nonConstPointerAsNullptr, + std::set const & singularParams, + bool raiiHandleMemberFunction ) const { - assert( initialSkipCount <= params.size() ); + assert( initialSkipCount <= commandData.params.size() ); std::string arguments; bool encounteredArgument = false; - for ( size_t i = 0; i < initialSkipCount; ++i ) + if ( raiiHandleMemberFunction ) { - if ( encounteredArgument ) + switch ( initialSkipCount ) { - arguments += ", "; + case 1: + assert( isHandleType( commandData.params[0].type.type ) && commandData.params[0].type.isValue() ); + assert( commandData.params[0].arraySizes.empty() && commandData.params[0].len.empty() ); + assert( commandData.params[0].type.type == commandData.handle ); + arguments = "static_cast<" + commandData.handle + ">( m_" + + startLowerCase( stripPrefix( commandData.handle, "Vk" ) ) + " )"; + encounteredArgument = true; + break; + case 2: + assert( isHandleType( commandData.params[0].type.type ) && commandData.params[0].type.isValue() ); + assert( commandData.params[0].arraySizes.empty() && commandData.params[0].len.empty() ); + assert( commandData.params[0].type.type == commandData.handle ); + if ( skipLeadingGrandParent( *m_handles.find( commandData.params[1].type.type ) ) ) + { + auto [parentType, parentName] = getParentTypeAndName( *m_handles.find( commandData.params[1].type.type ) ); + arguments = "static_cast<" + commandData.handle + ">( **m_" + parentName + "->get" + + stripPrefix( commandData.handle, "Vk" ) + "() )"; + } + else + { + arguments = "static_cast<" + commandData.handle + ">( **m_" + + startLowerCase( stripPrefix( commandData.handle, "Vk" ) ) + " )"; + } + + assert( isHandleType( commandData.params[1].type.type ) && commandData.params[1].type.isValue() ); + assert( commandData.params[1].arraySizes.empty() && commandData.params[1].len.empty() ); + arguments += ", static_cast<" + commandData.params[1].type.type + ">( m_" + + startLowerCase( stripPrefix( commandData.params[1].type.type, "Vk" ) ) + " )"; + encounteredArgument = true; + break; } - assert( isHandleType( params[i].type.type ) && params[i].type.isValue() ); - assert( params[i].arraySizes.empty() && params[i].len.empty() ); - std::string argument = "m_" + startLowerCase( stripPrefix( params[i].type.type, "Vk" ) ); - if ( raiiHandleMemberFunction ) - { - argument = "static_cast<" + params[i].type.type + ">( " + argument + " )"; - } - arguments += argument; - encounteredArgument = true; } - for ( size_t i = initialSkipCount; i < params.size(); ++i ) + else + { + for ( size_t i = 0; i < initialSkipCount; ++i ) + { + if ( encounteredArgument ) + { + arguments += ", "; + } + assert( isHandleType( commandData.params[i].type.type ) && commandData.params[i].type.isValue() ); + assert( commandData.params[i].arraySizes.empty() && commandData.params[i].len.empty() ); + arguments += "m_" + startLowerCase( stripPrefix( commandData.params[i].type.type, "Vk" ) ); + encounteredArgument = true; + } + } + for ( size_t i = initialSkipCount; i < commandData.params.size(); ++i ) { if ( encounteredArgument ) { arguments += ", "; } - arguments += - generateCallArgumentEnhanced( params, i, nonConstPointerAsNullptr, singularParams, raiiHandleMemberFunction ); + arguments += generateCallArgumentEnhanced( + commandData.params, i, nonConstPointerAsNullptr, singularParams, raiiHandleMemberFunction ); encounteredArgument = true; } return arguments; @@ -2786,7 +2820,7 @@ std::string VulkanHppGenerator::generateCommandResult( std::string const & return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -2878,11 +2912,9 @@ std::string VulkanHppGenerator::generateCommandResultEnumerate( std::string cons { "const", commandData.handle.empty() ? "" : " const" }, { "counterName", startLowerCase( stripPrefix( commandData.params[vectorParamIndices.second].name, "p" ) ) }, { "counterType", commandData.params[vectorParamIndices.second].type.type }, - { "firstCallArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, true, {}, false ) }, + { "firstCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, true, {}, false ) }, { "nodiscard", nodiscard }, - { "secondCallArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "secondCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "typenameCheck", typenameCheck }, { "vectorAllocator", withAllocator ? ( "( " + startLowerCase( allocatorType ) + " )" ) : "" }, { "vectorElementType", vectorElementType }, @@ -2995,13 +3027,11 @@ std::string { "counterName", startLowerCase( stripPrefix( stripPluralS( commandData.params[firstVectorParamIt->second].name ), "p" ) ) }, { "counterType", commandData.params[firstVectorParamIt->second].type.type }, - { "firstCallArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, true, {}, false ) }, + { "firstCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, true, {}, false ) }, { "firstVectorName", startLowerCase( stripPrefix( commandData.params[firstVectorParamIt->first].name, "p" ) ) }, { "nodiscard", nodiscard }, { "pairConstructor", pairConstructor }, - { "secondCallArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "secondCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "secondVectorName", startLowerCase( stripPrefix( commandData.params[secondVectorParamIt->first].name, "p" ) ) }, { "templateTypeFirst", templateTypeFirst }, @@ -3147,7 +3177,7 @@ std::string VulkanHppGenerator::generateCommandResultGetChain( std::string const return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -3231,7 +3261,7 @@ std::string VulkanHppGenerator::generateCommandResultGetHandleUnique( std::strin functionTemplate, { { "allocator", allocator }, { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", className }, { "classSeparator", className.empty() ? "" : "::" }, { "commandName", commandName }, @@ -3304,7 +3334,7 @@ std::string VulkanHppGenerator::generateCommandResultGetSingularAndValue( functionTemplate, { { "argumentList", argumentList }, { "callArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, singularParameters, false ) }, + generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParameters, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -3370,7 +3400,7 @@ std::string return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -3437,7 +3467,7 @@ std::string VulkanHppGenerator::generateCommandResultGetValue( std::string const return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -3563,7 +3593,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVector( std::string cons return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -3642,7 +3672,7 @@ std::string { { "allocateInitializer", withAllocator ? ( ", " + startLowerCase( allocatorType ) ) : "" }, { "allocatorType", allocatorType }, { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -3785,7 +3815,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesOrValues( return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -3837,12 +3867,13 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesOrValuesS std::set skippedParams = determineSkippedParams( commandData.params, initialSkipCount, vectorParamIndices, { returnParamIndex }, true ); std::set singularParams = determineSingularParams( returnParamIndex, vectorParamIndices ); - std::string argumentList = + std::string argumentList = generateArgumentListEnhanced( commandData.params, skippedParams, singularParams, definition, false, false, true ); std::string commandName = stripPluralS( generateCommandName( name, commandData.params, initialSkipCount, m_tags ) ); std::string nodiscard = generateNoDiscard( 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() ); assert( beginsWith( commandData.params[returnParamIndex].type.type, "Vk" ) ); - std::string dataType = stripPostfix( commandData.params[returnParamIndex].type.compose( "VULKAN_HPP_NAMESPACE"), " *" ); + std::string dataType = + stripPostfix( commandData.params[returnParamIndex].type.compose( "VULKAN_HPP_NAMESPACE" ), " *" ); std::string returnType = generateReturnType( commandData.successCodes, dataType ); if ( definition ) @@ -3861,7 +3892,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesOrValuesS functionTemplate, { { "argumentList", argumentList }, { "callArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, singularParams, false ) }, + generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParams, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -3967,7 +3998,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesUnique( return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", className }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, { "commandName", commandName }, @@ -4048,7 +4079,7 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesUniqueSin functionTemplate, { { "argumentList", argumentList }, { "callArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, singularParams, false ) }, + generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParams, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -4114,7 +4145,7 @@ std::string functionTemplate, { { "argumentList", argumentList }, { "callArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, singularParams, false ) }, + generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParams, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -5248,7 +5279,7 @@ std::string VulkanHppGenerator::generateCommandType( std::string const & name, return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -5338,7 +5369,7 @@ std::string VulkanHppGenerator::generateCommandVoid( std::string const & return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -5630,10 +5661,8 @@ std::string VulkanHppGenerator::generateCommandVoidEnumerate( std::string const { "commandName", commandName }, { "counterName", startLowerCase( stripPrefix( commandData.params[vectorParamIndex.second].name, "p" ) ) }, { "counterType", commandData.params[vectorParamIndex.second].type.type }, - { "firstCallArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, true, {}, false ) }, - { "secondCallArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "firstCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, true, {}, false ) }, + { "secondCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "typenameCheck", typenameCheck }, { "vectorAllocator", withAllocators @@ -5725,10 +5754,8 @@ std::string VulkanHppGenerator::generateCommandVoidEnumerateChained( std::string { "commandName", commandName }, { "counterName", startLowerCase( stripPrefix( commandData.params[vectorParamIndex.second].name, "p" ) ) }, { "counterType", commandData.params[vectorParamIndex.second].type.type }, - { "firstCallArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, true, {}, false ) }, - { "secondCallArguments", - generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "firstCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, true, {}, false ) }, + { "secondCallArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "structureChainAllocator", withAllocators ? ( ", structureChainAllocator" ) : "" }, { "typenameCheck", typenameCheck }, { "vectorElementType", vectorElementType }, @@ -5787,7 +5814,7 @@ std::string VulkanHppGenerator::generateCommandVoidGetChain( std::string const & return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" }, { "classSeparator", commandData.handle.empty() ? "" : "::" }, @@ -5878,7 +5905,7 @@ std::string VulkanHppGenerator::generateCommandVoidGetValue( std::string const & return replaceWithMap( functionTemplate, { { "argumentList", argumentList }, - { "callArguments", generateCallArgumentsEnhanced( commandData.params, initialSkipCount, false, {}, false ) }, + { "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, {}, false ) }, { "className", className }, { "classSeparator", classSeparator }, { "commandName", commandName }, @@ -5969,7 +5996,7 @@ std::string VulkanHppGenerator::generateDispatchLoaderDynamicCommandAssignment( CommandData const & commandData, std::string const & firstArg ) const { - if (commandName == "vkGetInstanceProcAddr") + if ( commandName == "vkGetInstanceProcAddr" ) { // Don't overwite vkGetInstanceProcAddr with NULL. return ""; @@ -7175,18 +7202,18 @@ std::string VulkanHppGenerator::generateRAIIHandle( std::pair( m_${parentName} ); - } -)"; - std::string parentType = stripPrefix( handle.second.destructorIt->second.params[0].type.type, "Vk" ); - getParent = replaceWithMap( getParentTemplate, - { { "parentName", startLowerCase( parentType ) }, { "parentType", parentType } } ); - } - const std::string handleTemplate = R"( ${enter} class ${handleType} { @@ -7246,7 +7259,6 @@ ${enter} class ${handleType} public: ${singularConstructors} -${upgradeConstructor} ${handleType}( std::nullptr_t ) {} ${destructor} @@ -7271,7 +7283,11 @@ ${moveAssignmentInstructions} } ${getConstructorSuccessCode} -${getParent} + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::${parentType} const * get${parentType}() const VULKAN_HPP_NOEXCEPT + { + return m_${parentName}; + } + ${dispatcherType} const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher${dispatcherAccess}getVkHeaderVersion() == VK_HEADER_VERSION ); @@ -7293,7 +7309,6 @@ ${leave})"; { "enter", enter }, { "getConstructorSuccessCode", getConstructorSuccessCode }, { "getDispatcherReturn", ( handleType == "Device" ) || ( handleType == "Instance" ) ? "&" : "" }, - { "getParent", getParent }, { "handleName", handleName }, { "handleType", handleType }, { "leave", leave }, @@ -7302,8 +7317,9 @@ ${leave})"; { "moveAssignmentInstructions", moveAssignmentInstructions }, { "moveConstructorInitializerList", moveConstructorInitializerList }, { "objTypeEnum", objTypeEnum }, - { "singularConstructors", singularConstructors }, - { "upgradeConstructor", upgradeConstructor } } ); + { "parentType", parentType }, + { "parentName", parentName }, + { "singularConstructors", singularConstructors } } ); if ( !arrayConstructors.empty() ) { @@ -7418,8 +7434,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); std::string vectorSizeCheckString = vectorSizeCheck.first @@ -7538,8 +7553,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string valueName = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[0]].name, "p" ) ); @@ -7605,7 +7619,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE )"; std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, singularParams, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, singularParams, true ); std::string dataName = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[0]].name, "p" ) ); @@ -7666,8 +7680,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string dataName = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[0]].name, "p" ) ); @@ -7812,9 +7825,9 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE std::string counterName = startLowerCase( stripPrefix( commandIt->second.params[vectorParamIndices.begin()->second].name, "p" ) ); std::string firstCallArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, true, {}, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, true, {}, true ); std::string secondCallArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string vectorName = startLowerCase( stripPrefix( commandIt->second.params[vectorParamIndices.begin()->first].name, "p" ) ); @@ -7950,11 +7963,11 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessWithE )"; std::string firstCallArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, true, {}, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, true, {}, true ); std::string firstVectorName = startLowerCase( stripPrefix( commandIt->second.params[firstVectorParamIt->first].name, "p" ) ); std::string secondCallArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string secondVectorName = startLowerCase( stripPrefix( commandIt->second.params[secondVectorParamIt->first].name, "p" ) ); @@ -8023,8 +8036,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessNoEr } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); std::string vectorSizeCheckString = vectorSizeCheck.first @@ -8105,8 +8117,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); std::string vectorSizeCheckString = vectorSizeCheck.first @@ -8171,9 +8182,8 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); - std::string returnType = stripPostfix( + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); + std::string returnType = stripPostfix( commandIt->second.params[nonConstPointerParamIndices[0]].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" ); std::string returnVariable = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[0]].name, "p" ) ); @@ -8373,8 +8383,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string valueName = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[0]].name, "p" ) ); @@ -8450,7 +8459,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith singularDefinitionTemplate, { { "argumentList", argumentList }, { "callArguments", - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, singularParams, true ) }, + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, singularParams, true ) }, { "className", stripPrefix( commandIt->second.params[initialSkipCount - 1].type.type, "Vk" ) }, { "commandName", commandName }, { "dataName", @@ -8511,8 +8520,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith return replaceWithMap( definitionTemplate, { { "argumentList", argumentList }, - { "callArguments", - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ) }, + { "callArguments", generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ) }, { "className", stripPrefix( commandIt->second.params[initialSkipCount - 1].type.type, "Vk" ) }, { "commandName", commandName }, { "elementType", elementType }, @@ -8572,7 +8580,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith )"; std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, singularParams, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, singularParams, true ); std::string dataName = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[0]].name, "p" ) ); @@ -8634,8 +8642,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string dataName = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[0]].name, "p" ) ); @@ -8750,7 +8757,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith )"; std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, singularParams, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, singularParams, true ); std::string valueName = startLowerCase( stripPrefix( commandIt->second.params[returnParamIndices[1]].name, "p" ) ); std::string singularName = startLowerCase( stripPluralS( stripPrefix( commandIt->second.params[returnParamIndices[0]].name, "p" ) ) ); @@ -8820,8 +8827,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultSingleSuccessWith } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string valueName = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[1]].name, "p" ) ); std::string vectorName = @@ -8909,8 +8915,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandValue0Return0VectorType } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); std::string vectorSizeCheckString = vectorSizeCheck.first @@ -8968,8 +8973,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandValue0Return0VectorVkTy } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); std::string vectorSizeCheckString = vectorSizeCheck.first @@ -9093,8 +9097,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid0Return( } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string vectorSizeCheckString = vectorSizeCheck.first ? generateVectorSizeCheck( @@ -9155,9 +9158,8 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid1ReturnChain( } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); - std::string returnType = stripPostfix( + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); + std::string returnType = stripPostfix( commandIt->second.params[nonConstPointerParamIndices[0]].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" ); std::string returnVariable = startLowerCase( stripPrefix( commandIt->second.params[nonConstPointerParamIndices[0]].name, "p" ) ); @@ -9223,8 +9225,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid1ReturnValue( return replaceWithMap( definitionTemplate, { { "argumentList", argumentList }, - { "callArguments", - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ) }, + { "callArguments", generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ) }, { "className", stripPrefix( commandIt->second.params[initialSkipCount - 1].type.type, "Vk" ) }, { "commandName", commandName }, { "functionPointerCheck", generateFunctionPointerCheck( commandIt->first, commandIt->second.referencedIn ) }, @@ -9297,9 +9298,9 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid2ReturnEnumerateCha )"; std::string firstCallArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, true, {}, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, true, {}, true ); std::string secondCallArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string vectorElementType = stripPostfix( commandIt->second.params[vectorParamIndices.begin()->first].type.compose( "VULKAN_HPP_NAMESPACE" ), "*" ); std::string vectorName = @@ -9363,7 +9364,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid2ReturnEnumerateVal getDispatcher()->${vkCommand}( ${firstCallArguments} ); std::vector<${vectorElementType}> ${vectorName}( ${counterName} ); getDispatcher()->${vkCommand}( ${secondCallArguments} ); - VULKAN_HPP_ASSERT( ${counterName} <= ${vectorName}.size() ); + VULKAN_HPP_ASSERT( ${counterName} == ${vectorName}.size() ); return ${vectorName}; } )"; @@ -9371,9 +9372,9 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandVoid2ReturnEnumerateVal std::string counterName = startLowerCase( stripPrefix( commandIt->second.params[vectorParamIndices.begin()->second].name, "p" ) ); std::string firstCallArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, true, {}, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, true, {}, true ); std::string secondCallArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::string vectorName = startLowerCase( stripPrefix( commandIt->second.params[vectorParamIndices.begin()->first].name, "p" ) ); @@ -9595,7 +9596,8 @@ std::pair std::string VulkanHppGenerator::generateRAIIHandleConstructorArgument( ParamData const & param, bool definition, - bool singular ) const + bool singular, + bool takesOwnership ) const { std::string argument; if ( param.type.isConstPointer() ) @@ -9631,12 +9633,20 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorArgument( ParamData } else if ( ( param.type.isValue() ) && isHandleType( param.type.type ) ) { - argument = "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::" + stripPrefix( param.type.type, "Vk" ); - if ( param.optional ) + if ( takesOwnership ) { - argument = "VULKAN_HPP_NAMESPACE::Optional"; + assert( !param.optional ); + argument = param.type.type + " " + param.name; + } + else + { + argument = "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::" + stripPrefix( param.type.type, "Vk" ); + if ( param.optional ) + { + argument = "VULKAN_HPP_NAMESPACE::Optional"; + } + argument += " const & " + param.name; } - argument += " const & " + param.name; } else { @@ -9646,88 +9656,99 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorArgument( ParamData return argument; } -std::string - VulkanHppGenerator::generateRAIIHandleConstructorArguments( std::pair const & handle, - std::vector const & params, - bool singular, - bool skipLeadingGrandParent, - bool encounteredArgument ) const +std::string VulkanHppGenerator::generateRAIIHandleConstructorArguments( + std::pair const & handle, + std::map::const_iterator constructorIt, + bool singular, + bool takesOwnership ) const { - std::string arguments; - for ( size_t i = skipLeadingGrandParent ? 1 : 0; i < params.size(); i++ ) + auto [parentType, parentName] = getParentTypeAndName( handle ); + + std::string arguments = "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::" + parentType + " const & " + parentName; + if ( takesOwnership ) { - ParamData const & param = params[i]; - if ( param.type.type != handle.first ) // filter out the constructed type + arguments += ", " + handle.first + " " + startLowerCase( stripPrefix( handle.first, "Vk" ) ); + } + + if ( constructorIt != m_commands.end() ) + { + parentType = "Vk" + parentType; + bool skip = skipLeadingGrandParent( handle ); + for ( size_t i = skip ? 1 : 0; i < constructorIt->second.params.size(); i++ ) { - // the specialPointerTypes are considered const-pointers! - if ( param.type.isNonConstPointer() && - ( specialPointerTypes.find( param.type.type ) == specialPointerTypes.end() ) ) + ParamData const & param = constructorIt->second.params[i]; + // filter parent and handle type + if ( ( param.type.type != parentType ) && ( param.type.type != handle.first ) ) { - // this is supposed to be the returned size on an enumeration function! + // the specialPointerTypes are considered const-pointers! + if ( param.type.isNonConstPointer() && + ( specialPointerTypes.find( param.type.type ) == specialPointerTypes.end() ) ) + { + // this is supposed to be the returned size on an enumeration function! #if !defined( NDEBUG ) - assert( param.type.type == "uint32_t" ); - auto typeIt = std::find_if( - params.begin(), params.end(), [&handle]( ParamData const & pd ) { return pd.type.type == handle.first; } ); - assert( typeIt != params.end() ); - assert( typeIt->len == param.name ); + assert( param.type.type == "uint32_t" ); + auto typeIt = std::find_if( constructorIt->second.params.begin(), + constructorIt->second.params.end(), + [&handle]( ParamData const & pd ) { return pd.type.type == handle.first; } ); + assert( typeIt != constructorIt->second.params.end() ); + assert( typeIt->len == param.name ); #endif - continue; + continue; + } + else if ( std::find_if( constructorIt->second.params.begin(), + constructorIt->second.params.end(), + [¶m]( ParamData const & pd ) + { return pd.len == param.name; } ) != constructorIt->second.params.end() ) + { + // this is the len of an other parameter, which will be mapped to an ArrayProxy + assert( param.type.isValue() && ( param.type.type == "uint32_t" ) ); + assert( param.arraySizes.empty() && param.len.empty() && !param.optional ); + continue; + } + arguments += ", " + generateRAIIHandleConstructorArgument( param, false, singular, takesOwnership ); } - else if ( std::find_if( params.begin(), - params.end(), - [¶m]( ParamData const & pd ) { return pd.len == param.name; } ) != params.end() ) - { - // this is the len of an other parameter, which will be mapped to an ArrayProxy - assert( param.type.isValue() && ( param.type.type == "uint32_t" ) ); - assert( param.arraySizes.empty() && param.len.empty() && !param.optional ); - continue; - } - if ( encounteredArgument ) - { - arguments += ", "; - } - arguments += generateRAIIHandleConstructorArgument( param, false, singular ); - encounteredArgument = true; } } return arguments; } -std::string VulkanHppGenerator::generateRAIIHandleConstructorCallArguments( std::string const & handleType, - std::vector const & params, - bool nonConstPointerAsNullptr, - std::set const & singularParams, - bool allocatorIsMemberVariable, - bool skipLeadingGrandParent ) const +std::string VulkanHppGenerator::generateRAIIHandleConstructorCallArguments( + std::pair const & handle, + std::map::const_iterator constructorIt, + bool nonConstPointerAsNullptr, + std::set const & singularParams, + bool allocatorIsMemberVariable ) const { std::string arguments; bool encounteredArgument = false; size_t i = 0; - if ( skipLeadingGrandParent ) + if ( skipLeadingGrandParent( handle ) ) { - assert( ( 1 < params.size() ) && ( m_handles.find( params[0].type.type ) != m_handles.end() ) && - ( m_handles.find( params[1].type.type ) != m_handles.end() ) ); - arguments += "static_cast<" + params[0].type.type + ">( " + params[1].name + ".get" + - stripPrefix( params[0].type.type, "Vk" ) + "() )"; + assert( ( 1 < constructorIt->second.params.size() ) && + ( m_handles.find( constructorIt->second.params[0].type.type ) != m_handles.end() ) && + ( m_handles.find( constructorIt->second.params[1].type.type ) != m_handles.end() ) ); + arguments += "static_cast<" + constructorIt->second.params[0].type.type + ">( **" + + constructorIt->second.params[1].name + ".get" + + stripPrefix( constructorIt->second.params[0].type.type, "Vk" ) + "() )"; encounteredArgument = true; i = 1; } - for ( ; i < params.size(); ++i ) + for ( ; i < constructorIt->second.params.size(); ++i ) { - ParamData const & param = params[i]; + ParamData const & param = constructorIt->second.params[i]; if ( encounteredArgument ) { arguments += ", "; } - if ( param.type.type == handleType ) + if ( param.type.type == handle.first ) { assert( param.type.isNonConstPointer() && param.arraySizes.empty() ); if ( param.len.empty() || !singularParams.empty() ) { assert( !param.optional ); - assert( singularParams.empty() || ( param.len == params[*singularParams.begin()].name ) ); + assert( singularParams.empty() || ( param.len == constructorIt->second.params[*singularParams.begin()].name ) ); arguments += - "reinterpret_cast<" + handleType + "*>( &m_" + startLowerCase( stripPrefix( handleType, "Vk" ) ) + " )"; + "reinterpret_cast<" + handle.first + "*>( &m_" + startLowerCase( stripPrefix( handle.first, "Vk" ) ) + " )"; } else if ( nonConstPointerAsNullptr ) { @@ -9767,7 +9788,8 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorCallArguments( std: else { assert( !param.optional ); - arguments += generateCallArgumentEnhanced( params, i, nonConstPointerAsNullptr, singularParams, true ); + arguments += + generateCallArgumentEnhanced( constructorIt->second.params, i, nonConstPointerAsNullptr, singularParams, true ); } encounteredArgument = true; } @@ -9811,7 +9833,7 @@ ${enter} ${handleType}s( ${constructorArguments} ) this->reserve( ${counterName} ); for ( auto const & ${handleName} : ${vectorName} ) { - this->emplace_back( ${handleConstructorArguments}, dispatcher ); + this->emplace_back( ${parentName}, ${handleConstructorArguments} ); } } else @@ -9823,40 +9845,43 @@ ${leave})"; return replaceWithMap( constructorTemplate, - { { "constructorArguments", - generateRAIIHandleConstructorArguments( handle, constructorIt->second.params, false, false, false ) }, + { { "constructorArguments", generateRAIIHandleConstructorArguments( handle, constructorIt, false, false ) }, { "constructorCall", constructorIt->first }, { "counterName", startLowerCase( stripPrefix( lenParamIt->name, "p" ) ) }, { "counterType", lenParamIt->type.type }, { "dispatcherType", dispatcherType }, { "enter", enter }, - { "firstCallArguments", - generateRAIIHandleConstructorCallArguments( - handle.first, constructorIt->second.params, true, {}, true, false ) }, + { "firstCallArguments", generateRAIIHandleConstructorCallArguments( handle, constructorIt, true, {}, true ) }, { "handleConstructorArguments", handleConstructorArguments }, { "handleName", startLowerCase( handleType ) }, { "handleType", handleType }, { "leave", leave }, { "parentName", constructorIt->second.params.front().name }, - { "secondCallArguments", - generateRAIIHandleConstructorCallArguments( - handle.first, constructorIt->second.params, false, {}, true, false ) }, + { "secondCallArguments", generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, {}, true ) }, { "vectorElementType", handleParamIt->type.type }, { "vectorName", startLowerCase( stripPrefix( handleParamIt->name, "p" ) ) } } ); } std::string VulkanHppGenerator::generateRAIIHandleConstructorInitializationList( - std::string const & handleType, + std::pair const & handle, std::map::const_iterator constructorIt, std::map::const_iterator destructorIt, - bool hasSecondLevelCommands ) const + bool takesOwnership ) const { - std::string initializationList; + auto [parentType, parentName] = getParentTypeAndName( handle ); + std::string handleName = startLowerCase( stripPrefix( handle.first, "Vk" ) ); + + std::string initializationList = "m_" + parentName + "( &" + parentName + " ), "; + if ( takesOwnership ) + { + initializationList += "m_" + handleName + "( " + handleName + " ), "; + } + if ( destructorIt != m_commands.end() ) { for ( auto destructorParam : destructorIt->second.params ) { - if ( destructorParam.type.type != handleType ) + if ( ( destructorParam.type.type != ( "Vk" + parentType ) ) && ( destructorParam.type.type != handle.first ) ) { if ( isHandleType( destructorParam.type.type ) ) { @@ -9871,7 +9896,7 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorInitializationList( { assert( constructorParamIt->type.isValue() && constructorParamIt->arraySizes.empty() && constructorParamIt->len.empty() && !constructorParamIt->optional ); - initializationList += "*" + constructorParamIt->name; + initializationList += constructorParamIt->name; } else { @@ -9918,11 +9943,6 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorInitializationList( } } } - else if ( hasSecondLevelCommands ) - { - auto const & param = constructorIt->second.params.front(); - initializationList = "m_" + startLowerCase( stripPrefix( param.type.type, "Vk" ) ) + "( *" + param.name + " ), "; - } return initializationList; } @@ -9932,58 +9952,32 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorResult( std::string const & enter, std::string const & leave ) const { - bool skipLeadingGrandParent = false; - if ( ( 1 < constructorIt->second.params.size() ) && isHandleType( constructorIt->second.params[0].type.type ) && - ( constructorIt->second.params[1].type.type == handle.second.parent ) ) - { - auto parentIt = m_handles.find( handle.second.parent ); - assert( parentIt != m_handles.end() ); - skipLeadingGrandParent = ( constructorIt->second.params[0].type.type == parentIt->second.parent ); - } + auto [parentType, parentName] = getParentTypeAndName( handle ); - std::string callArguments = - generateRAIIHandleConstructorCallArguments( handle.first, - constructorIt->second.params, - false, - {}, - handle.second.destructorIt != m_commands.end(), - skipLeadingGrandParent ); - - std::string constructorArguments, dispatcherArgument, dispatcherInit, getDispatcher; + std::string getDispatcher = parentName + ".getDispatcher()"; + std::string dispatcherArgument = getDispatcher; if ( handle.first == "VkInstance" ) { - constructorArguments = "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context"; - dispatcherArgument = "context.getDispatcher()->vkGetInstanceProcAddr"; - getDispatcher = "context.getDispatcher()"; + dispatcherArgument += "->vkGetInstanceProcAddr"; } - else + else if ( handle.first == "VkDevice" ) { - dispatcherArgument = - ( skipLeadingGrandParent ? constructorIt->second.params[1].name : constructorIt->second.params[0].name ) + - ".getDispatcher()"; - if ( handle.first == "VkDevice" ) - { - dispatcherArgument = dispatcherArgument + "->vkGetDeviceProcAddr"; - getDispatcher = "physicalDevice.getDispatcher()"; - } - else - { - getDispatcher = "getDispatcher()"; - } + dispatcherArgument += "->vkGetDeviceProcAddr"; } - constructorArguments += generateRAIIHandleConstructorArguments( - handle, constructorIt->second.params, false, skipLeadingGrandParent, handle.first == "VkInstance" ); + std::string constructorArguments = generateRAIIHandleConstructorArguments( handle, constructorIt, false, false ); + + std::string callArguments = generateRAIIHandleConstructorCallArguments( + handle, constructorIt, false, {}, handle.second.destructorIt != m_commands.end() ); + + std::string dispatcherInit; if ( ( handle.first == "VkDevice" ) || ( handle.first == "VkInstance" ) ) { dispatcherInit = "\n m_dispatcher.init( static_cast<" + handle.first + ">( m_" + startLowerCase( stripPrefix( handle.first, "Vk" ) ) + " ) );"; } - std::string initializationList = generateRAIIHandleConstructorInitializationList( - handle.first, - constructorIt, - handle.second.destructorIt, - !handle.second.secondLevelCommands.empty() && !skipLeadingGrandParent ); + std::string initializationList = + generateRAIIHandleConstructorInitializationList( handle, constructorIt, handle.second.destructorIt, false ); const std::string constructorTemplate = R"( @@ -10016,48 +10010,36 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorTakeOwnership( std::pair const & handle ) const { std::string handleType = stripPrefix( handle.first, "Vk" ); - std::string paramType; - std::string constructorArguments, dispatcherArgument, initializationList; + std::string handleName = startLowerCase( handleType ); + + auto [parentType, parentName] = getParentTypeAndName( handle ); + + std::string dispatcherArgument = parentName + ".getDispatcher()"; if ( handle.first == "VkInstance" ) { - constructorArguments = "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context"; - dispatcherArgument = "context.getDispatcher()->vkGetInstanceProcAddr"; + dispatcherArgument += "->vkGetInstanceProcAddr"; } - else + else if ( handle.first == "VkDevice" ) { - assert( !handle.second.constructorIts.empty() && !handle.second.constructorIts.front()->second.params.empty() ); - auto param = handle.second.constructorIts.front()->second.params.begin(); - assert( isHandleType( param->type.type ) && param->type.isValue() ); - paramType = stripPrefix( param->type.type, "Vk" ); - constructorArguments = - "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::" + paramType + " const & " + startLowerCase( paramType ); - dispatcherArgument = startLowerCase( paramType ) + ".getDispatcher()"; - if ( handle.first == "VkDevice" ) + dispatcherArgument += "->vkGetDeviceProcAddr"; + } + + std::string constructorArguments = + generateRAIIHandleConstructorArguments( handle, handle.second.destructorIt, false, true ); + std::string initializationList = generateRAIIHandleConstructorInitializationList( + handle, handle.second.destructorIt, handle.second.destructorIt, true ); + assert( !handle.second.constructorIts.empty() ); + if ( 1 < handle.second.constructorIts[0]->second.successCodes.size() && + ( handle.second.constructorIts[0]->second.successCodes[1] != "VK_INCOMPLETE" ) ) + { +#if !defined( NDEBUG ) + for ( size_t i = 1; i < handle.second.constructorIts.size(); ++i ) { - dispatcherArgument = dispatcherArgument + "->vkGetDeviceProcAddr"; + assert( 1 < handle.second.constructorIts[i]->second.successCodes.size() ); } - } - std::string handleName = startLowerCase( handleType ); - constructorArguments += ", " + handle.first + " " + handleName; - initializationList += "m_" + handleName + "( " + handleName + " ), "; - if ( handle.second.destructorIt != m_commands.end() ) - { - std::vector params = handle.second.destructorIt->second.params; - auto paramIt = std::find_if( - params.begin(), params.end(), [¶mType]( ParamData const & pd ) { return pd.type.type == "Vk" + paramType; } ); - if ( paramIt != params.end() ) - { - params.erase( paramIt ); - } - constructorArguments += generateRAIIHandleConstructorArguments( handle, params, false, false, true ); - initializationList += generateRAIIHandleConstructorInitializationList( handle.first, - handle.second.destructorIt, - handle.second.destructorIt, - !handle.second.secondLevelCommands.empty() ); - } - else if ( !handle.second.secondLevelCommands.empty() ) - { - initializationList += "m_" + startLowerCase( paramType ) + "( *" + startLowerCase( paramType ) + " ), "; +#endif + constructorArguments += ", VULKAN_HPP_NAMESPACE::Result successCode = VULKAN_HPP_NAMESPACE::Result::eSuccess"; + initializationList += "m_constructorSuccessCode( successCode ), "; } std::string dispatcherInit; @@ -10124,7 +10106,7 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorVector( std::string handleConstructorArguments = generateRAIIHandleSingularConstructorArguments( handle, constructorIt ); std::string handleType = stripPrefix( handle.first, "Vk" ); - std::string successCodePassToElement = ( 1 < constructorIt->second.successCodes.size() ) ? "result," : ""; + std::string successCodePassToElement = ( 1 < constructorIt->second.successCodes.size() ) ? ", result" : ""; const std::string constructorTemplate = R"( @@ -10138,7 +10120,7 @@ ${enter} ${handleType}s( ${constructorArguments} ) this->reserve( ${vectorSize} ); for ( auto const & ${handleName} : ${vectorName} ) { - this->emplace_back( ${handleConstructorArguments}, ${successCodePassToElement} dispatcher ); + this->emplace_back( ${parentName}, ${handleConstructorArguments}${successCodePassToElement} ); } } else @@ -10150,11 +10132,8 @@ ${leave})"; return replaceWithMap( constructorTemplate, - { { "callArguments", - generateRAIIHandleConstructorCallArguments( - handle.first, constructorIt->second.params, false, {}, false, false ) }, - { "constructorArguments", - generateRAIIHandleConstructorArguments( handle, constructorIt->second.params, false, false, false ) }, + { { "callArguments", generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, {}, false ) }, + { "constructorArguments", generateRAIIHandleConstructorArguments( handle, constructorIt, false, false ) }, { "constructorCall", constructorIt->first }, { "enter", enter }, { "handleConstructorArguments", handleConstructorArguments }, @@ -10180,10 +10159,10 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorVectorSingular( std::map vectorParamIndices = determineVectorParamIndices( constructorIt->second.params ); std::set singularParams = determineSingularParams( returnParamIndex, vectorParamIndices ); - std::string callArguments = generateRAIIHandleConstructorCallArguments( - handle.first, constructorIt->second.params, false, singularParams, true, false ); - std::string initializationList = generateRAIIHandleConstructorInitializationList( - handle.first, constructorIt, handle.second.destructorIt, !handle.second.secondLevelCommands.empty() ); + std::string callArguments = + generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, singularParams, true ); + std::string initializationList = + generateRAIIHandleConstructorInitializationList( handle, constructorIt, handle.second.destructorIt, false ); std::string failureCheck = generateFailureCheck( constructorIt->second.successCodes ); replaceAll( failureCheck, "result", "m_constructorSuccessCode" ); @@ -10204,8 +10183,7 @@ ${leave})"; singularConstructorTemplate, { { "initializationList", initializationList }, { "callArguments", callArguments }, - { "constructorArguments", - generateRAIIHandleConstructorArguments( handle, constructorIt->second.params, true, false, false ) }, + { "constructorArguments", generateRAIIHandleConstructorArguments( handle, constructorIt, true, false ) }, { "constructorCall", constructorIt->first }, { "enter", enter }, { "firstArgument", constructorIt->second.params[0].name }, @@ -10220,12 +10198,10 @@ std::string VulkanHppGenerator::generateRAIIHandleConstructorVoid( std::string const & enter, std::string const & leave ) const { - std::string callArguments = - generateRAIIHandleConstructorCallArguments( handle.first, constructorIt->second.params, false, {}, true, false ); - std::string constructorArguments = - generateRAIIHandleConstructorArguments( handle, constructorIt->second.params, false, false, false ); - std::string initializationList = generateRAIIHandleConstructorInitializationList( - handle.first, constructorIt, handle.second.destructorIt, !handle.second.secondLevelCommands.empty() ); + std::string callArguments = generateRAIIHandleConstructorCallArguments( handle, constructorIt, false, {}, true ); + std::string constructorArguments = generateRAIIHandleConstructorArguments( handle, constructorIt, false, false ); + std::string initializationList = + generateRAIIHandleConstructorInitializationList( handle, constructorIt, handle.second.destructorIt, false ); const std::string constructorTemplate = R"( @@ -10297,7 +10273,8 @@ ${memberFunctionDeclarations} } std::pair - VulkanHppGenerator::generateRAIIHandleDestructor( std::string const & handleType, + VulkanHppGenerator::generateRAIIHandleDestructor( std::string const & parentType, + std::string const & handleType, std::map::const_iterator destructorIt, std::string const & enter ) const { @@ -10308,9 +10285,9 @@ std::pair destructorEnter.clear(); destructorLeave.clear(); } - std::string destructorCall = destructorIt->first + "( " + - generateRAIIHandleDestructorCallArguments( handleType, destructorIt->second.params ) + - " )"; + std::string destructorCall = + destructorIt->first + "( " + + generateRAIIHandleDestructorCallArguments( parentType, handleType, destructorIt->second.params ) + " )"; const std::string destructorTemplate = R"( ${enter}~${handleType}() @@ -10331,7 +10308,8 @@ ${leave})"; return std::make_pair( destructor, destructorCall ); } -std::string VulkanHppGenerator::generateRAIIHandleDestructorCallArguments( std::string const & handleType, +std::string VulkanHppGenerator::generateRAIIHandleDestructorCallArguments( std::string const & parentType, + std::string const & handleType, std::vector const & params ) const { std::string arguments; @@ -10353,7 +10331,11 @@ std::string VulkanHppGenerator::generateRAIIHandleDestructorCallArguments( std:: std::string argument = "m_" + startLowerCase( stripPrefix( param.type.type, "Vk" ) ); if ( param.type.isValue() ) { - if ( param.type.type == handleType ) + if ( param.type.type == parentType ) + { + argument = "static_cast<" + param.type.type + ">( **" + argument + " )"; + } + else if ( param.type.type == handleType ) { argument = "static_cast<" + param.type.type + ">( " + argument + " )"; } @@ -10387,7 +10369,7 @@ std::tuple VulkanHppGenerator::generateRAIIHandleDetails( std::pair const & handle, std::string const & destructorCall ) const { - std::string getConstructorSuccessCode, memberVariables, moveConstructorInitializerList, moveAssignmentInstructions; + std::string getConstructorSuccessCode; bool multiSuccessCodeContructor = isMultiSuccessCodeConstructor( handle.second.constructorIts ); if ( multiSuccessCodeContructor ) { @@ -10399,15 +10381,27 @@ std::tuple )"; } + auto [parentType, parentName] = getParentTypeAndName( handle ); + + std::string moveConstructorInitializerList = "m_" + parentName + + "( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_" + + parentName + ", nullptr ) ), "; + std::string moveAssignmentInstructions = " m_" + parentName + + " = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_" + + parentName + ", nullptr );\n"; + std::string memberVariables = + " VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::" + parentType + " const * m_" + parentName + " = nullptr;"; + std::string handleType = stripPrefix( handle.first, "Vk" ); std::string handleName = startLowerCase( handleType ); - memberVariables = " VULKAN_HPP_NAMESPACE::" + handleType + " m_" + handleName + ";"; - moveConstructorInitializerList = + moveConstructorInitializerList += "m_" + handleName + "( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_" + handleName + ", {} ) )"; - moveAssignmentInstructions = " m_" + handleName + - " = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_" + handleName + - ", {} );"; + moveAssignmentInstructions += " m_" + handleName + + " = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_" + handleName + + ", {} );"; + memberVariables += " VULKAN_HPP_NAMESPACE::" + handleType + " m_" + handleName + ";"; + if ( handle.second.destructorIt != m_commands.end() ) { moveAssignmentInstructions = " if ( m_" + handleName + @@ -10421,7 +10415,7 @@ std::tuple moveAssignmentInstructions; for ( auto const & destructorParam : handle.second.destructorIt->second.params ) { - if ( ( destructorParam.type.type != handle.first ) && + if ( ( destructorParam.type.type != "Vk" + parentType ) && ( destructorParam.type.type != handle.first ) && ( std::find_if( handle.second.destructorIt->second.params.begin(), handle.second.destructorIt->second.params.end(), [&destructorParam]( ParamData const & pd ) { return pd.len == destructorParam.name; } ) == @@ -10440,15 +10434,18 @@ std::tuple } } } +#if !defined( NDEBUG ) else if ( !handle.second.secondLevelCommands.empty() ) { assert( !handle.second.constructorIts.empty() ); assert( !handle.second.constructorIts.front()->second.params.empty() ); - auto const & parentType = handle.second.constructorIts.front()->second.params.front().type; - assert( isHandleType( parentType.type ) ); - memberVariables += - "\n " + parentType.type + " m_" + startLowerCase( stripPrefix( parentType.type, "Vk" ) ) + ";"; + auto const & frontType = handle.second.constructorIts.front()->second.params.front().type.type; + assert( isHandleType( frontType ) ); + auto handleIt = m_handles.find( "Vk" + parentType ); + assert( handleIt != m_handles.end() ); + assert( handleIt->second.parent == frontType ); } +#endif if ( multiSuccessCodeContructor ) { memberVariables += "\n VULKAN_HPP_NAMESPACE::Result m_constructorSuccessCode;"; @@ -10506,9 +10503,11 @@ std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( std::string arguments = startLowerCase( stripPrefix( handle.first, "Vk" ) ); if ( handle.second.destructorIt != m_commands.end() ) { + auto [parentType, parentName] = getParentTypeAndName( handle ); + parentType = "Vk" + parentType; for ( auto const & destructorParam : handle.second.destructorIt->second.params ) { - if ( ( destructorParam.type.type != handle.first ) && + if ( ( destructorParam.type.type != parentType ) && ( destructorParam.type.type != handle.first ) && ( std::find_if( handle.second.destructorIt->second.params.begin(), handle.second.destructorIt->second.params.end(), [&destructorParam]( ParamData const & pd ) { return pd.len == destructorParam.name; } ) == @@ -10528,8 +10527,7 @@ std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( else { assert( destructorParam.type.type == "VkAllocationCallbacks" ); - arguments += - ", reinterpret_cast( static_cast( allocator ) )"; + arguments += ", allocator"; } } else @@ -10571,59 +10569,6 @@ std::string VulkanHppGenerator::generateRAIIHandleSingularConstructorArguments( return arguments; } -std::string - VulkanHppGenerator::generateRAIIHandleUpgradeConstructor( std::pair const & handle ) const -{ - std::string typeName = startLowerCase( stripPrefix( handle.first, "Vk" ) ); - std::string constructorArguments = handle.first + " " + typeName; - std::string constructorInitializationList = "m_" + typeName + "( " + typeName + " )"; - if ( handle.second.destructorIt != m_commands.end() ) - { - for ( auto const & destructorParam : handle.second.destructorIt->second.params ) - { - if ( ( destructorParam.type.type != handle.first ) && - ( std::find_if( handle.second.destructorIt->second.params.begin(), - handle.second.destructorIt->second.params.end(), - [&destructorParam]( ParamData const & pd ) { return pd.len == destructorParam.name; } ) == - handle.second.destructorIt->second.params.end() ) ) - { - if ( isHandleType( destructorParam.type.type ) ) - { - assert( destructorParam.type.isValue() ); - std::string name = destructorParam.name; - constructorArguments += ", " + destructorParam.type.type + " " + name; - constructorInitializationList += ", m_" + name + "( " + name + " )"; - } - else - { - assert( destructorParam.type.type == "VkAllocationCallbacks" ); - constructorArguments += ", VkAllocationCallbacks const * allocator"; - constructorInitializationList += ", m_allocator( allocator )"; - } - } - } - } - if ( isMultiSuccessCodeConstructor( handle.second.constructorIts ) ) - { - constructorArguments += ", VULKAN_HPP_NAMESPACE::Result successCode"; - constructorInitializationList += ", m_constructorSuccessCode( successCode )"; - } - std::string dispatcherType = ( handle.second.constructorIts.front()->second.params.front().type.type == "VkDevice" ) - ? "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher" - : "VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher"; - - const std::string protectedConstructorTemplate = R"( - ${handleType}( ${arguments}, ${dispatcherType} const * dispatcher ) - : ${initializationList}, m_dispatcher( dispatcher ) - {})"; - - return replaceWithMap( protectedConstructorTemplate, - { { "arguments", constructorArguments }, - { "dispatcherType", dispatcherType }, - { "handleType", stripPrefix( handle.first, "Vk" ) }, - { "initializationList", constructorInitializationList } } ); -} - std::string VulkanHppGenerator::generateRAIIHandleVectorSizeCheck( std::string const & name, CommandData const & commandData, @@ -11766,6 +11711,28 @@ ${throws} return str; } +std::pair + VulkanHppGenerator::getParentTypeAndName( std::pair const & handle ) const +{ + std::string parentType, parentName; + if ( handle.first == "VkInstance" ) + { + parentType = "Context"; + parentName = "context"; + } + else + { + bool skip = skipLeadingGrandParent( handle ); + assert( !handle.second.constructorIts.empty() && + ( ( skip ? 1u : 0u ) < handle.second.constructorIts.front()->second.params.size() ) ); + auto const & param = handle.second.constructorIts.front()->second.params[skip ? 1 : 0]; + assert( isHandleType( param.type.type ) && param.type.isValue() ); + parentType = stripPrefix( param.type.type, "Vk" ); + parentName = param.name; + } + return std::make_pair( parentType, parentName ); +} + std::string VulkanHppGenerator::getPlatform( std::string const & title ) const { if ( m_features.find( title ) == m_features.end() ) @@ -14332,6 +14299,29 @@ void VulkanHppGenerator::setVulkanLicenseHeader( int line, std::string const & c m_vulkanLicenseHeader = trim( m_vulkanLicenseHeader ) + "\n"; } +bool VulkanHppGenerator::skipLeadingGrandParent( std::pair const & handle ) const +{ + bool skip = false; + assert( !handle.second.constructorIts.empty() ); + auto constructorIt = handle.second.constructorIts.begin(); + if ( ( 1 < ( *constructorIt )->second.params.size() ) && + isHandleType( ( *constructorIt )->second.params[0].type.type ) && + ( ( *constructorIt )->second.params[1].type.type == handle.second.parent ) ) + { + auto parentIt = m_handles.find( handle.second.parent ); + assert( parentIt != m_handles.end() ); + skip = ( ( *constructorIt )->second.params[0].type.type == parentIt->second.parent ); +#if !defined( NDEBUG ) + for ( auto it = std::next( constructorIt ); it != handle.second.constructorIts.end(); ++it ) + { + assert( ( *it )->second.params[0].type.type == ( *constructorIt )->second.params[0].type.type ); + assert( !skip || ( ( *it )->second.params[1].type.type == ( *constructorIt )->second.params[1].type.type ) ); + } +#endif + } + return skip; +} + std::string VulkanHppGenerator::toString( TypeCategory category ) { switch ( category ) @@ -15125,7 +15115,7 @@ std::string { arguments += ", "; } - arguments += generateRAIIHandleConstructorArgument( params[i], definition, singular ); + arguments += generateRAIIHandleConstructorArgument( params[i], definition, singular, false ); encounteredArgument = true; } } @@ -15299,8 +15289,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandResultMultiSuccessNoErr } )"; - std::string callArguments = - generateCallArgumentsEnhanced( commandIt->second.params, initialSkipCount, false, {}, true ); + std::string callArguments = generateCallArgumentsEnhanced( commandIt->second, initialSkipCount, false, {}, true ); std::pair>> vectorSizeCheck = needsVectorSizeCheck( vectorParamIndices ); std::string vectorSizeCheckString = vectorSizeCheck.first diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 334b00d..64a3a0e 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -409,11 +409,11 @@ private: std::string generateBitmasks( std::vector const & requireData, std::set & listedBitmasks, std::string const & title ) const; - std::string generateCallArgumentsEnhanced( std::vector const & params, - size_t initialSkipCount, - bool nonConstPointerAsNullptr, - std::set const & singularParams, - bool raiiHandleMemberFunction ) const; + std::string generateCallArgumentsEnhanced( CommandData const & commandData, + size_t initialSkipCount, + bool nonConstPointerAsNullptr, + std::set const & singularParams, + bool raiiHandleMemberFunction ) const; std::string generateCallArgumentsRAIIFactory( std::vector const & params, size_t initialSkipCount, std::set const & skippedParameters, @@ -1090,18 +1090,21 @@ private: std::map const & vectorParamIndices ) const; std::pair generateRAIIHandleConstructors( std::pair const & handle ) const; - std::string generateRAIIHandleConstructorArgument( ParamData const & param, bool definition, bool singular ) const; - std::string generateRAIIHandleConstructorArguments( std::pair const & handle, - std::vector const & params, - bool singular, - bool skipLeadingGrandParent, - bool encounteredArgument ) const; - std::string generateRAIIHandleConstructorCallArguments( std::string const & handleType, - std::vector const & params, - bool nonConstPointerAsNullptr, - std::set const & singularParams, - bool allocatorIsMemberVariable, - bool skipLeadingGrandParent ) const; + std::string generateRAIIHandleConstructorArgument( ParamData const & param, + bool definition, + bool singular, + bool takesOwnership ) const; + std::string generateRAIIHandleConstructorArguments( + std::pair const & handle, + std::map::const_iterator constructorIt, + bool singular, + bool takesOwnership ) const; + std::string generateRAIIHandleConstructorCallArguments( + std::pair const & handle, + std::map::const_iterator constructorIt, + bool nonConstPointerAsNullptr, + std::set const & singularParams, + bool allocatorIsMemberVariable ) const; std::string generateRAIIHandleConstructorEnumerate( std::pair const & handle, std::map::const_iterator constructorIt, std::vector::const_iterator handleParamIt, @@ -1109,10 +1112,10 @@ private: std::string const & enter, std::string const & leave ) const; std::string - generateRAIIHandleConstructorInitializationList( std::string const & handleType, + generateRAIIHandleConstructorInitializationList( std::pair const & handle, std::map::const_iterator constructorIt, std::map::const_iterator destructorIt, - bool hasSecondLevelCommands ) const; + bool takesOwnership ) const; std::string generateRAIIHandleConstructorResult( std::pair const & handle, std::map::const_iterator constructorIt, std::string const & enter, @@ -1136,10 +1139,12 @@ private: std::string generateRAIIHandleContext( std::pair const & handle, std::set const & specialFunctions ) const; std::pair - generateRAIIHandleDestructor( std::string const & handleType, + generateRAIIHandleDestructor( std::string const & parentType, + std::string const & handleType, std::map::const_iterator destructorIt, std::string const & enter ) const; - std::string generateRAIIHandleDestructorCallArguments( std::string const & handleType, + std::string generateRAIIHandleDestructorCallArguments( std::string const & parentType, + std::string const & handleType, std::vector const & params ) const; std::tuple generateRAIIHandleDetails( std::pair const & handle, @@ -1149,7 +1154,6 @@ private: std::string generateRAIIHandleSingularConstructorArguments( std::pair const & handle, std::map::const_iterator constructorIt ) const; - std::string generateRAIIHandleUpgradeConstructor( std::pair const & handle ) const; std::string generateRAIIHandleVectorSizeCheck( std::string const & name, CommandData const & commandData, size_t initialSkipCount, @@ -1188,7 +1192,8 @@ private: size_t initialSkipCount, std::map> const & countToVectorMap, std::set const & skippedParams ) const; - std::string getPlatform( std::string const & title ) const; + std::pair getParentTypeAndName( std::pair const & handle ) const; + std::string getPlatform( std::string const & title ) const; std::pair getPoolTypeAndName( std::string const & type ) const; std::string getVectorSize( std::vector const & params, std::map const & vectorParamIndices, @@ -1292,6 +1297,7 @@ private: std::set const & handleCommands, std::set & listedCommands ) const; void setVulkanLicenseHeader( int line, std::string const & comment ); + bool skipLeadingGrandParent( std::pair const & handle ) const; std::string toString( TypeCategory category ); private: diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index fb23260..8d08c34 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -2369,7 +2369,8 @@ namespace VULKAN_HPP_NAMESPACE Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_allocator( reinterpret_cast( + : m_context( &context ) + , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( context.getDispatcher()->vkGetInstanceProcAddr ) { @@ -2387,7 +2388,8 @@ namespace VULKAN_HPP_NAMESPACE Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, VkInstance instance, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( instance ) + : m_context( &context ) + , m_instance( instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( context.getDispatcher()->vkGetInstanceProcAddr ) @@ -2408,7 +2410,8 @@ namespace VULKAN_HPP_NAMESPACE Instance() = delete; Instance( Instance const & ) = delete; Instance( Instance && rhs ) VULKAN_HPP_NOEXCEPT - : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ) ) + : m_context( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_context, nullptr ) ) + , m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -2421,6 +2424,7 @@ namespace VULKAN_HPP_NAMESPACE { getDispatcher()->vkDestroyInstance( static_cast( m_instance ), m_allocator ); } + m_context = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_context, nullptr ); m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ); m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; @@ -2433,9 +2437,9 @@ namespace VULKAN_HPP_NAMESPACE return m_instance; } - VULKAN_HPP_NAMESPACE::Instance getInstance() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const * getContext() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_instance ); + return m_context; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const @@ -2602,6 +2606,7 @@ namespace VULKAN_HPP_NAMESPACE # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const * m_context = nullptr; VULKAN_HPP_NAMESPACE::Instance m_instance; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher m_dispatcher = nullptr; @@ -2620,19 +2625,16 @@ namespace VULKAN_HPP_NAMESPACE public: PhysicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkPhysicalDevice physicalDevice ) - : m_physicalDevice( physicalDevice ), m_dispatcher( instance.getDispatcher() ) + : m_instance( &instance ), m_physicalDevice( physicalDevice ), m_dispatcher( instance.getDispatcher() ) {} - PhysicalDevice( VkPhysicalDevice physicalDevice, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * dispatcher ) - : m_physicalDevice( physicalDevice ), m_dispatcher( dispatcher ) - {} PhysicalDevice( std::nullptr_t ) {} PhysicalDevice() = delete; PhysicalDevice( PhysicalDevice const & ) = delete; PhysicalDevice( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT - : m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) + : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, nullptr ) ) + , m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) , m_dispatcher( rhs.m_dispatcher ) {} PhysicalDevice & operator=( PhysicalDevice const & ) = delete; @@ -2640,6 +2642,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { + m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, nullptr ); m_physicalDevice = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ); m_dispatcher = rhs.m_dispatcher; } @@ -2651,6 +2654,11 @@ namespace VULKAN_HPP_NAMESPACE return m_physicalDevice; } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const * getInstance() const VULKAN_HPP_NOEXCEPT + { + return m_instance; + } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); @@ -2999,6 +3007,7 @@ namespace VULKAN_HPP_NAMESPACE # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const * m_instance = nullptr; VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -3030,7 +3039,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( physicalDeviceCount ); for ( auto const & physicalDevice : physicalDevices ) { - this->emplace_back( physicalDevice, dispatcher ); + this->emplace_back( instance, physicalDevice ); } } else @@ -3060,7 +3069,8 @@ namespace VULKAN_HPP_NAMESPACE Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_allocator( reinterpret_cast( + : m_physicalDevice( &physicalDevice ) + , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( physicalDevice.getDispatcher()->vkGetDeviceProcAddr ) { @@ -3079,7 +3089,8 @@ namespace VULKAN_HPP_NAMESPACE Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VkDevice device, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( device ) + : m_physicalDevice( &physicalDevice ) + , m_device( device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( physicalDevice.getDispatcher()->vkGetDeviceProcAddr ) @@ -3100,7 +3111,8 @@ namespace VULKAN_HPP_NAMESPACE Device() = delete; Device( Device const & ) = delete; Device( Device && rhs ) VULKAN_HPP_NOEXCEPT - : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) + : m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, nullptr ) ) + , m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -3113,9 +3125,10 @@ namespace VULKAN_HPP_NAMESPACE { getDispatcher()->vkDestroyDevice( static_cast( m_device ), m_allocator ); } - m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); - m_allocator = rhs.m_allocator; - m_dispatcher = rhs.m_dispatcher; + m_physicalDevice = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, nullptr ); + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ); + m_allocator = rhs.m_allocator; + m_dispatcher = rhs.m_dispatcher; } return *this; } @@ -3125,9 +3138,10 @@ namespace VULKAN_HPP_NAMESPACE return m_device; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const * + getPhysicalDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_physicalDevice; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -3814,9 +3828,10 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; private: - VULKAN_HPP_NAMESPACE::Device m_device; - const VkAllocationCallbacks * m_allocator = nullptr; - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher m_dispatcher = nullptr; + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const * m_physicalDevice = nullptr; + VULKAN_HPP_NAMESPACE::Device m_device; + const VkAllocationCallbacks * m_allocator = nullptr; + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher m_dispatcher = nullptr; }; class AccelerationStructureKHR @@ -3834,13 +3849,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateAccelerationStructureKHR( + static_cast( device.getDispatcher()->vkCreateAccelerationStructureKHR( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -3855,8 +3870,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkAccelerationStructureKHR accelerationStructureKHR, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_accelerationStructureKHR( accelerationStructureKHR ) - , m_device( *device ) + : m_device( &device ) + , m_accelerationStructureKHR( accelerationStructureKHR ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -3869,16 +3884,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_accelerationStructureKHR ) { getDispatcher()->vkDestroyAccelerationStructureKHR( - m_device, static_cast( m_accelerationStructureKHR ), m_allocator ); + static_cast( **m_device ), + static_cast( m_accelerationStructureKHR ), + m_allocator ); } } AccelerationStructureKHR() = delete; AccelerationStructureKHR( AccelerationStructureKHR const & ) = delete; AccelerationStructureKHR( AccelerationStructureKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_accelerationStructureKHR( + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_accelerationStructureKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructureKHR, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -3890,11 +3907,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_accelerationStructureKHR ) { getDispatcher()->vkDestroyAccelerationStructureKHR( - m_device, static_cast( m_accelerationStructureKHR ), m_allocator ); + static_cast( **m_device ), + static_cast( m_accelerationStructureKHR ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_accelerationStructureKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructureKHR, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -3906,9 +3925,9 @@ namespace VULKAN_HPP_NAMESPACE return m_accelerationStructureKHR; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -3918,8 +3937,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR m_accelerationStructureKHR; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -3939,13 +3958,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateAccelerationStructureNV( + static_cast( device.getDispatcher()->vkCreateAccelerationStructureNV( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -3960,8 +3979,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkAccelerationStructureNV accelerationStructureNV, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_accelerationStructureNV( accelerationStructureNV ) - , m_device( *device ) + : m_device( &device ) + , m_accelerationStructureNV( accelerationStructureNV ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -3974,16 +3993,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_accelerationStructureNV ) { getDispatcher()->vkDestroyAccelerationStructureNV( - m_device, static_cast( m_accelerationStructureNV ), m_allocator ); + static_cast( **m_device ), + static_cast( m_accelerationStructureNV ), + m_allocator ); } } AccelerationStructureNV() = delete; AccelerationStructureNV( AccelerationStructureNV const & ) = delete; AccelerationStructureNV( AccelerationStructureNV && rhs ) VULKAN_HPP_NOEXCEPT - : m_accelerationStructureNV( + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_accelerationStructureNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructureNV, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -3995,11 +4016,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_accelerationStructureNV ) { getDispatcher()->vkDestroyAccelerationStructureNV( - m_device, static_cast( m_accelerationStructureNV ), m_allocator ); + static_cast( **m_device ), + static_cast( m_accelerationStructureNV ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_accelerationStructureNV = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructureNV, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -4011,9 +4034,9 @@ namespace VULKAN_HPP_NAMESPACE return m_accelerationStructureNV; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -4031,8 +4054,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD T getHandle() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::AccelerationStructureNV m_accelerationStructureNV; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4051,16 +4074,16 @@ namespace VULKAN_HPP_NAMESPACE Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateBuffer( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_buffer ) ) ); + device.getDispatcher()->vkCreateBuffer( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_buffer ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateBuffer" ); @@ -4070,8 +4093,8 @@ namespace VULKAN_HPP_NAMESPACE Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBuffer buffer, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_buffer( buffer ) - , m_device( *device ) + : m_device( &device ) + , m_buffer( buffer ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -4083,15 +4106,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_buffer ) { - getDispatcher()->vkDestroyBuffer( m_device, static_cast( m_buffer ), m_allocator ); + getDispatcher()->vkDestroyBuffer( + static_cast( **m_device ), static_cast( m_buffer ), m_allocator ); } } Buffer() = delete; Buffer( Buffer const & ) = delete; Buffer( Buffer && rhs ) VULKAN_HPP_NOEXCEPT - : m_buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_buffer, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_buffer, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -4102,10 +4126,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_buffer ) { - getDispatcher()->vkDestroyBuffer( m_device, static_cast( m_buffer ), m_allocator ); + getDispatcher()->vkDestroyBuffer( + static_cast( **m_device ), static_cast( m_buffer ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_buffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_buffer, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -4117,9 +4142,9 @@ namespace VULKAN_HPP_NAMESPACE return m_buffer; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -4135,8 +4160,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getMemoryRequirements() const VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Buffer m_buffer; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4157,13 +4182,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateBufferCollectionFUCHSIA( + static_cast( device.getDispatcher()->vkCreateBufferCollectionFUCHSIA( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -4178,8 +4203,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBufferCollectionFUCHSIA bufferCollectionFUCHSIA, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_bufferCollectionFUCHSIA( bufferCollectionFUCHSIA ) - , m_device( *device ) + : m_device( &device ) + , m_bufferCollectionFUCHSIA( bufferCollectionFUCHSIA ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -4192,16 +4217,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_bufferCollectionFUCHSIA ) { getDispatcher()->vkDestroyBufferCollectionFUCHSIA( - m_device, static_cast( m_bufferCollectionFUCHSIA ), m_allocator ); + static_cast( **m_device ), + static_cast( m_bufferCollectionFUCHSIA ), + m_allocator ); } } BufferCollectionFUCHSIA() = delete; BufferCollectionFUCHSIA( BufferCollectionFUCHSIA const & ) = delete; BufferCollectionFUCHSIA( BufferCollectionFUCHSIA && rhs ) VULKAN_HPP_NOEXCEPT - : m_bufferCollectionFUCHSIA( + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_bufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferCollectionFUCHSIA, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -4213,11 +4240,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_bufferCollectionFUCHSIA ) { getDispatcher()->vkDestroyBufferCollectionFUCHSIA( - m_device, static_cast( m_bufferCollectionFUCHSIA ), m_allocator ); + static_cast( **m_device ), + static_cast( m_bufferCollectionFUCHSIA ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_bufferCollectionFUCHSIA = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferCollectionFUCHSIA, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -4229,9 +4258,9 @@ namespace VULKAN_HPP_NAMESPACE return m_bufferCollectionFUCHSIA; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -4250,8 +4279,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA getProperties() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA m_bufferCollectionFUCHSIA; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4271,16 +4300,16 @@ namespace VULKAN_HPP_NAMESPACE BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateBufferView( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_bufferView ) ) ); + device.getDispatcher()->vkCreateBufferView( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_bufferView ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateBufferView" ); @@ -4290,8 +4319,8 @@ namespace VULKAN_HPP_NAMESPACE BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBufferView bufferView, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_bufferView( bufferView ) - , m_device( *device ) + : m_device( &device ) + , m_bufferView( bufferView ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -4303,15 +4332,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_bufferView ) { - getDispatcher()->vkDestroyBufferView( m_device, static_cast( m_bufferView ), m_allocator ); + getDispatcher()->vkDestroyBufferView( + static_cast( **m_device ), static_cast( m_bufferView ), m_allocator ); } } BufferView() = delete; BufferView( BufferView const & ) = delete; BufferView( BufferView && rhs ) VULKAN_HPP_NOEXCEPT - : m_bufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferView, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_bufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferView, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -4322,10 +4352,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_bufferView ) { - getDispatcher()->vkDestroyBufferView( m_device, static_cast( m_bufferView ), m_allocator ); + getDispatcher()->vkDestroyBufferView( + static_cast( **m_device ), static_cast( m_bufferView ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_bufferView = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferView, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -4337,9 +4368,9 @@ namespace VULKAN_HPP_NAMESPACE return m_bufferView; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -4349,8 +4380,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::BufferView m_bufferView; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4369,16 +4400,16 @@ namespace VULKAN_HPP_NAMESPACE CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateCommandPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_commandPool ) ) ); + device.getDispatcher()->vkCreateCommandPool( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_commandPool ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateCommandPool" ); @@ -4388,8 +4419,8 @@ namespace VULKAN_HPP_NAMESPACE CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCommandPool commandPool, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_commandPool( commandPool ) - , m_device( *device ) + : m_device( &device ) + , m_commandPool( commandPool ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -4401,15 +4432,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_commandPool ) { - getDispatcher()->vkDestroyCommandPool( m_device, static_cast( m_commandPool ), m_allocator ); + getDispatcher()->vkDestroyCommandPool( + static_cast( **m_device ), static_cast( m_commandPool ), m_allocator ); } } CommandPool() = delete; CommandPool( CommandPool const & ) = delete; CommandPool( CommandPool && rhs ) VULKAN_HPP_NOEXCEPT - : m_commandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_commandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -4420,10 +4452,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_commandPool ) { - getDispatcher()->vkDestroyCommandPool( m_device, static_cast( m_commandPool ), m_allocator ); + getDispatcher()->vkDestroyCommandPool( + static_cast( **m_device ), static_cast( m_commandPool ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_commandPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -4435,9 +4468,9 @@ namespace VULKAN_HPP_NAMESPACE return m_commandPool; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -4461,8 +4494,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::CommandPool m_commandPool; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -4478,37 +4511,33 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandBuffer; public: - CommandBuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkCommandBuffer commandBuffer, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandPool const & commandPool ) - : m_commandBuffer( commandBuffer ) - , m_device( *device ) - , m_commandPool( *commandPool ) + CommandBuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, + VkCommandBuffer commandBuffer, + VkCommandPool commandPool ) + : m_device( &device ) + , m_commandBuffer( commandBuffer ) + , m_commandPool( commandPool ) , m_dispatcher( device.getDispatcher() ) {} - CommandBuffer( VkCommandBuffer commandBuffer, - VkDevice device, - VkCommandPool commandPool, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher ) - : m_commandBuffer( commandBuffer ), m_device( device ), m_commandPool( commandPool ), m_dispatcher( dispatcher ) - {} CommandBuffer( std::nullptr_t ) {} ~CommandBuffer() { if ( m_commandBuffer ) { - getDispatcher()->vkFreeCommandBuffers( - m_device, m_commandPool, 1, reinterpret_cast( &m_commandBuffer ) ); + getDispatcher()->vkFreeCommandBuffers( static_cast( **m_device ), + m_commandPool, + 1, + reinterpret_cast( &m_commandBuffer ) ); } } CommandBuffer() = delete; CommandBuffer( CommandBuffer const & ) = delete; CommandBuffer( CommandBuffer && rhs ) VULKAN_HPP_NOEXCEPT - : m_commandBuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandBuffer, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_commandBuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandBuffer, {} ) ) , m_commandPool( rhs.m_commandPool ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -4519,11 +4548,13 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_commandBuffer ) { - getDispatcher()->vkFreeCommandBuffers( - m_device, m_commandPool, 1, reinterpret_cast( &m_commandBuffer ) ); + getDispatcher()->vkFreeCommandBuffers( static_cast( **m_device ), + m_commandPool, + 1, + reinterpret_cast( &m_commandBuffer ) ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_commandBuffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandBuffer, {} ); - m_device = rhs.m_device; m_commandPool = rhs.m_commandPool; m_dispatcher = rhs.m_dispatcher; } @@ -4535,9 +4566,9 @@ namespace VULKAN_HPP_NAMESPACE return m_commandBuffer; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -5260,8 +5291,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::CommandBuffer m_commandBuffer; - VkDevice m_device; VkCommandPool m_commandPool; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -5283,10 +5314,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( allocateInfo.commandBufferCount ); for ( auto const & commandBuffer : commandBuffers ) { - this->emplace_back( commandBuffer, - static_cast( *device ), - static_cast( allocateInfo.commandPool ), - dispatcher ); + this->emplace_back( device, commandBuffer, static_cast( allocateInfo.commandPool ) ); } } else @@ -5317,16 +5345,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateCuFunctionNVX( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_cuFunctionNVX ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( device.getDispatcher()->vkCreateCuFunctionNVX( + static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_cuFunctionNVX ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateCuFunctionNVX" ); @@ -5337,8 +5366,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCuFunctionNVX cuFunctionNVX, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_cuFunctionNVX( cuFunctionNVX ) - , m_device( *device ) + : m_device( &device ) + , m_cuFunctionNVX( cuFunctionNVX ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -5351,15 +5380,15 @@ namespace VULKAN_HPP_NAMESPACE if ( m_cuFunctionNVX ) { getDispatcher()->vkDestroyCuFunctionNVX( - m_device, static_cast( m_cuFunctionNVX ), m_allocator ); + static_cast( **m_device ), static_cast( m_cuFunctionNVX ), m_allocator ); } } CuFunctionNVX() = delete; CuFunctionNVX( CuFunctionNVX const & ) = delete; CuFunctionNVX( CuFunctionNVX && rhs ) VULKAN_HPP_NOEXCEPT - : m_cuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuFunctionNVX, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_cuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuFunctionNVX, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -5371,10 +5400,10 @@ namespace VULKAN_HPP_NAMESPACE if ( m_cuFunctionNVX ) { getDispatcher()->vkDestroyCuFunctionNVX( - m_device, static_cast( m_cuFunctionNVX ), m_allocator ); + static_cast( **m_device ), static_cast( m_cuFunctionNVX ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_cuFunctionNVX = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuFunctionNVX, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -5386,9 +5415,9 @@ namespace VULKAN_HPP_NAMESPACE return m_cuFunctionNVX; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -5398,8 +5427,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::CuFunctionNVX m_cuFunctionNVX; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -5418,16 +5447,16 @@ namespace VULKAN_HPP_NAMESPACE CuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateCuModuleNVX( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_cuModuleNVX ) ) ); + device.getDispatcher()->vkCreateCuModuleNVX( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_cuModuleNVX ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateCuModuleNVX" ); @@ -5437,8 +5466,8 @@ namespace VULKAN_HPP_NAMESPACE CuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCuModuleNVX cuModuleNVX, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_cuModuleNVX( cuModuleNVX ) - , m_device( *device ) + : m_device( &device ) + , m_cuModuleNVX( cuModuleNVX ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -5450,15 +5479,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_cuModuleNVX ) { - getDispatcher()->vkDestroyCuModuleNVX( m_device, static_cast( m_cuModuleNVX ), m_allocator ); + getDispatcher()->vkDestroyCuModuleNVX( + static_cast( **m_device ), static_cast( m_cuModuleNVX ), m_allocator ); } } CuModuleNVX() = delete; CuModuleNVX( CuModuleNVX const & ) = delete; CuModuleNVX( CuModuleNVX && rhs ) VULKAN_HPP_NOEXCEPT - : m_cuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuModuleNVX, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_cuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuModuleNVX, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -5469,10 +5499,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_cuModuleNVX ) { - getDispatcher()->vkDestroyCuModuleNVX( m_device, static_cast( m_cuModuleNVX ), m_allocator ); + getDispatcher()->vkDestroyCuModuleNVX( + static_cast( **m_device ), static_cast( m_cuModuleNVX ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_cuModuleNVX = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuModuleNVX, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -5484,9 +5515,9 @@ namespace VULKAN_HPP_NAMESPACE return m_cuModuleNVX; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -5496,8 +5527,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::CuModuleNVX m_cuModuleNVX; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -5517,13 +5548,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateDebugReportCallbackEXT( + static_cast( instance.getDispatcher()->vkCreateDebugReportCallbackEXT( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -5538,8 +5569,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkDebugReportCallbackEXT debugReportCallbackEXT, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_debugReportCallbackEXT( debugReportCallbackEXT ) - , m_instance( *instance ) + : m_instance( &instance ) + , m_debugReportCallbackEXT( debugReportCallbackEXT ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) @@ -5552,16 +5583,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_debugReportCallbackEXT ) { getDispatcher()->vkDestroyDebugReportCallbackEXT( - m_instance, static_cast( m_debugReportCallbackEXT ), m_allocator ); + static_cast( **m_instance ), + static_cast( m_debugReportCallbackEXT ), + m_allocator ); } } DebugReportCallbackEXT() = delete; DebugReportCallbackEXT( DebugReportCallbackEXT const & ) = delete; DebugReportCallbackEXT( DebugReportCallbackEXT && rhs ) VULKAN_HPP_NOEXCEPT - : m_debugReportCallbackEXT( + : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, nullptr ) ) + , m_debugReportCallbackEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_debugReportCallbackEXT, {} ) ) - , m_instance( rhs.m_instance ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -5573,11 +5606,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_debugReportCallbackEXT ) { getDispatcher()->vkDestroyDebugReportCallbackEXT( - m_instance, static_cast( m_debugReportCallbackEXT ), m_allocator ); + static_cast( **m_instance ), + static_cast( m_debugReportCallbackEXT ), + m_allocator ); } + m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, nullptr ); m_debugReportCallbackEXT = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_debugReportCallbackEXT, {} ); - m_instance = rhs.m_instance; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -5589,9 +5624,9 @@ namespace VULKAN_HPP_NAMESPACE return m_debugReportCallbackEXT; } - VULKAN_HPP_NAMESPACE::Instance getInstance() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const * getInstance() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_instance ); + return m_instance; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const @@ -5601,8 +5636,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const * m_instance = nullptr; VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT m_debugReportCallbackEXT; - VkInstance m_instance; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -5622,13 +5657,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateDebugUtilsMessengerEXT( + static_cast( instance.getDispatcher()->vkCreateDebugUtilsMessengerEXT( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -5643,8 +5678,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkDebugUtilsMessengerEXT debugUtilsMessengerEXT, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_debugUtilsMessengerEXT( debugUtilsMessengerEXT ) - , m_instance( *instance ) + : m_instance( &instance ) + , m_debugUtilsMessengerEXT( debugUtilsMessengerEXT ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) @@ -5657,16 +5692,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_debugUtilsMessengerEXT ) { getDispatcher()->vkDestroyDebugUtilsMessengerEXT( - m_instance, static_cast( m_debugUtilsMessengerEXT ), m_allocator ); + static_cast( **m_instance ), + static_cast( m_debugUtilsMessengerEXT ), + m_allocator ); } } DebugUtilsMessengerEXT() = delete; DebugUtilsMessengerEXT( DebugUtilsMessengerEXT const & ) = delete; DebugUtilsMessengerEXT( DebugUtilsMessengerEXT && rhs ) VULKAN_HPP_NOEXCEPT - : m_debugUtilsMessengerEXT( + : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, nullptr ) ) + , m_debugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_debugUtilsMessengerEXT, {} ) ) - , m_instance( rhs.m_instance ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -5678,11 +5715,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_debugUtilsMessengerEXT ) { getDispatcher()->vkDestroyDebugUtilsMessengerEXT( - m_instance, static_cast( m_debugUtilsMessengerEXT ), m_allocator ); + static_cast( **m_instance ), + static_cast( m_debugUtilsMessengerEXT ), + m_allocator ); } + m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, nullptr ); m_debugUtilsMessengerEXT = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_debugUtilsMessengerEXT, {} ); - m_instance = rhs.m_instance; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -5694,9 +5733,9 @@ namespace VULKAN_HPP_NAMESPACE return m_debugUtilsMessengerEXT; } - VULKAN_HPP_NAMESPACE::Instance getInstance() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const * getInstance() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_instance ); + return m_instance; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const @@ -5706,8 +5745,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const * m_instance = nullptr; VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT m_debugUtilsMessengerEXT; - VkInstance m_instance; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -5726,13 +5765,13 @@ namespace VULKAN_HPP_NAMESPACE DeferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateDeferredOperationKHR( + static_cast( device.getDispatcher()->vkCreateDeferredOperationKHR( static_cast( *device ), m_allocator, reinterpret_cast( &m_deferredOperationKHR ) ) ); @@ -5746,8 +5785,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDeferredOperationKHR deferredOperationKHR, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_deferredOperationKHR( deferredOperationKHR ) - , m_device( *device ) + : m_device( &device ) + , m_deferredOperationKHR( deferredOperationKHR ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -5759,17 +5798,18 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_deferredOperationKHR ) { - getDispatcher()->vkDestroyDeferredOperationKHR( - m_device, static_cast( m_deferredOperationKHR ), m_allocator ); + getDispatcher()->vkDestroyDeferredOperationKHR( static_cast( **m_device ), + static_cast( m_deferredOperationKHR ), + m_allocator ); } } DeferredOperationKHR() = delete; DeferredOperationKHR( DeferredOperationKHR const & ) = delete; DeferredOperationKHR( DeferredOperationKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_deferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deferredOperationKHR, + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_deferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deferredOperationKHR, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -5781,11 +5821,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_deferredOperationKHR ) { getDispatcher()->vkDestroyDeferredOperationKHR( - m_device, static_cast( m_deferredOperationKHR ), m_allocator ); + static_cast( **m_device ), + static_cast( m_deferredOperationKHR ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_deferredOperationKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deferredOperationKHR, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -5797,9 +5839,9 @@ namespace VULKAN_HPP_NAMESPACE return m_deferredOperationKHR; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -5817,8 +5859,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result join() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::DeferredOperationKHR m_deferredOperationKHR; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -5838,16 +5880,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateDescriptorPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_descriptorPool ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( device.getDispatcher()->vkCreateDescriptorPool( + static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_descriptorPool ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateDescriptorPool" ); @@ -5858,8 +5901,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_descriptorPool( descriptorPool ) - , m_device( *device ) + : m_device( &device ) + , m_descriptorPool( descriptorPool ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -5872,15 +5915,15 @@ namespace VULKAN_HPP_NAMESPACE if ( m_descriptorPool ) { getDispatcher()->vkDestroyDescriptorPool( - m_device, static_cast( m_descriptorPool ), m_allocator ); + static_cast( **m_device ), static_cast( m_descriptorPool ), m_allocator ); } } DescriptorPool() = delete; DescriptorPool( DescriptorPool const & ) = delete; DescriptorPool( DescriptorPool && rhs ) VULKAN_HPP_NOEXCEPT - : m_descriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_descriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -5892,10 +5935,10 @@ namespace VULKAN_HPP_NAMESPACE if ( m_descriptorPool ) { getDispatcher()->vkDestroyDescriptorPool( - m_device, static_cast( m_descriptorPool ), m_allocator ); + static_cast( **m_device ), static_cast( m_descriptorPool ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_descriptorPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -5907,9 +5950,9 @@ namespace VULKAN_HPP_NAMESPACE return m_descriptorPool; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -5924,8 +5967,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::DescriptorPool m_descriptorPool; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -5941,40 +5984,33 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSet; public: - DescriptorSet( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, - VkDescriptorSet descriptorSet, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorPool const & descriptorPool ) - : m_descriptorSet( descriptorSet ) - , m_device( *device ) - , m_descriptorPool( *descriptorPool ) + DescriptorSet( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, + VkDescriptorSet descriptorSet, + VkDescriptorPool descriptorPool ) + : m_device( &device ) + , m_descriptorSet( descriptorSet ) + , m_descriptorPool( descriptorPool ) , m_dispatcher( device.getDispatcher() ) {} - DescriptorSet( VkDescriptorSet descriptorSet, - VkDevice device, - VkDescriptorPool descriptorPool, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher ) - : m_descriptorSet( descriptorSet ) - , m_device( device ) - , m_descriptorPool( descriptorPool ) - , m_dispatcher( dispatcher ) - {} DescriptorSet( std::nullptr_t ) {} ~DescriptorSet() { if ( m_descriptorSet ) { - getDispatcher()->vkFreeDescriptorSets( - m_device, m_descriptorPool, 1, reinterpret_cast( &m_descriptorSet ) ); + getDispatcher()->vkFreeDescriptorSets( static_cast( **m_device ), + m_descriptorPool, + 1, + reinterpret_cast( &m_descriptorSet ) ); } } DescriptorSet() = delete; DescriptorSet( DescriptorSet const & ) = delete; DescriptorSet( DescriptorSet && rhs ) VULKAN_HPP_NOEXCEPT - : m_descriptorSet( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSet, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_descriptorSet( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSet, {} ) ) , m_descriptorPool( rhs.m_descriptorPool ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -5985,11 +6021,13 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_descriptorSet ) { - getDispatcher()->vkFreeDescriptorSets( - m_device, m_descriptorPool, 1, reinterpret_cast( &m_descriptorSet ) ); + getDispatcher()->vkFreeDescriptorSets( static_cast( **m_device ), + m_descriptorPool, + 1, + reinterpret_cast( &m_descriptorSet ) ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_descriptorSet = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSet, {} ); - m_device = rhs.m_device; m_descriptorPool = rhs.m_descriptorPool; m_dispatcher = rhs.m_dispatcher; } @@ -6001,9 +6039,9 @@ namespace VULKAN_HPP_NAMESPACE return m_descriptorSet; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -6023,8 +6061,8 @@ namespace VULKAN_HPP_NAMESPACE const void * pData ) const VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::DescriptorSet m_descriptorSet; - VkDevice m_device; VkDescriptorPool m_descriptorPool; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6046,10 +6084,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( allocateInfo.descriptorSetCount ); for ( auto const & descriptorSet : descriptorSets ) { - this->emplace_back( descriptorSet, - static_cast( *device ), - static_cast( allocateInfo.descriptorPool ), - dispatcher ); + this->emplace_back( device, descriptorSet, static_cast( allocateInfo.descriptorPool ) ); } } else @@ -6080,13 +6115,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateDescriptorSetLayout( + static_cast( device.getDispatcher()->vkCreateDescriptorSetLayout( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -6101,8 +6136,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorSetLayout descriptorSetLayout, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_descriptorSetLayout( descriptorSetLayout ) - , m_device( *device ) + : m_device( &device ) + , m_descriptorSetLayout( descriptorSetLayout ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -6114,17 +6149,18 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_descriptorSetLayout ) { - getDispatcher()->vkDestroyDescriptorSetLayout( - m_device, static_cast( m_descriptorSetLayout ), m_allocator ); + getDispatcher()->vkDestroyDescriptorSetLayout( static_cast( **m_device ), + static_cast( m_descriptorSetLayout ), + m_allocator ); } } DescriptorSetLayout() = delete; DescriptorSetLayout( DescriptorSetLayout const & ) = delete; DescriptorSetLayout( DescriptorSetLayout && rhs ) VULKAN_HPP_NOEXCEPT - : m_descriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSetLayout, + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_descriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -6135,12 +6171,13 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_descriptorSetLayout ) { - getDispatcher()->vkDestroyDescriptorSetLayout( - m_device, static_cast( m_descriptorSetLayout ), m_allocator ); + getDispatcher()->vkDestroyDescriptorSetLayout( static_cast( **m_device ), + static_cast( m_descriptorSetLayout ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_descriptorSetLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -6152,9 +6189,9 @@ namespace VULKAN_HPP_NAMESPACE return m_descriptorSetLayout; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -6164,8 +6201,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::DescriptorSetLayout m_descriptorSetLayout; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6185,13 +6222,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateDescriptorUpdateTemplate( + static_cast( device.getDispatcher()->vkCreateDescriptorUpdateTemplate( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -6206,8 +6243,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_descriptorUpdateTemplate( descriptorUpdateTemplate ) - , m_device( *device ) + : m_device( &device ) + , m_descriptorUpdateTemplate( descriptorUpdateTemplate ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -6220,16 +6257,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_descriptorUpdateTemplate ) { getDispatcher()->vkDestroyDescriptorUpdateTemplate( - m_device, static_cast( m_descriptorUpdateTemplate ), m_allocator ); + static_cast( **m_device ), + static_cast( m_descriptorUpdateTemplate ), + m_allocator ); } } DescriptorUpdateTemplate() = delete; DescriptorUpdateTemplate( DescriptorUpdateTemplate const & ) = delete; DescriptorUpdateTemplate( DescriptorUpdateTemplate && rhs ) VULKAN_HPP_NOEXCEPT - : m_descriptorUpdateTemplate( + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_descriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -6241,11 +6280,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_descriptorUpdateTemplate ) { getDispatcher()->vkDestroyDescriptorUpdateTemplate( - m_device, static_cast( m_descriptorUpdateTemplate ), m_allocator ); + static_cast( **m_device ), + static_cast( m_descriptorUpdateTemplate ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_descriptorUpdateTemplate = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -6257,9 +6298,9 @@ namespace VULKAN_HPP_NAMESPACE return m_descriptorUpdateTemplate; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -6269,8 +6310,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate m_descriptorUpdateTemplate; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6290,16 +6331,16 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkAllocateMemory( static_cast( *device ), - reinterpret_cast( &allocateInfo ), - m_allocator, - reinterpret_cast( &m_deviceMemory ) ) ); + device.getDispatcher()->vkAllocateMemory( static_cast( *device ), + reinterpret_cast( &allocateInfo ), + m_allocator, + reinterpret_cast( &m_deviceMemory ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkAllocateMemory" ); @@ -6310,8 +6351,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDeviceMemory deviceMemory, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_deviceMemory( deviceMemory ) - , m_device( *device ) + : m_device( &device ) + , m_deviceMemory( deviceMemory ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -6323,15 +6364,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_deviceMemory ) { - getDispatcher()->vkFreeMemory( m_device, static_cast( m_deviceMemory ), m_allocator ); + getDispatcher()->vkFreeMemory( + static_cast( **m_device ), static_cast( m_deviceMemory ), m_allocator ); } } DeviceMemory() = delete; DeviceMemory( DeviceMemory const & ) = delete; DeviceMemory( DeviceMemory && rhs ) VULKAN_HPP_NOEXCEPT - : m_deviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deviceMemory, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_deviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deviceMemory, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -6342,10 +6384,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_deviceMemory ) { - getDispatcher()->vkFreeMemory( m_device, static_cast( m_deviceMemory ), m_allocator ); + getDispatcher()->vkFreeMemory( + static_cast( **m_device ), static_cast( m_deviceMemory ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_deviceMemory = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deviceMemory, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -6357,9 +6400,9 @@ namespace VULKAN_HPP_NAMESPACE return m_deviceMemory; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -6391,8 +6434,8 @@ namespace VULKAN_HPP_NAMESPACE void setPriorityEXT( float priority ) const VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::DeviceMemory m_deviceMemory; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6411,13 +6454,13 @@ namespace VULKAN_HPP_NAMESPACE DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, int32_t drmFd, uint32_t connectorId ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) + : m_physicalDevice( &physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetDrmDisplayEXT( static_cast( *physicalDevice ), - drmFd, - connectorId, - reinterpret_cast( &m_displayKHR ) ) ); + physicalDevice.getDispatcher()->vkGetDrmDisplayEXT( static_cast( *physicalDevice ), + drmFd, + connectorId, + reinterpret_cast( &m_displayKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkGetDrmDisplayEXT" ); @@ -6428,13 +6471,14 @@ namespace VULKAN_HPP_NAMESPACE DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, Display & dpy, RROutput rrOutput ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) + : m_physicalDevice( &physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetRandROutputDisplayEXT( static_cast( *physicalDevice ), - &dpy, - rrOutput, - reinterpret_cast( &m_displayKHR ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( physicalDevice.getDispatcher()->vkGetRandROutputDisplayEXT( + static_cast( *physicalDevice ), + &dpy, + rrOutput, + reinterpret_cast( &m_displayKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkGetRandROutputDisplayEXT" ); @@ -6445,12 +6489,12 @@ namespace VULKAN_HPP_NAMESPACE # if defined( VK_USE_PLATFORM_WIN32_KHR ) DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, uint32_t deviceRelativeId ) - : m_physicalDevice( *physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) + : m_physicalDevice( &physicalDevice ), m_dispatcher( physicalDevice.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetWinrtDisplayNV( static_cast( *physicalDevice ), - deviceRelativeId, - reinterpret_cast( &m_displayKHR ) ) ); + physicalDevice.getDispatcher()->vkGetWinrtDisplayNV( static_cast( *physicalDevice ), + deviceRelativeId, + reinterpret_cast( &m_displayKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkGetWinrtDisplayNV" ); @@ -6460,31 +6504,27 @@ namespace VULKAN_HPP_NAMESPACE DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VkDisplayKHR displayKHR ) - : m_displayKHR( displayKHR ) - , m_physicalDevice( *physicalDevice ) + : m_physicalDevice( &physicalDevice ) + , m_displayKHR( displayKHR ) , m_dispatcher( physicalDevice.getDispatcher() ) {} - DisplayKHR( VkDisplayKHR displayKHR, - VkPhysicalDevice physicalDevice, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * dispatcher ) - : m_displayKHR( displayKHR ), m_physicalDevice( physicalDevice ), m_dispatcher( dispatcher ) - {} DisplayKHR( std::nullptr_t ) {} ~DisplayKHR() { if ( m_displayKHR ) { - getDispatcher()->vkReleaseDisplayEXT( m_physicalDevice, static_cast( m_displayKHR ) ); + getDispatcher()->vkReleaseDisplayEXT( static_cast( **m_physicalDevice ), + static_cast( m_displayKHR ) ); } } DisplayKHR() = delete; DisplayKHR( DisplayKHR const & ) = delete; DisplayKHR( DisplayKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_displayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayKHR, {} ) ) - , m_physicalDevice( rhs.m_physicalDevice ) + : m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, nullptr ) ) + , m_displayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayKHR, {} ) ) , m_dispatcher( rhs.m_dispatcher ) {} DisplayKHR & operator=( DisplayKHR const & ) = delete; @@ -6494,10 +6534,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_displayKHR ) { - getDispatcher()->vkReleaseDisplayEXT( m_physicalDevice, static_cast( m_displayKHR ) ); + getDispatcher()->vkReleaseDisplayEXT( static_cast( **m_physicalDevice ), + static_cast( m_displayKHR ) ); } + m_physicalDevice = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, nullptr ); m_displayKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayKHR, {} ); - m_physicalDevice = rhs.m_physicalDevice; m_dispatcher = rhs.m_dispatcher; } return *this; @@ -6508,9 +6549,10 @@ namespace VULKAN_HPP_NAMESPACE return m_displayKHR; } - VULKAN_HPP_NAMESPACE::PhysicalDevice getPhysicalDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const * + getPhysicalDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_physicalDevice ); + return m_physicalDevice; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const @@ -6538,8 +6580,8 @@ namespace VULKAN_HPP_NAMESPACE # endif /*VK_USE_PLATFORM_WIN32_KHR*/ private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const * m_physicalDevice = nullptr; VULKAN_HPP_NAMESPACE::DisplayKHR m_displayKHR; - VkPhysicalDevice m_physicalDevice; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -6571,7 +6613,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( displayCount ); for ( auto const & displayKHR : displays ) { - this->emplace_back( displayKHR, static_cast( *physicalDevice ), dispatcher ); + this->emplace_back( physicalDevice, displayKHR ); } } else @@ -6602,11 +6644,11 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_dispatcher( display.getDispatcher() ) + : m_display( &display ), m_dispatcher( display.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateDisplayModeKHR( - static_cast( display.getPhysicalDevice() ), + static_cast( display.getDispatcher()->vkCreateDisplayModeKHR( + static_cast( **display.getPhysicalDevice() ), static_cast( *display ), reinterpret_cast( &createInfo ), reinterpret_cast( @@ -6618,11 +6660,9 @@ namespace VULKAN_HPP_NAMESPACE } } - DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, - VkDisplayModeKHR displayModeKHR ) - : m_displayModeKHR( displayModeKHR ) - , m_physicalDevice( *physicalDevice ) - , m_dispatcher( physicalDevice.getDispatcher() ) + DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, + VkDisplayModeKHR displayModeKHR ) + : m_display( &display ), m_displayModeKHR( displayModeKHR ), m_dispatcher( display.getDispatcher() ) {} DisplayModeKHR( std::nullptr_t ) {} @@ -6630,7 +6670,8 @@ namespace VULKAN_HPP_NAMESPACE DisplayModeKHR() = delete; DisplayModeKHR( DisplayModeKHR const & ) = delete; DisplayModeKHR( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_displayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ) ) + : m_display( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_display, nullptr ) ) + , m_displayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ) ) , m_dispatcher( rhs.m_dispatcher ) {} DisplayModeKHR & operator=( DisplayModeKHR const & ) = delete; @@ -6638,6 +6679,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { + m_display = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_display, nullptr ); m_displayModeKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ); m_dispatcher = rhs.m_dispatcher; } @@ -6649,6 +6691,11 @@ namespace VULKAN_HPP_NAMESPACE return m_displayModeKHR; } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const * getDisplayKHR() const VULKAN_HPP_NOEXCEPT + { + return m_display; + } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); @@ -6661,8 +6708,8 @@ namespace VULKAN_HPP_NAMESPACE getDisplayPlaneCapabilities( uint32_t planeIndex ) const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const * m_display = nullptr; VULKAN_HPP_NAMESPACE::DisplayModeKHR m_displayModeKHR; - VkPhysicalDevice m_physicalDevice; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -6680,16 +6727,16 @@ namespace VULKAN_HPP_NAMESPACE Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateEvent( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_event ) ) ); + device.getDispatcher()->vkCreateEvent( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_event ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateEvent" ); @@ -6699,8 +6746,8 @@ namespace VULKAN_HPP_NAMESPACE Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkEvent event, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_event( event ) - , m_device( *device ) + : m_device( &device ) + , m_event( event ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -6712,15 +6759,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_event ) { - getDispatcher()->vkDestroyEvent( m_device, static_cast( m_event ), m_allocator ); + getDispatcher()->vkDestroyEvent( + static_cast( **m_device ), static_cast( m_event ), m_allocator ); } } Event() = delete; Event( Event const & ) = delete; Event( Event && rhs ) VULKAN_HPP_NOEXCEPT - : m_event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_event, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_event, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -6731,10 +6779,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_event ) { - getDispatcher()->vkDestroyEvent( m_device, static_cast( m_event ), m_allocator ); + getDispatcher()->vkDestroyEvent( + static_cast( **m_device ), static_cast( m_event ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_event = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_event, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -6746,9 +6795,9 @@ namespace VULKAN_HPP_NAMESPACE return m_event; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -6766,8 +6815,8 @@ namespace VULKAN_HPP_NAMESPACE void reset() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Event m_event; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6786,16 +6835,16 @@ namespace VULKAN_HPP_NAMESPACE Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateFence( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_fence ) ) ); + device.getDispatcher()->vkCreateFence( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_fence ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateFence" ); @@ -6805,16 +6854,17 @@ namespace VULKAN_HPP_NAMESPACE Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkRegisterDeviceEventEXT( static_cast( *device ), - reinterpret_cast( &deviceEventInfo ), - m_allocator, - reinterpret_cast( &m_fence ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( device.getDispatcher()->vkRegisterDeviceEventEXT( + static_cast( *device ), + reinterpret_cast( &deviceEventInfo ), + m_allocator, + reinterpret_cast( &m_fence ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkRegisterDeviceEventEXT" ); @@ -6825,13 +6875,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkRegisterDisplayEventEXT( + static_cast( device.getDispatcher()->vkRegisterDisplayEventEXT( static_cast( *device ), static_cast( *display ), reinterpret_cast( &displayEventInfo ), @@ -6846,8 +6896,8 @@ namespace VULKAN_HPP_NAMESPACE Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkFence fence, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_fence( fence ) - , m_device( *device ) + : m_device( &device ) + , m_fence( fence ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -6859,15 +6909,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_fence ) { - getDispatcher()->vkDestroyFence( m_device, static_cast( m_fence ), m_allocator ); + getDispatcher()->vkDestroyFence( + static_cast( **m_device ), static_cast( m_fence ), m_allocator ); } } Fence() = delete; Fence( Fence const & ) = delete; Fence( Fence && rhs ) VULKAN_HPP_NOEXCEPT - : m_fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_fence, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_fence, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -6878,10 +6929,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_fence ) { - getDispatcher()->vkDestroyFence( m_device, static_cast( m_fence ), m_allocator ); + getDispatcher()->vkDestroyFence( + static_cast( **m_device ), static_cast( m_fence ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_fence = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_fence, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -6893,9 +6945,9 @@ namespace VULKAN_HPP_NAMESPACE return m_fence; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -6909,8 +6961,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Fence m_fence; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -6929,16 +6981,16 @@ namespace VULKAN_HPP_NAMESPACE Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateFramebuffer( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_framebuffer ) ) ); + device.getDispatcher()->vkCreateFramebuffer( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_framebuffer ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateFramebuffer" ); @@ -6948,8 +7000,8 @@ namespace VULKAN_HPP_NAMESPACE Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkFramebuffer framebuffer, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_framebuffer( framebuffer ) - , m_device( *device ) + : m_device( &device ) + , m_framebuffer( framebuffer ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -6961,15 +7013,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_framebuffer ) { - getDispatcher()->vkDestroyFramebuffer( m_device, static_cast( m_framebuffer ), m_allocator ); + getDispatcher()->vkDestroyFramebuffer( + static_cast( **m_device ), static_cast( m_framebuffer ), m_allocator ); } } Framebuffer() = delete; Framebuffer( Framebuffer const & ) = delete; Framebuffer( Framebuffer && rhs ) VULKAN_HPP_NOEXCEPT - : m_framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_framebuffer, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_framebuffer, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -6980,10 +7033,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_framebuffer ) { - getDispatcher()->vkDestroyFramebuffer( m_device, static_cast( m_framebuffer ), m_allocator ); + getDispatcher()->vkDestroyFramebuffer( + static_cast( **m_device ), static_cast( m_framebuffer ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_framebuffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_framebuffer, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -6995,9 +7049,9 @@ namespace VULKAN_HPP_NAMESPACE return m_framebuffer; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -7007,8 +7061,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Framebuffer m_framebuffer; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7027,16 +7081,16 @@ namespace VULKAN_HPP_NAMESPACE Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateImage( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_image ) ) ); + device.getDispatcher()->vkCreateImage( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_image ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateImage" ); @@ -7046,8 +7100,8 @@ namespace VULKAN_HPP_NAMESPACE Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkImage image, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_image( image ) - , m_device( *device ) + : m_device( &device ) + , m_image( image ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7059,15 +7113,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_image ) { - getDispatcher()->vkDestroyImage( m_device, static_cast( m_image ), m_allocator ); + getDispatcher()->vkDestroyImage( + static_cast( **m_device ), static_cast( m_image ), m_allocator ); } } Image() = delete; Image( Image const & ) = delete; Image( Image && rhs ) VULKAN_HPP_NOEXCEPT - : m_image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_image, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_image, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -7078,10 +7133,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_image ) { - getDispatcher()->vkDestroyImage( m_device, static_cast( m_image ), m_allocator ); + getDispatcher()->vkDestroyImage( + static_cast( **m_device ), static_cast( m_image ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_image = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_image, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -7093,9 +7149,9 @@ namespace VULKAN_HPP_NAMESPACE return m_image; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -7122,8 +7178,8 @@ namespace VULKAN_HPP_NAMESPACE getDrmFormatModifierPropertiesEXT() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Image m_image; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7142,16 +7198,16 @@ namespace VULKAN_HPP_NAMESPACE ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateImageView( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_imageView ) ) ); + device.getDispatcher()->vkCreateImageView( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_imageView ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateImageView" ); @@ -7161,8 +7217,8 @@ namespace VULKAN_HPP_NAMESPACE ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkImageView imageView, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_imageView( imageView ) - , m_device( *device ) + : m_device( &device ) + , m_imageView( imageView ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7174,15 +7230,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_imageView ) { - getDispatcher()->vkDestroyImageView( m_device, static_cast( m_imageView ), m_allocator ); + getDispatcher()->vkDestroyImageView( + static_cast( **m_device ), static_cast( m_imageView ), m_allocator ); } } ImageView() = delete; ImageView( ImageView const & ) = delete; ImageView( ImageView && rhs ) VULKAN_HPP_NOEXCEPT - : m_imageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_imageView, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_imageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_imageView, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -7193,10 +7250,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_imageView ) { - getDispatcher()->vkDestroyImageView( m_device, static_cast( m_imageView ), m_allocator ); + getDispatcher()->vkDestroyImageView( + static_cast( **m_device ), static_cast( m_imageView ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_imageView = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_imageView, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -7208,9 +7266,9 @@ namespace VULKAN_HPP_NAMESPACE return m_imageView; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -7224,8 +7282,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX getAddressNVX() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::ImageView m_imageView; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7245,13 +7303,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateIndirectCommandsLayoutNV( + static_cast( device.getDispatcher()->vkCreateIndirectCommandsLayoutNV( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -7266,8 +7324,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkIndirectCommandsLayoutNV indirectCommandsLayoutNV, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_indirectCommandsLayoutNV( indirectCommandsLayoutNV ) - , m_device( *device ) + : m_device( &device ) + , m_indirectCommandsLayoutNV( indirectCommandsLayoutNV ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7280,16 +7338,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_indirectCommandsLayoutNV ) { getDispatcher()->vkDestroyIndirectCommandsLayoutNV( - m_device, static_cast( m_indirectCommandsLayoutNV ), m_allocator ); + static_cast( **m_device ), + static_cast( m_indirectCommandsLayoutNV ), + m_allocator ); } } IndirectCommandsLayoutNV() = delete; IndirectCommandsLayoutNV( IndirectCommandsLayoutNV const & ) = delete; IndirectCommandsLayoutNV( IndirectCommandsLayoutNV && rhs ) VULKAN_HPP_NOEXCEPT - : m_indirectCommandsLayoutNV( + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_indirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_indirectCommandsLayoutNV, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -7301,11 +7361,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_indirectCommandsLayoutNV ) { getDispatcher()->vkDestroyIndirectCommandsLayoutNV( - m_device, static_cast( m_indirectCommandsLayoutNV ), m_allocator ); + static_cast( **m_device ), + static_cast( m_indirectCommandsLayoutNV ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_indirectCommandsLayoutNV = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_indirectCommandsLayoutNV, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -7317,9 +7379,9 @@ namespace VULKAN_HPP_NAMESPACE return m_indirectCommandsLayoutNV; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -7329,8 +7391,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV m_indirectCommandsLayoutNV; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7349,10 +7411,10 @@ namespace VULKAN_HPP_NAMESPACE PerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) - : m_device( *device ), m_dispatcher( device.getDispatcher() ) + : m_device( &device ), m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkAcquirePerformanceConfigurationINTEL( + static_cast( device.getDispatcher()->vkAcquirePerformanceConfigurationINTEL( static_cast( *device ), reinterpret_cast( &acquireInfo ), reinterpret_cast( &m_performanceConfigurationINTEL ) ) ); @@ -7364,8 +7426,8 @@ namespace VULKAN_HPP_NAMESPACE PerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPerformanceConfigurationINTEL performanceConfigurationINTEL ) - : m_performanceConfigurationINTEL( performanceConfigurationINTEL ) - , m_device( *device ) + : m_device( &device ) + , m_performanceConfigurationINTEL( performanceConfigurationINTEL ) , m_dispatcher( device.getDispatcher() ) {} @@ -7376,16 +7438,17 @@ namespace VULKAN_HPP_NAMESPACE if ( m_performanceConfigurationINTEL ) { getDispatcher()->vkReleasePerformanceConfigurationINTEL( - m_device, static_cast( m_performanceConfigurationINTEL ) ); + static_cast( **m_device ), + static_cast( m_performanceConfigurationINTEL ) ); } } PerformanceConfigurationINTEL() = delete; PerformanceConfigurationINTEL( PerformanceConfigurationINTEL const & ) = delete; PerformanceConfigurationINTEL( PerformanceConfigurationINTEL && rhs ) VULKAN_HPP_NOEXCEPT - : m_performanceConfigurationINTEL( + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_performanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_performanceConfigurationINTEL, {} ) ) - , m_device( rhs.m_device ) , m_dispatcher( rhs.m_dispatcher ) {} PerformanceConfigurationINTEL & operator=( PerformanceConfigurationINTEL const & ) = delete; @@ -7396,11 +7459,12 @@ namespace VULKAN_HPP_NAMESPACE if ( m_performanceConfigurationINTEL ) { getDispatcher()->vkReleasePerformanceConfigurationINTEL( - m_device, static_cast( m_performanceConfigurationINTEL ) ); + static_cast( **m_device ), + static_cast( m_performanceConfigurationINTEL ) ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_performanceConfigurationINTEL = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_performanceConfigurationINTEL, {} ); - m_device = rhs.m_device; m_dispatcher = rhs.m_dispatcher; } return *this; @@ -7411,9 +7475,9 @@ namespace VULKAN_HPP_NAMESPACE return m_performanceConfigurationINTEL; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -7423,8 +7487,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL m_performanceConfigurationINTEL; - VkDevice m_device; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7443,16 +7507,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreatePipelineCache( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_pipelineCache ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( device.getDispatcher()->vkCreatePipelineCache( + static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_pipelineCache ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreatePipelineCache" ); @@ -7463,8 +7528,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_pipelineCache( pipelineCache ) - , m_device( *device ) + : m_device( &device ) + , m_pipelineCache( pipelineCache ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7477,15 +7542,15 @@ namespace VULKAN_HPP_NAMESPACE if ( m_pipelineCache ) { getDispatcher()->vkDestroyPipelineCache( - m_device, static_cast( m_pipelineCache ), m_allocator ); + static_cast( **m_device ), static_cast( m_pipelineCache ), m_allocator ); } } PipelineCache() = delete; PipelineCache( PipelineCache const & ) = delete; PipelineCache( PipelineCache && rhs ) VULKAN_HPP_NOEXCEPT - : m_pipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineCache, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_pipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineCache, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -7497,10 +7562,10 @@ namespace VULKAN_HPP_NAMESPACE if ( m_pipelineCache ) { getDispatcher()->vkDestroyPipelineCache( - m_device, static_cast( m_pipelineCache ), m_allocator ); + static_cast( **m_device ), static_cast( m_pipelineCache ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_pipelineCache = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineCache, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -7512,9 +7577,9 @@ namespace VULKAN_HPP_NAMESPACE return m_pipelineCache; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -7530,8 +7595,8 @@ namespace VULKAN_HPP_NAMESPACE void merge( ArrayProxy const & srcCaches ) const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::PipelineCache m_pipelineCache; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -7553,7 +7618,7 @@ namespace VULKAN_HPP_NAMESPACE pipelineCache, VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7578,7 +7643,7 @@ namespace VULKAN_HPP_NAMESPACE pipelineCache, VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7606,7 +7671,7 @@ namespace VULKAN_HPP_NAMESPACE pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7635,7 +7700,7 @@ namespace VULKAN_HPP_NAMESPACE pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7657,40 +7722,32 @@ namespace VULKAN_HPP_NAMESPACE Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipeline pipeline, - VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_pipeline( pipeline ) - , m_device( *device ) + VULKAN_HPP_NAMESPACE::Optional allocator = nullptr, + VULKAN_HPP_NAMESPACE::Result successCode = VULKAN_HPP_NAMESPACE::Result::eSuccess ) + : m_device( &device ) + , m_pipeline( pipeline ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) + , m_constructorSuccessCode( successCode ) , m_dispatcher( device.getDispatcher() ) {} - Pipeline( VkPipeline pipeline, - VkDevice device, - VkAllocationCallbacks const * allocator, - VULKAN_HPP_NAMESPACE::Result successCode, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher ) - : m_pipeline( pipeline ) - , m_device( device ) - , m_allocator( allocator ) - , m_constructorSuccessCode( successCode ) - , m_dispatcher( dispatcher ) - {} Pipeline( std::nullptr_t ) {} ~Pipeline() { if ( m_pipeline ) { - getDispatcher()->vkDestroyPipeline( m_device, static_cast( m_pipeline ), m_allocator ); + getDispatcher()->vkDestroyPipeline( + static_cast( **m_device ), static_cast( m_pipeline ), m_allocator ); } } Pipeline() = delete; Pipeline( Pipeline const & ) = delete; Pipeline( Pipeline && rhs ) VULKAN_HPP_NOEXCEPT - : m_pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipeline, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipeline, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -7701,10 +7758,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_pipeline ) { - getDispatcher()->vkDestroyPipeline( m_device, static_cast( m_pipeline ), m_allocator ); + getDispatcher()->vkDestroyPipeline( + static_cast( **m_device ), static_cast( m_pipeline ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_pipeline = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipeline, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -7721,9 +7779,9 @@ namespace VULKAN_HPP_NAMESPACE return m_constructorSuccessCode; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -7771,8 +7829,8 @@ namespace VULKAN_HPP_NAMESPACE uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Pipeline m_pipeline; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::Result m_constructorSuccessCode; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; @@ -7805,12 +7863,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( createInfos.size() ); for ( auto const & pipeline : pipelines ) { - this->emplace_back( pipeline, - static_cast( *device ), - reinterpret_cast( - static_cast( allocator ) ), - result, - dispatcher ); + this->emplace_back( device, pipeline, allocator, result ); } } else @@ -7843,12 +7896,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( createInfos.size() ); for ( auto const & pipeline : pipelines ) { - this->emplace_back( pipeline, - static_cast( *device ), - reinterpret_cast( - static_cast( allocator ) ), - result, - dispatcher ); + this->emplace_back( device, pipeline, allocator, result ); } } else @@ -7886,12 +7934,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( createInfos.size() ); for ( auto const & pipeline : pipelines ) { - this->emplace_back( pipeline, - static_cast( *device ), - reinterpret_cast( - static_cast( allocator ) ), - result, - dispatcher ); + this->emplace_back( device, pipeline, allocator, result ); } } else @@ -7924,12 +7967,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( createInfos.size() ); for ( auto const & pipeline : pipelines ) { - this->emplace_back( pipeline, - static_cast( *device ), - reinterpret_cast( - static_cast( allocator ) ), - result, - dispatcher ); + this->emplace_back( device, pipeline, allocator, result ); } } else @@ -7960,16 +7998,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreatePipelineLayout( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_pipelineLayout ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( device.getDispatcher()->vkCreatePipelineLayout( + static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_pipelineLayout ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreatePipelineLayout" ); @@ -7980,8 +8019,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineLayout pipelineLayout, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_pipelineLayout( pipelineLayout ) - , m_device( *device ) + : m_device( &device ) + , m_pipelineLayout( pipelineLayout ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -7994,15 +8033,15 @@ namespace VULKAN_HPP_NAMESPACE if ( m_pipelineLayout ) { getDispatcher()->vkDestroyPipelineLayout( - m_device, static_cast( m_pipelineLayout ), m_allocator ); + static_cast( **m_device ), static_cast( m_pipelineLayout ), m_allocator ); } } PipelineLayout() = delete; PipelineLayout( PipelineLayout const & ) = delete; PipelineLayout( PipelineLayout && rhs ) VULKAN_HPP_NOEXCEPT - : m_pipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_pipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -8014,10 +8053,10 @@ namespace VULKAN_HPP_NAMESPACE if ( m_pipelineLayout ) { getDispatcher()->vkDestroyPipelineLayout( - m_device, static_cast( m_pipelineLayout ), m_allocator ); + static_cast( **m_device ), static_cast( m_pipelineLayout ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_pipelineLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -8029,9 +8068,9 @@ namespace VULKAN_HPP_NAMESPACE return m_pipelineLayout; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -8041,8 +8080,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::PipelineLayout m_pipelineLayout; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8062,13 +8101,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreatePrivateDataSlotEXT( + static_cast( device.getDispatcher()->vkCreatePrivateDataSlotEXT( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -8083,8 +8122,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPrivateDataSlotEXT privateDataSlotEXT, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_privateDataSlotEXT( privateDataSlotEXT ) - , m_device( *device ) + : m_device( &device ) + , m_privateDataSlotEXT( privateDataSlotEXT ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -8096,17 +8135,18 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_privateDataSlotEXT ) { - getDispatcher()->vkDestroyPrivateDataSlotEXT( - m_device, static_cast( m_privateDataSlotEXT ), m_allocator ); + getDispatcher()->vkDestroyPrivateDataSlotEXT( static_cast( **m_device ), + static_cast( m_privateDataSlotEXT ), + m_allocator ); } } PrivateDataSlotEXT() = delete; PrivateDataSlotEXT( PrivateDataSlotEXT const & ) = delete; PrivateDataSlotEXT( PrivateDataSlotEXT && rhs ) VULKAN_HPP_NOEXCEPT - : m_privateDataSlotEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_privateDataSlotEXT, + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_privateDataSlotEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_privateDataSlotEXT, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -8117,12 +8157,13 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_privateDataSlotEXT ) { - getDispatcher()->vkDestroyPrivateDataSlotEXT( - m_device, static_cast( m_privateDataSlotEXT ), m_allocator ); + getDispatcher()->vkDestroyPrivateDataSlotEXT( static_cast( **m_device ), + static_cast( m_privateDataSlotEXT ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_privateDataSlotEXT = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_privateDataSlotEXT, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -8134,9 +8175,9 @@ namespace VULKAN_HPP_NAMESPACE return m_privateDataSlotEXT; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -8146,8 +8187,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT m_privateDataSlotEXT; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8166,16 +8207,16 @@ namespace VULKAN_HPP_NAMESPACE QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateQueryPool( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_queryPool ) ) ); + device.getDispatcher()->vkCreateQueryPool( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_queryPool ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateQueryPool" ); @@ -8185,8 +8226,8 @@ namespace VULKAN_HPP_NAMESPACE QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueryPool queryPool, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_queryPool( queryPool ) - , m_device( *device ) + : m_device( &device ) + , m_queryPool( queryPool ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -8198,15 +8239,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_queryPool ) { - getDispatcher()->vkDestroyQueryPool( m_device, static_cast( m_queryPool ), m_allocator ); + getDispatcher()->vkDestroyQueryPool( + static_cast( **m_device ), static_cast( m_queryPool ), m_allocator ); } } QueryPool() = delete; QueryPool( QueryPool const & ) = delete; QueryPool( QueryPool && rhs ) VULKAN_HPP_NOEXCEPT - : m_queryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queryPool, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_queryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queryPool, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -8217,10 +8259,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_queryPool ) { - getDispatcher()->vkDestroyQueryPool( m_device, static_cast( m_queryPool ), m_allocator ); + getDispatcher()->vkDestroyQueryPool( + static_cast( **m_device ), static_cast( m_queryPool ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_queryPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queryPool, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -8232,9 +8275,9 @@ namespace VULKAN_HPP_NAMESPACE return m_queryPool; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -8269,8 +8312,8 @@ namespace VULKAN_HPP_NAMESPACE void resetEXT( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::QueryPool m_queryPool; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8289,7 +8332,7 @@ namespace VULKAN_HPP_NAMESPACE Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, uint32_t queueFamilyIndex, uint32_t queueIndex ) - : m_dispatcher( device.getDispatcher() ) + : m_device( &device ), m_dispatcher( device.getDispatcher() ) { getDispatcher()->vkGetDeviceQueue( static_cast( *device ), queueFamilyIndex, queueIndex, reinterpret_cast( &m_queue ) ); @@ -8297,7 +8340,7 @@ namespace VULKAN_HPP_NAMESPACE Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) - : m_dispatcher( device.getDispatcher() ) + : m_device( &device ), m_dispatcher( device.getDispatcher() ) { getDispatcher()->vkGetDeviceQueue2( static_cast( *device ), reinterpret_cast( &queueInfo ), @@ -8305,7 +8348,7 @@ namespace VULKAN_HPP_NAMESPACE } Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueue queue ) - : m_queue( queue ), m_dispatcher( device.getDispatcher() ) + : m_device( &device ), m_queue( queue ), m_dispatcher( device.getDispatcher() ) {} Queue( std::nullptr_t ) {} @@ -8313,7 +8356,8 @@ namespace VULKAN_HPP_NAMESPACE Queue() = delete; Queue( Queue const & ) = delete; Queue( Queue && rhs ) VULKAN_HPP_NOEXCEPT - : m_queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queue, {} ) ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queue, {} ) ) , m_dispatcher( rhs.m_dispatcher ) {} Queue & operator=( Queue const & ) = delete; @@ -8321,6 +8365,7 @@ namespace VULKAN_HPP_NAMESPACE { if ( this != &rhs ) { + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_queue = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queue, {} ); m_dispatcher = rhs.m_dispatcher; } @@ -8332,6 +8377,11 @@ namespace VULKAN_HPP_NAMESPACE return m_queue; } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT + { + return m_device; + } + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); @@ -8381,6 +8431,7 @@ namespace VULKAN_HPP_NAMESPACE getCheckpointData2NV() const VULKAN_HPP_NOEXCEPT; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Queue m_queue; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8399,16 +8450,16 @@ namespace VULKAN_HPP_NAMESPACE RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateRenderPass( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_renderPass ) ) ); + device.getDispatcher()->vkCreateRenderPass( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_renderPass ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateRenderPass" ); @@ -8418,16 +8469,16 @@ namespace VULKAN_HPP_NAMESPACE RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateRenderPass2( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_renderPass ) ) ); + device.getDispatcher()->vkCreateRenderPass2( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_renderPass ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateRenderPass2" ); @@ -8437,8 +8488,8 @@ namespace VULKAN_HPP_NAMESPACE RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkRenderPass renderPass, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_renderPass( renderPass ) - , m_device( *device ) + : m_device( &device ) + , m_renderPass( renderPass ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -8450,15 +8501,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_renderPass ) { - getDispatcher()->vkDestroyRenderPass( m_device, static_cast( m_renderPass ), m_allocator ); + getDispatcher()->vkDestroyRenderPass( + static_cast( **m_device ), static_cast( m_renderPass ), m_allocator ); } } RenderPass() = delete; RenderPass( RenderPass const & ) = delete; RenderPass( RenderPass && rhs ) VULKAN_HPP_NOEXCEPT - : m_renderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_renderPass, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_renderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_renderPass, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -8469,10 +8521,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_renderPass ) { - getDispatcher()->vkDestroyRenderPass( m_device, static_cast( m_renderPass ), m_allocator ); + getDispatcher()->vkDestroyRenderPass( + static_cast( **m_device ), static_cast( m_renderPass ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_renderPass = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_renderPass, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -8484,9 +8537,9 @@ namespace VULKAN_HPP_NAMESPACE return m_renderPass; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -8505,8 +8558,8 @@ namespace VULKAN_HPP_NAMESPACE getSubpassShadingMaxWorkgroupSizeHUAWEI() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::RenderPass m_renderPass; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8525,16 +8578,16 @@ namespace VULKAN_HPP_NAMESPACE Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateSampler( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_sampler ) ) ); + device.getDispatcher()->vkCreateSampler( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_sampler ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateSampler" ); @@ -8544,8 +8597,8 @@ namespace VULKAN_HPP_NAMESPACE Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSampler sampler, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_sampler( sampler ) - , m_device( *device ) + : m_device( &device ) + , m_sampler( sampler ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -8557,15 +8610,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_sampler ) { - getDispatcher()->vkDestroySampler( m_device, static_cast( m_sampler ), m_allocator ); + getDispatcher()->vkDestroySampler( + static_cast( **m_device ), static_cast( m_sampler ), m_allocator ); } } Sampler() = delete; Sampler( Sampler const & ) = delete; Sampler( Sampler && rhs ) VULKAN_HPP_NOEXCEPT - : m_sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_sampler, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_sampler, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -8576,10 +8630,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_sampler ) { - getDispatcher()->vkDestroySampler( m_device, static_cast( m_sampler ), m_allocator ); + getDispatcher()->vkDestroySampler( + static_cast( **m_device ), static_cast( m_sampler ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_sampler = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_sampler, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -8591,9 +8646,9 @@ namespace VULKAN_HPP_NAMESPACE return m_sampler; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -8603,8 +8658,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Sampler m_sampler; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8624,13 +8679,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateSamplerYcbcrConversion( + static_cast( device.getDispatcher()->vkCreateSamplerYcbcrConversion( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -8645,8 +8700,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSamplerYcbcrConversion samplerYcbcrConversion, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_samplerYcbcrConversion( samplerYcbcrConversion ) - , m_device( *device ) + : m_device( &device ) + , m_samplerYcbcrConversion( samplerYcbcrConversion ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -8659,16 +8714,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_samplerYcbcrConversion ) { getDispatcher()->vkDestroySamplerYcbcrConversion( - m_device, static_cast( m_samplerYcbcrConversion ), m_allocator ); + static_cast( **m_device ), + static_cast( m_samplerYcbcrConversion ), + m_allocator ); } } SamplerYcbcrConversion() = delete; SamplerYcbcrConversion( SamplerYcbcrConversion const & ) = delete; SamplerYcbcrConversion( SamplerYcbcrConversion && rhs ) VULKAN_HPP_NOEXCEPT - : m_samplerYcbcrConversion( + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_samplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_samplerYcbcrConversion, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -8680,11 +8737,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_samplerYcbcrConversion ) { getDispatcher()->vkDestroySamplerYcbcrConversion( - m_device, static_cast( m_samplerYcbcrConversion ), m_allocator ); + static_cast( **m_device ), + static_cast( m_samplerYcbcrConversion ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_samplerYcbcrConversion = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_samplerYcbcrConversion, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -8696,9 +8755,9 @@ namespace VULKAN_HPP_NAMESPACE return m_samplerYcbcrConversion; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -8708,8 +8767,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion m_samplerYcbcrConversion; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8728,16 +8787,16 @@ namespace VULKAN_HPP_NAMESPACE Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateSemaphore( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_semaphore ) ) ); + device.getDispatcher()->vkCreateSemaphore( static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_semaphore ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateSemaphore" ); @@ -8747,8 +8806,8 @@ namespace VULKAN_HPP_NAMESPACE Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSemaphore semaphore, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_semaphore( semaphore ) - , m_device( *device ) + : m_device( &device ) + , m_semaphore( semaphore ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -8760,15 +8819,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_semaphore ) { - getDispatcher()->vkDestroySemaphore( m_device, static_cast( m_semaphore ), m_allocator ); + getDispatcher()->vkDestroySemaphore( + static_cast( **m_device ), static_cast( m_semaphore ), m_allocator ); } } Semaphore() = delete; Semaphore( Semaphore const & ) = delete; Semaphore( Semaphore && rhs ) VULKAN_HPP_NOEXCEPT - : m_semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_semaphore, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_semaphore, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -8779,10 +8839,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_semaphore ) { - getDispatcher()->vkDestroySemaphore( m_device, static_cast( m_semaphore ), m_allocator ); + getDispatcher()->vkDestroySemaphore( + static_cast( **m_device ), static_cast( m_semaphore ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_semaphore = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_semaphore, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -8794,9 +8855,9 @@ namespace VULKAN_HPP_NAMESPACE return m_semaphore; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -8814,8 +8875,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD uint64_t getCounterValueKHR() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::Semaphore m_semaphore; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8835,16 +8896,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateShaderModule( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_shaderModule ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( device.getDispatcher()->vkCreateShaderModule( + static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_shaderModule ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateShaderModule" ); @@ -8855,8 +8917,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkShaderModule shaderModule, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_shaderModule( shaderModule ) - , m_device( *device ) + : m_device( &device ) + , m_shaderModule( shaderModule ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -8869,15 +8931,15 @@ namespace VULKAN_HPP_NAMESPACE if ( m_shaderModule ) { getDispatcher()->vkDestroyShaderModule( - m_device, static_cast( m_shaderModule ), m_allocator ); + static_cast( **m_device ), static_cast( m_shaderModule ), m_allocator ); } } ShaderModule() = delete; ShaderModule( ShaderModule const & ) = delete; ShaderModule( ShaderModule && rhs ) VULKAN_HPP_NOEXCEPT - : m_shaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_shaderModule, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_shaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_shaderModule, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -8889,10 +8951,10 @@ namespace VULKAN_HPP_NAMESPACE if ( m_shaderModule ) { getDispatcher()->vkDestroyShaderModule( - m_device, static_cast( m_shaderModule ), m_allocator ); + static_cast( **m_device ), static_cast( m_shaderModule ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_shaderModule = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_shaderModule, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -8904,9 +8966,9 @@ namespace VULKAN_HPP_NAMESPACE return m_shaderModule; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -8916,8 +8978,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::ShaderModule m_shaderModule; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -8937,13 +8999,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateAndroidSurfaceKHR( + static_cast( instance.getDispatcher()->vkCreateAndroidSurfaceKHR( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -8959,13 +9021,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateDirectFBSurfaceEXT( + static_cast( instance.getDispatcher()->vkCreateDirectFBSurfaceEXT( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -8980,13 +9042,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateDisplayPlaneSurfaceKHR( + static_cast( instance.getDispatcher()->vkCreateDisplayPlaneSurfaceKHR( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9000,13 +9062,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateHeadlessSurfaceEXT( + static_cast( instance.getDispatcher()->vkCreateHeadlessSurfaceEXT( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9021,16 +9083,17 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateIOSSurfaceMVK( static_cast( *instance ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_surfaceKHR ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( instance.getDispatcher()->vkCreateIOSSurfaceMVK( + static_cast( *instance ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_surfaceKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateIOSSurfaceMVK" ); @@ -9042,13 +9105,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateImagePipeSurfaceFUCHSIA( + static_cast( instance.getDispatcher()->vkCreateImagePipeSurfaceFUCHSIA( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9064,13 +9127,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateMacOSSurfaceMVK( + static_cast( instance.getDispatcher()->vkCreateMacOSSurfaceMVK( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9086,13 +9149,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateMetalSurfaceEXT( + static_cast( instance.getDispatcher()->vkCreateMetalSurfaceEXT( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9108,13 +9171,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateScreenSurfaceQNX( + static_cast( instance.getDispatcher()->vkCreateScreenSurfaceQNX( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9130,13 +9193,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateStreamDescriptorSurfaceGGP( + static_cast( instance.getDispatcher()->vkCreateStreamDescriptorSurfaceGGP( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9152,16 +9215,17 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateViSurfaceNN( static_cast( *instance ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_surfaceKHR ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( instance.getDispatcher()->vkCreateViSurfaceNN( + static_cast( *instance ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_surfaceKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateViSurfaceNN" ); @@ -9173,13 +9237,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateWaylandSurfaceKHR( + static_cast( instance.getDispatcher()->vkCreateWaylandSurfaceKHR( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9195,13 +9259,13 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateWin32SurfaceKHR( + static_cast( instance.getDispatcher()->vkCreateWin32SurfaceKHR( static_cast( *instance ), reinterpret_cast( &createInfo ), m_allocator, @@ -9217,16 +9281,17 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateXcbSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_surfaceKHR ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( instance.getDispatcher()->vkCreateXcbSurfaceKHR( + static_cast( *instance ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_surfaceKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateXcbSurfaceKHR" ); @@ -9238,16 +9303,17 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_instance( *instance ) + : m_instance( &instance ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateXlibSurfaceKHR( static_cast( *instance ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_surfaceKHR ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( instance.getDispatcher()->vkCreateXlibSurfaceKHR( + static_cast( *instance ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_surfaceKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateXlibSurfaceKHR" ); @@ -9258,8 +9324,8 @@ namespace VULKAN_HPP_NAMESPACE SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkSurfaceKHR surfaceKHR, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_surfaceKHR( surfaceKHR ) - , m_instance( *instance ) + : m_instance( &instance ) + , m_surfaceKHR( surfaceKHR ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( instance.getDispatcher() ) @@ -9271,15 +9337,16 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_surfaceKHR ) { - getDispatcher()->vkDestroySurfaceKHR( m_instance, static_cast( m_surfaceKHR ), m_allocator ); + getDispatcher()->vkDestroySurfaceKHR( + static_cast( **m_instance ), static_cast( m_surfaceKHR ), m_allocator ); } } SurfaceKHR() = delete; SurfaceKHR( SurfaceKHR const & ) = delete; SurfaceKHR( SurfaceKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_surfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_surfaceKHR, {} ) ) - , m_instance( rhs.m_instance ) + : m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, nullptr ) ) + , m_surfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_surfaceKHR, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -9290,10 +9357,11 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_surfaceKHR ) { - getDispatcher()->vkDestroySurfaceKHR( m_instance, static_cast( m_surfaceKHR ), m_allocator ); + getDispatcher()->vkDestroySurfaceKHR( + static_cast( **m_instance ), static_cast( m_surfaceKHR ), m_allocator ); } + m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, nullptr ); m_surfaceKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_surfaceKHR, {} ); - m_instance = rhs.m_instance; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -9305,9 +9373,9 @@ namespace VULKAN_HPP_NAMESPACE return m_surfaceKHR; } - VULKAN_HPP_NAMESPACE::Instance getInstance() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const * getInstance() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_instance ); + return m_instance; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const @@ -9317,8 +9385,8 @@ namespace VULKAN_HPP_NAMESPACE } private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const * m_instance = nullptr; VULKAN_HPP_NAMESPACE::SurfaceKHR m_surfaceKHR; - VkInstance m_instance; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher = nullptr; }; @@ -9338,16 +9406,17 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { - VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkCreateSwapchainKHR( static_cast( *device ), - reinterpret_cast( &createInfo ), - m_allocator, - reinterpret_cast( &m_swapchainKHR ) ) ); + VULKAN_HPP_NAMESPACE::Result result = + static_cast( device.getDispatcher()->vkCreateSwapchainKHR( + static_cast( *device ), + reinterpret_cast( &createInfo ), + m_allocator, + reinterpret_cast( &m_swapchainKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, "vkCreateSwapchainKHR" ); @@ -9358,19 +9427,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSwapchainKHR swapchainKHR, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_swapchainKHR( swapchainKHR ) - , m_device( *device ) + : m_device( &device ) + , m_swapchainKHR( swapchainKHR ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) {} - SwapchainKHR( VkSwapchainKHR swapchainKHR, - VkDevice device, - VkAllocationCallbacks const * allocator, - VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * dispatcher ) - : m_swapchainKHR( swapchainKHR ), m_device( device ), m_allocator( allocator ), m_dispatcher( dispatcher ) - {} SwapchainKHR( std::nullptr_t ) {} ~SwapchainKHR() @@ -9378,15 +9441,15 @@ namespace VULKAN_HPP_NAMESPACE if ( m_swapchainKHR ) { getDispatcher()->vkDestroySwapchainKHR( - m_device, static_cast( m_swapchainKHR ), m_allocator ); + static_cast( **m_device ), static_cast( m_swapchainKHR ), m_allocator ); } } SwapchainKHR() = delete; SwapchainKHR( SwapchainKHR const & ) = delete; SwapchainKHR( SwapchainKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_swapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_swapchainKHR, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_swapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_swapchainKHR, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -9398,10 +9461,10 @@ namespace VULKAN_HPP_NAMESPACE if ( m_swapchainKHR ) { getDispatcher()->vkDestroySwapchainKHR( - m_device, static_cast( m_swapchainKHR ), m_allocator ); + static_cast( **m_device ), static_cast( m_swapchainKHR ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_swapchainKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_swapchainKHR, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -9413,9 +9476,9 @@ namespace VULKAN_HPP_NAMESPACE return m_swapchainKHR; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -9465,8 +9528,8 @@ namespace VULKAN_HPP_NAMESPACE # endif /*VK_USE_PLATFORM_WIN32_KHR*/ private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::SwapchainKHR m_swapchainKHR; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9494,11 +9557,7 @@ namespace VULKAN_HPP_NAMESPACE this->reserve( createInfos.size() ); for ( auto const & swapchainKHR : swapchains ) { - this->emplace_back( swapchainKHR, - static_cast( *device ), - reinterpret_cast( - static_cast( allocator ) ), - dispatcher ); + this->emplace_back( device, swapchainKHR, allocator ); } } else @@ -9529,13 +9588,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateValidationCacheEXT( + static_cast( device.getDispatcher()->vkCreateValidationCacheEXT( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -9550,8 +9609,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkValidationCacheEXT validationCacheEXT, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_validationCacheEXT( validationCacheEXT ) - , m_device( *device ) + : m_device( &device ) + , m_validationCacheEXT( validationCacheEXT ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -9563,17 +9622,18 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_validationCacheEXT ) { - getDispatcher()->vkDestroyValidationCacheEXT( - m_device, static_cast( m_validationCacheEXT ), m_allocator ); + getDispatcher()->vkDestroyValidationCacheEXT( static_cast( **m_device ), + static_cast( m_validationCacheEXT ), + m_allocator ); } } ValidationCacheEXT() = delete; ValidationCacheEXT( ValidationCacheEXT const & ) = delete; ValidationCacheEXT( ValidationCacheEXT && rhs ) VULKAN_HPP_NOEXCEPT - : m_validationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_validationCacheEXT, + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_validationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_validationCacheEXT, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -9584,12 +9644,13 @@ namespace VULKAN_HPP_NAMESPACE { if ( m_validationCacheEXT ) { - getDispatcher()->vkDestroyValidationCacheEXT( - m_device, static_cast( m_validationCacheEXT ), m_allocator ); + getDispatcher()->vkDestroyValidationCacheEXT( static_cast( **m_device ), + static_cast( m_validationCacheEXT ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_validationCacheEXT = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_validationCacheEXT, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -9601,9 +9662,9 @@ namespace VULKAN_HPP_NAMESPACE return m_validationCacheEXT; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -9619,8 +9680,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD std::vector getData() const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::ValidationCacheEXT m_validationCacheEXT; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9641,13 +9702,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateVideoSessionKHR( + static_cast( device.getDispatcher()->vkCreateVideoSessionKHR( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -9662,8 +9723,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkVideoSessionKHR videoSessionKHR, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_videoSessionKHR( videoSessionKHR ) - , m_device( *device ) + : m_device( &device ) + , m_videoSessionKHR( videoSessionKHR ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -9676,15 +9737,15 @@ namespace VULKAN_HPP_NAMESPACE if ( m_videoSessionKHR ) { getDispatcher()->vkDestroyVideoSessionKHR( - m_device, static_cast( m_videoSessionKHR ), m_allocator ); + static_cast( **m_device ), static_cast( m_videoSessionKHR ), m_allocator ); } } VideoSessionKHR() = delete; VideoSessionKHR( VideoSessionKHR const & ) = delete; VideoSessionKHR( VideoSessionKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_videoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionKHR, {} ) ) - , m_device( rhs.m_device ) + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_videoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionKHR, {} ) ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -9696,10 +9757,10 @@ namespace VULKAN_HPP_NAMESPACE if ( m_videoSessionKHR ) { getDispatcher()->vkDestroyVideoSessionKHR( - m_device, static_cast( m_videoSessionKHR ), m_allocator ); + static_cast( **m_device ), static_cast( m_videoSessionKHR ), m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_videoSessionKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionKHR, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -9711,9 +9772,9 @@ namespace VULKAN_HPP_NAMESPACE return m_videoSessionKHR; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -9730,8 +9791,8 @@ namespace VULKAN_HPP_NAMESPACE bindMemory( ArrayProxy const & videoSessionBindMemories ) const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::VideoSessionKHR m_videoSessionKHR; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9753,13 +9814,13 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_device( *device ) + : m_device( &device ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) { VULKAN_HPP_NAMESPACE::Result result = - static_cast( getDispatcher()->vkCreateVideoSessionParametersKHR( + static_cast( device.getDispatcher()->vkCreateVideoSessionParametersKHR( static_cast( *device ), reinterpret_cast( &createInfo ), m_allocator, @@ -9774,8 +9835,8 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkVideoSessionParametersKHR videoSessionParametersKHR, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) - : m_videoSessionParametersKHR( videoSessionParametersKHR ) - , m_device( *device ) + : m_device( &device ) + , m_videoSessionParametersKHR( videoSessionParametersKHR ) , m_allocator( reinterpret_cast( static_cast( allocator ) ) ) , m_dispatcher( device.getDispatcher() ) @@ -9788,16 +9849,18 @@ namespace VULKAN_HPP_NAMESPACE if ( m_videoSessionParametersKHR ) { getDispatcher()->vkDestroyVideoSessionParametersKHR( - m_device, static_cast( m_videoSessionParametersKHR ), m_allocator ); + static_cast( **m_device ), + static_cast( m_videoSessionParametersKHR ), + m_allocator ); } } VideoSessionParametersKHR() = delete; VideoSessionParametersKHR( VideoSessionParametersKHR const & ) = delete; VideoSessionParametersKHR( VideoSessionParametersKHR && rhs ) VULKAN_HPP_NOEXCEPT - : m_videoSessionParametersKHR( + : m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ) ) + , m_videoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionParametersKHR, {} ) ) - , m_device( rhs.m_device ) , m_allocator( rhs.m_allocator ) , m_dispatcher( rhs.m_dispatcher ) {} @@ -9809,11 +9872,13 @@ namespace VULKAN_HPP_NAMESPACE if ( m_videoSessionParametersKHR ) { getDispatcher()->vkDestroyVideoSessionParametersKHR( - m_device, static_cast( m_videoSessionParametersKHR ), m_allocator ); + static_cast( **m_device ), + static_cast( m_videoSessionParametersKHR ), + m_allocator ); } + m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, nullptr ); m_videoSessionParametersKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionParametersKHR, {} ); - m_device = rhs.m_device; m_allocator = rhs.m_allocator; m_dispatcher = rhs.m_dispatcher; } @@ -9825,9 +9890,9 @@ namespace VULKAN_HPP_NAMESPACE return m_videoSessionParametersKHR; } - VULKAN_HPP_NAMESPACE::Device getDevice() const VULKAN_HPP_NOEXCEPT + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * getDevice() const VULKAN_HPP_NOEXCEPT { - return static_cast( m_device ); + return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const @@ -9841,8 +9906,8 @@ namespace VULKAN_HPP_NAMESPACE void update( const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo ) const; private: + VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const * m_device = nullptr; VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR m_videoSessionParametersKHR; - VkDevice m_device; const VkAllocationCallbacks * m_allocator = nullptr; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher = nullptr; }; @@ -9931,7 +9996,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); + VULKAN_HPP_ASSERT( queueFamilyPropertyCount == queueFamilyProperties.size() ); return queueFamilyProperties; } @@ -10145,7 +10210,7 @@ namespace VULKAN_HPP_NAMESPACE { void * pData; VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkMapMemory( static_cast( m_device ), + getDispatcher()->vkMapMemory( static_cast( **m_device ), static_cast( m_deviceMemory ), static_cast( offset ), static_cast( size ), @@ -10160,7 +10225,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE void DeviceMemory::unmapMemory() const VULKAN_HPP_NOEXCEPT { - getDispatcher()->vkUnmapMemory( static_cast( m_device ), + getDispatcher()->vkUnmapMemory( static_cast( **m_device ), static_cast( m_deviceMemory ) ); } @@ -10196,7 +10261,7 @@ namespace VULKAN_HPP_NAMESPACE DeviceMemory::getCommitment() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::DeviceSize committedMemoryInBytes; - getDispatcher()->vkGetDeviceMemoryCommitment( static_cast( m_device ), + getDispatcher()->vkGetDeviceMemoryCommitment( static_cast( **m_device ), static_cast( m_deviceMemory ), reinterpret_cast( &committedMemoryInBytes ) ); return committedMemoryInBytes; @@ -10206,7 +10271,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkBindBufferMemory( static_cast( m_device ), + getDispatcher()->vkBindBufferMemory( static_cast( **m_device ), static_cast( m_buffer ), static_cast( memory ), static_cast( memoryOffset ) ) ); @@ -10220,7 +10285,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkBindImageMemory( static_cast( m_device ), + getDispatcher()->vkBindImageMemory( static_cast( **m_device ), static_cast( m_image ), static_cast( memory ), static_cast( memoryOffset ) ) ); @@ -10234,7 +10299,7 @@ namespace VULKAN_HPP_NAMESPACE Buffer::getMemoryRequirements() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; - getDispatcher()->vkGetBufferMemoryRequirements( static_cast( m_device ), + getDispatcher()->vkGetBufferMemoryRequirements( static_cast( **m_device ), static_cast( m_buffer ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; @@ -10244,7 +10309,7 @@ namespace VULKAN_HPP_NAMESPACE Image::getMemoryRequirements() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; - getDispatcher()->vkGetImageMemoryRequirements( static_cast( m_device ), + getDispatcher()->vkGetImageMemoryRequirements( static_cast( **m_device ), static_cast( m_image ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; @@ -10255,15 +10320,15 @@ namespace VULKAN_HPP_NAMESPACE { uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetImageSparseMemoryRequirements( - static_cast( m_device ), static_cast( m_image ), &sparseMemoryRequirementCount, nullptr ); + static_cast( **m_device ), static_cast( m_image ), &sparseMemoryRequirementCount, nullptr ); std::vector sparseMemoryRequirements( sparseMemoryRequirementCount ); getDispatcher()->vkGetImageSparseMemoryRequirements( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); return sparseMemoryRequirements; } @@ -10295,7 +10360,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount == properties.size() ); return properties; } @@ -10333,7 +10398,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Fence::getStatus() const { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetFenceStatus( static_cast( m_device ), static_cast( m_fence ) ) ); + getDispatcher()->vkGetFenceStatus( static_cast( **m_device ), static_cast( m_fence ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eNotReady ) ) { @@ -10378,7 +10443,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Event::getStatus() const { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetEventStatus( static_cast( m_device ), static_cast( m_event ) ) ); + getDispatcher()->vkGetEventStatus( static_cast( **m_device ), static_cast( m_event ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eEventSet ) && ( result != VULKAN_HPP_NAMESPACE::Result::eEventReset ) ) { @@ -10390,7 +10455,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE void Event::set() const { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkSetEvent( static_cast( m_device ), static_cast( m_event ) ) ); + getDispatcher()->vkSetEvent( static_cast( **m_device ), static_cast( m_event ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Event::set" ); @@ -10400,7 +10465,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE void Event::reset() const { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkResetEvent( static_cast( m_device ), static_cast( m_event ) ) ); + getDispatcher()->vkResetEvent( static_cast( **m_device ), static_cast( m_event ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Event::reset" ); @@ -10425,7 +10490,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 ); std::vector data( dataSize / sizeof( T ) ); Result result = - static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), + static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( **m_device ), static_cast( m_queryPool ), firstQuery, queryCount, @@ -10450,7 +10515,7 @@ namespace VULKAN_HPP_NAMESPACE { T data; Result result = - static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), + static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( **m_device ), static_cast( m_queryPool ), firstQuery, queryCount, @@ -10491,7 +10556,7 @@ namespace VULKAN_HPP_NAMESPACE const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::SubresourceLayout layout; - getDispatcher()->vkGetImageSubresourceLayout( static_cast( m_device ), + getDispatcher()->vkGetImageSubresourceLayout( static_cast( **m_device ), static_cast( m_image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); @@ -10527,12 +10592,12 @@ namespace VULKAN_HPP_NAMESPACE do { result = static_cast( getDispatcher()->vkGetPipelineCacheData( - static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, nullptr ) ); + static_cast( **m_device ), static_cast( m_pipelineCache ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( - getDispatcher()->vkGetPipelineCacheData( static_cast( m_device ), + getDispatcher()->vkGetPipelineCacheData( static_cast( **m_device ), static_cast( m_pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); @@ -10554,7 +10619,7 @@ namespace VULKAN_HPP_NAMESPACE PipelineCache::merge( ArrayProxy const & srcCaches ) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkMergePipelineCaches( static_cast( m_device ), + getDispatcher()->vkMergePipelineCaches( static_cast( **m_device ), static_cast( m_pipelineCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ) ); @@ -10634,7 +10699,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE void DescriptorPool::reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT { - getDispatcher()->vkResetDescriptorPool( static_cast( m_device ), + getDispatcher()->vkResetDescriptorPool( static_cast( **m_device ), static_cast( m_descriptorPool ), static_cast( flags ) ); } @@ -10675,7 +10740,7 @@ namespace VULKAN_HPP_NAMESPACE RenderPass::getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_NAMESPACE::Extent2D granularity; - getDispatcher()->vkGetRenderAreaGranularity( static_cast( m_device ), + getDispatcher()->vkGetRenderAreaGranularity( static_cast( **m_device ), static_cast( m_renderPass ), reinterpret_cast( &granularity ) ); return granularity; @@ -10691,7 +10756,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE void CommandPool::reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags ) const { VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkResetCommandPool( static_cast( m_device ), + getDispatcher()->vkResetCommandPool( static_cast( **m_device ), static_cast( m_commandPool ), static_cast( flags ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) @@ -11418,7 +11483,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); return sparseMemoryRequirements; } @@ -11536,7 +11601,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); + VULKAN_HPP_ASSERT( queueFamilyPropertyCount == queueFamilyProperties.size() ); return queueFamilyProperties; } @@ -11604,14 +11669,14 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount == properties.size() ); return properties; } VULKAN_HPP_INLINE void CommandPool::trim( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT { - getDispatcher()->vkTrimCommandPool( static_cast( m_device ), + getDispatcher()->vkTrimCommandPool( static_cast( **m_device ), static_cast( m_commandPool ), static_cast( flags ) ); } @@ -11643,7 +11708,7 @@ namespace VULKAN_HPP_NAMESPACE const void * pData ) const VULKAN_HPP_NOEXCEPT { getDispatcher()->vkUpdateDescriptorSetWithTemplate( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); @@ -11780,7 +11845,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_INLINE void QueryPool::reset( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT { getDispatcher()->vkResetQueryPool( - static_cast( m_device ), static_cast( m_queryPool ), firstQuery, queryCount ); + static_cast( **m_device ), static_cast( m_queryPool ), firstQuery, queryCount ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Semaphore::getCounterValue() const @@ -11788,7 +11853,7 @@ namespace VULKAN_HPP_NAMESPACE uint64_t value; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreCounterValue( - static_cast( m_device ), static_cast( m_semaphore ), &value ) ); + static_cast( **m_device ), static_cast( m_semaphore ), &value ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); @@ -11981,7 +12046,7 @@ namespace VULKAN_HPP_NAMESPACE do { result = static_cast( - getDispatcher()->vkGetSwapchainImagesKHR( static_cast( m_device ), + getDispatcher()->vkGetSwapchainImagesKHR( static_cast( **m_device ), static_cast( m_swapchainKHR ), &swapchainImageCount, nullptr ) ); @@ -11989,7 +12054,7 @@ namespace VULKAN_HPP_NAMESPACE { swapchainImages.resize( swapchainImageCount ); result = static_cast( - getDispatcher()->vkGetSwapchainImagesKHR( static_cast( m_device ), + getDispatcher()->vkGetSwapchainImagesKHR( static_cast( **m_device ), static_cast( m_swapchainKHR ), &swapchainImageCount, swapchainImages.data() ) ); @@ -12017,7 +12082,7 @@ namespace VULKAN_HPP_NAMESPACE uint32_t imageIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkAcquireNextImageKHR( static_cast( m_device ), + getDispatcher()->vkAcquireNextImageKHR( static_cast( **m_device ), static_cast( m_swapchainKHR ), timeout, static_cast( semaphore ), @@ -12241,7 +12306,7 @@ namespace VULKAN_HPP_NAMESPACE do { result = static_cast( - getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), + getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( **m_physicalDevice ), static_cast( m_displayKHR ), &propertyCount, nullptr ) ); @@ -12249,7 +12314,7 @@ namespace VULKAN_HPP_NAMESPACE { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetDisplayModePropertiesKHR( - static_cast( m_physicalDevice ), + static_cast( **m_physicalDevice ), static_cast( m_displayKHR ), &propertyCount, reinterpret_cast( properties.data() ) ) ); @@ -12283,7 +12348,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( - static_cast( m_physicalDevice ), + static_cast( **m_display->getPhysicalDevice() ), static_cast( m_displayModeKHR ), planeIndex, reinterpret_cast( &capabilities ) ) ); @@ -12615,7 +12680,7 @@ namespace VULKAN_HPP_NAMESPACE do { result = static_cast( - getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( static_cast( m_device ), + getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( static_cast( **m_device ), static_cast( m_videoSessionKHR ), &videoSessionMemoryRequirementsCount, nullptr ) ); @@ -12623,7 +12688,7 @@ namespace VULKAN_HPP_NAMESPACE { videoSessionMemoryRequirements.resize( videoSessionMemoryRequirementsCount ); result = static_cast( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_videoSessionKHR ), &videoSessionMemoryRequirementsCount, reinterpret_cast( videoSessionMemoryRequirements.data() ) ) ); @@ -12650,7 +12715,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindVideoSessionMemoryKHR( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_videoSessionKHR ), videoSessionBindMemories.size(), reinterpret_cast( videoSessionBindMemories.data() ) ) ); @@ -12676,7 +12741,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkUpdateVideoSessionParametersKHR( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_videoSessionParametersKHR ), reinterpret_cast( &updateInfo ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) @@ -12919,7 +12984,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageViewAddressNVX( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_imageView ), reinterpret_cast( &properties ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) @@ -12986,7 +13051,7 @@ namespace VULKAN_HPP_NAMESPACE do { result = static_cast( - getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), + getDispatcher()->vkGetShaderInfoAMD( static_cast( **m_device ), static_cast( m_pipeline ), static_cast( shaderStage ), static_cast( infoType ), @@ -12996,7 +13061,7 @@ namespace VULKAN_HPP_NAMESPACE { info.resize( infoSize ); result = static_cast( - getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), + getDispatcher()->vkGetShaderInfoAMD( static_cast( **m_device ), static_cast( m_pipeline ), static_cast( shaderStage ), static_cast( infoType ), @@ -13073,7 +13138,7 @@ namespace VULKAN_HPP_NAMESPACE HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetMemoryWin32HandleNV( static_cast( m_device ), + getDispatcher()->vkGetMemoryWin32HandleNV( static_cast( **m_device ), static_cast( m_deviceMemory ), static_cast( handleType ), &handle ) ); @@ -13235,7 +13300,7 @@ namespace VULKAN_HPP_NAMESPACE static_cast( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); + VULKAN_HPP_ASSERT( queueFamilyPropertyCount == queueFamilyProperties.size() ); return queueFamilyProperties; } @@ -13320,7 +13385,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); - VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); + VULKAN_HPP_ASSERT( propertyCount == properties.size() ); return properties; } @@ -13391,7 +13456,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkTrimCommandPoolKHR && "Function needs extension enabled!" ); - getDispatcher()->vkTrimCommandPoolKHR( static_cast( m_device ), + getDispatcher()->vkTrimCommandPoolKHR( static_cast( **m_device ), static_cast( m_commandPool ), static_cast( flags ) ); } @@ -13729,7 +13794,7 @@ namespace VULKAN_HPP_NAMESPACE "Function needs extension enabled!" ); getDispatcher()->vkUpdateDescriptorSetWithTemplateKHR( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); @@ -13842,7 +13907,7 @@ namespace VULKAN_HPP_NAMESPACE uint64_t counterValue; VULKAN_HPP_NAMESPACE::Result result = static_cast( - getDispatcher()->vkGetSwapchainCounterEXT( static_cast( m_device ), + getDispatcher()->vkGetSwapchainCounterEXT( static_cast( **m_device ), static_cast( m_swapchainKHR ), static_cast( counter ), &counterValue ) ); @@ -13865,7 +13930,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRefreshCycleDurationGOOGLE( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_swapchainKHR ), reinterpret_cast( &displayTimingProperties ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) @@ -13888,7 +13953,7 @@ namespace VULKAN_HPP_NAMESPACE do { result = static_cast( - getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), + getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( **m_device ), static_cast( m_swapchainKHR ), &presentationTimingCount, nullptr ) ); @@ -13896,7 +13961,7 @@ namespace VULKAN_HPP_NAMESPACE { presentationTimings.resize( presentationTimingCount ); result = static_cast( getDispatcher()->vkGetPastPresentationTimingGOOGLE( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_swapchainKHR ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); @@ -14010,7 +14075,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSwapchainStatusKHR( - static_cast( m_device ), static_cast( m_swapchainKHR ) ) ); + static_cast( **m_device ), static_cast( m_swapchainKHR ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR ) ) { @@ -14365,7 +14430,7 @@ namespace VULKAN_HPP_NAMESPACE do { result = static_cast( - getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), + getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( **m_physicalDevice ), static_cast( m_displayKHR ), &propertyCount, nullptr ) ); @@ -14373,7 +14438,7 @@ namespace VULKAN_HPP_NAMESPACE { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetDisplayModeProperties2KHR( - static_cast( m_physicalDevice ), + static_cast( **m_physicalDevice ), static_cast( m_displayKHR ), &propertyCount, reinterpret_cast( properties.data() ) ) ); @@ -14730,7 +14795,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); return sparseMemoryRequirements; } @@ -15139,7 +15204,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) @@ -15167,7 +15232,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMergeValidationCachesEXT( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_validationCacheEXT ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ) ); @@ -15188,7 +15253,7 @@ namespace VULKAN_HPP_NAMESPACE do { result = static_cast( - getDispatcher()->vkGetValidationCacheDataEXT( static_cast( m_device ), + getDispatcher()->vkGetValidationCacheDataEXT( static_cast( **m_device ), static_cast( m_validationCacheEXT ), &dataSize, nullptr ) ); @@ -15196,7 +15261,7 @@ namespace VULKAN_HPP_NAMESPACE { data.resize( dataSize ); result = static_cast( - getDispatcher()->vkGetValidationCacheDataEXT( static_cast( m_device ), + getDispatcher()->vkGetValidationCacheDataEXT( static_cast( **m_device ), static_cast( m_validationCacheEXT ), &dataSize, reinterpret_cast( data.data() ) ) ); @@ -15425,7 +15490,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 ); std::vector data( dataSize / sizeof( T ) ); Result result = static_cast( - getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), + getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( **m_device ), static_cast( m_pipeline ), firstGroup, groupCount, @@ -15443,7 +15508,7 @@ namespace VULKAN_HPP_NAMESPACE { T data; Result result = static_cast( - getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), + getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( **m_device ), static_cast( m_pipeline ), firstGroup, groupCount, @@ -15465,7 +15530,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 ); std::vector data( dataSize / sizeof( T ) ); Result result = static_cast( getDispatcher()->vkGetAccelerationStructureHandleNV( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_accelerationStructureNV ), data.size() * sizeof( T ), reinterpret_cast( data.data() ) ) ); @@ -15481,7 +15546,7 @@ namespace VULKAN_HPP_NAMESPACE { T data; Result result = static_cast( getDispatcher()->vkGetAccelerationStructureHandleNV( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_accelerationStructureNV ), sizeof( T ), reinterpret_cast( &data ) ) ); @@ -15518,7 +15583,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCompileDeferredNV( - static_cast( m_device ), static_cast( m_pipeline ), shader ) ); + static_cast( **m_device ), static_cast( m_pipeline ), shader ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::compileDeferredNV" ); @@ -15819,7 +15884,7 @@ namespace VULKAN_HPP_NAMESPACE getDispatcher()->vkGetQueueCheckpointDataNV( static_cast( m_queue ), &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); - VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); + VULKAN_HPP_ASSERT( checkpointDataCount == checkpointData.size() ); return checkpointData; } @@ -15834,7 +15899,7 @@ namespace VULKAN_HPP_NAMESPACE uint64_t value; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreCounterValueKHR( - static_cast( m_device ), static_cast( m_semaphore ), &value ) ); + static_cast( **m_device ), static_cast( m_semaphore ), &value ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValueKHR" ); @@ -16003,7 +16068,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( getDispatcher()->vkSetLocalDimmingAMD && "Function needs extension enabled!" ); - getDispatcher()->vkSetLocalDimmingAMD( static_cast( m_device ), + getDispatcher()->vkSetLocalDimmingAMD( static_cast( **m_device ), static_cast( m_swapchainKHR ), static_cast( localDimmingEnable ) ); } @@ -16144,7 +16209,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWaitForPresentKHR( - static_cast( m_device ), static_cast( m_swapchainKHR ), presentId, timeout ) ); + static_cast( **m_device ), static_cast( m_swapchainKHR ), presentId, timeout ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) ) { @@ -16285,7 +16350,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireFullScreenExclusiveModeEXT( - static_cast( m_device ), static_cast( m_swapchainKHR ) ) ); + static_cast( **m_device ), static_cast( m_swapchainKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireFullScreenExclusiveModeEXT" ); @@ -16300,7 +16365,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkReleaseFullScreenExclusiveModeEXT( - static_cast( m_device ), static_cast( m_swapchainKHR ) ) ); + static_cast( **m_device ), static_cast( m_swapchainKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::releaseFullScreenExclusiveModeEXT" ); @@ -16393,7 +16458,7 @@ namespace VULKAN_HPP_NAMESPACE "Function needs extension enabled!" ); getDispatcher()->vkResetQueryPoolEXT( - static_cast( m_device ), static_cast( m_queryPool ), firstQuery, queryCount ); + static_cast( **m_device ), static_cast( m_queryPool ), firstQuery, queryCount ); } //=== VK_EXT_extended_dynamic_state === @@ -16584,7 +16649,7 @@ namespace VULKAN_HPP_NAMESPACE "Function needs extension enabled!" ); return getDispatcher()->vkGetDeferredOperationMaxConcurrencyKHR( - static_cast( m_device ), static_cast( m_deferredOperationKHR ) ); + static_cast( **m_device ), static_cast( m_deferredOperationKHR ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result @@ -16595,7 +16660,7 @@ namespace VULKAN_HPP_NAMESPACE "Function needs extension enabled!" ); return static_cast( getDispatcher()->vkGetDeferredOperationResultKHR( - static_cast( m_device ), static_cast( m_deferredOperationKHR ) ) ); + static_cast( **m_device ), static_cast( m_deferredOperationKHR ) ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result DeferredOperationKHR::join() const @@ -16606,7 +16671,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDeferredOperationJoinKHR( - static_cast( m_device ), static_cast( m_deferredOperationKHR ) ) ); + static_cast( **m_device ), static_cast( m_deferredOperationKHR ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR ) && ( result != VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR ) ) @@ -17028,7 +17093,7 @@ namespace VULKAN_HPP_NAMESPACE getDispatcher()->vkGetQueueCheckpointData2NV( static_cast( m_queue ), &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); - VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); + VULKAN_HPP_ASSERT( checkpointDataCount == checkpointData.size() ); return checkpointData; } @@ -17122,7 +17187,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireWinrtDisplayNV( - static_cast( m_physicalDevice ), static_cast( m_displayKHR ) ) ); + static_cast( **m_physicalDevice ), static_cast( m_displayKHR ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::acquireWinrtNV" ); @@ -17219,7 +17284,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 ); std::vector data( dataSize / sizeof( T ) ); Result result = static_cast( - getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), + getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( **m_device ), static_cast( m_pipeline ), firstGroup, groupCount, @@ -17237,7 +17302,7 @@ namespace VULKAN_HPP_NAMESPACE { T data; Result result = static_cast( - getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), + getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( **m_device ), static_cast( m_pipeline ), firstGroup, groupCount, @@ -17261,7 +17326,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 ); std::vector data( dataSize / sizeof( T ) ); Result result = static_cast( - getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), + getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( **m_device ), static_cast( m_pipeline ), firstGroup, groupCount, @@ -17281,7 +17346,7 @@ namespace VULKAN_HPP_NAMESPACE { T data; Result result = static_cast( - getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), + getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( **m_device ), static_cast( m_pipeline ), firstGroup, groupCount, @@ -17324,7 +17389,7 @@ namespace VULKAN_HPP_NAMESPACE "Function needs extension enabled!" ); return static_cast( - getDispatcher()->vkGetRayTracingShaderGroupStackSizeKHR( static_cast( m_device ), + getDispatcher()->vkGetRayTracingShaderGroupStackSizeKHR( static_cast( **m_device ), static_cast( m_pipeline ), group, static_cast( groupShader ) ) ); @@ -17467,7 +17532,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetBufferCollectionImageConstraintsFUCHSIA( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_bufferCollectionFUCHSIA ), reinterpret_cast( &imageConstraintsInfo ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) @@ -17485,7 +17550,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetBufferCollectionBufferConstraintsFUCHSIA( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_bufferCollectionFUCHSIA ), reinterpret_cast( &bufferConstraintsInfo ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) @@ -17504,7 +17569,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_bufferCollectionFUCHSIA ), reinterpret_cast( &properties ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) @@ -17527,7 +17592,7 @@ namespace VULKAN_HPP_NAMESPACE VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( - static_cast( m_device ), + static_cast( **m_device ), static_cast( m_renderPass ), reinterpret_cast( &maxWorkgroupSize ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && @@ -17726,7 +17791,7 @@ namespace VULKAN_HPP_NAMESPACE "Function needs extension enabled!" ); getDispatcher()->vkSetDeviceMemoryPriorityEXT( - static_cast( m_device ), static_cast( m_deviceMemory ), priority ); + static_cast( **m_device ), static_cast( m_deviceMemory ), priority ); } //=== VK_KHR_maintenance4 === @@ -17820,7 +17885,7 @@ namespace VULKAN_HPP_NAMESPACE reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); - VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); + VULKAN_HPP_ASSERT( sparseMemoryRequirementCount == sparseMemoryRequirements.size() ); return sparseMemoryRequirements; }