From d86303c0e45afa836acefba732917d88a346f522 Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Wed, 8 Jul 2020 10:58:37 +0200 Subject: [PATCH] Introduce structure constructors using ArrayProxyNoTemporaries --- VulkanHppGenerator.cpp | 297 ++- VulkanHppGenerator.hpp | 29 +- samples/01_InitInstance/01_InitInstance.cpp | 5 + .../02_EnumerateDevices.cpp | 5 + samples/03_InitDevice/03_InitDevice.cpp | 7 +- .../04_InitCommandBuffer.cpp | 5 + samples/05_InitSwapchain/05_InitSwapchain.cpp | 7 +- .../06_InitDepthBuffer/06_InitDepthBuffer.cpp | 4 +- .../07_InitUniformBuffer.cpp | 4 +- .../08_InitPipelineLayout.cpp | 8 +- .../09_InitDescriptorSet.cpp | 11 +- .../10_InitRenderPass/10_InitRenderPass.cpp | 18 +- samples/11_InitShaders/11_InitShaders.cpp | 12 +- .../12_InitFrameBuffers.cpp | 7 +- .../13_InitVertexBuffer.cpp | 7 +- samples/14_InitPipeline/14_InitPipeline.cpp | 30 +- samples/15_DrawCube/15_DrawCube.cpp | 21 +- samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp | 4 +- samples/CopyBlitImage/CopyBlitImage.cpp | 11 +- .../CreateDebugUtilsMessenger.cpp | 6 +- .../DebugUtilsObjectName.cpp | 4 +- samples/DrawTexturedCube/DrawTexturedCube.cpp | 21 +- samples/DynamicUniform/DynamicUniform.cpp | 21 +- .../EnableValidationWithCallback.cpp | 16 +- .../EnumerateDevicesAdvanced.cpp | 5 + samples/Events/Events.cpp | 8 +- samples/ImmutableSampler/ImmutableSampler.cpp | 38 +- samples/InitTexture/InitTexture.cpp | 7 +- samples/InputAttachment/InputAttachment.cpp | 27 +- .../InstanceExtensionProperties.cpp | 4 +- .../InstanceLayerExtensionProperties.cpp | 4 +- .../InstanceLayerProperties.cpp | 4 +- samples/InstanceVersion/InstanceVersion.cpp | 4 +- samples/MultipleSets/MultipleSets.cpp | 41 +- samples/OcclusionQuery/OcclusionQuery.cpp | 21 +- .../PhysicalDeviceExtensions.cpp | 4 +- .../PhysicalDeviceFeatures.cpp | 4 +- .../PhysicalDeviceGroups.cpp | 6 +- .../PhysicalDeviceMemoryProperties.cpp | 4 +- .../PhysicalDeviceProperties.cpp | 4 +- .../PhysicalDeviceQueueFamilyProperties.cpp | 4 +- samples/PipelineCache/PipelineCache.cpp | 21 +- .../PipelineDerivative/PipelineDerivative.cpp | 43 +- samples/PushConstants/PushConstants.cpp | 29 +- samples/PushDescriptors/PushDescriptors.cpp | 18 +- samples/RayTracing/RayTracing.cpp | 98 +- .../SecondaryCommandBuffer.cpp | 38 +- .../SeparateImageSampler.cpp | 54 +- .../SurfaceCapabilities.cpp | 4 +- samples/SurfaceFormats/SurfaceFormats.cpp | 4 +- samples/Template/Template.cpp | 21 +- samples/TexelBuffer/TexelBuffer.cpp | 16 +- samples/utils/shaders.cpp | 3 +- samples/utils/utils.cpp | 77 +- tests/DeviceFunctions/DeviceFunctions.cpp | 2 +- tests/NoExceptions/NoExceptions.cpp | 2 +- vulkan/vulkan.hpp | 1654 ++++++++++++++++- 57 files changed, 2229 insertions(+), 604 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 332c345..8808959 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -90,6 +90,11 @@ std::string trimEnd( std::string const & input ); std::string trimStars( std::string const & input ); void warn( bool condition, int line, std::string const & message ); +const std::set ignoreLens = { "null-terminated", + R"(latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil])", + "2*VK_UUID_SIZE", + "2*ename:VK_UUID_SIZE" }; + const std::set nonConstSTypeStructs = { "VkBaseInStructure", "VkBaseOutStructure" }; void appendArgumentCount( std::string & str, @@ -3582,6 +3587,21 @@ std::string : ""; } +template +std::vector findAll( InputIt first, InputIt last, UnaryPredicate p ) +{ + std::vector result; + while ( first != last ) + { + if ( p( *first ) ) + { + result.push_back( first ); + } + ++first; + } + return result; +} + void VulkanHppGenerator::appendStructConstructors( std::string & str, std::pair const & structData, std::string const & prefix ) const @@ -3605,7 +3625,7 @@ ${prefix}} for ( auto const & member : structData.second.members ) { // gather the arguments - listedArgument = appendStructConstructorArgument( arguments, listedArgument, member ); + listedArgument = appendStructConstructorArgument( arguments, listedArgument, member, true ); // gather the initializers; skip members 'pNext' and 'sType', they are directly set by initializers if ( ( member.name != "pNext" ) && ( member.name != "sType" ) ) @@ -3621,16 +3641,117 @@ ${prefix}} { "initializers", initializers }, { "prefix", prefix }, { "structName", stripPrefix( structData.first, "Vk" ) } } ); + + appendStructConstructorsEnhanced( str, structData, prefix ); +} + +void VulkanHppGenerator::appendStructConstructorsEnhanced( std::string & str, + std::pair const & structData, + std::string const & prefix ) const +{ + auto memberIts = + findAll( structData.second.members.begin(), structData.second.members.end(), []( MemberData const & md ) { + return !md.len.empty() && ( ignoreLens.find( md.len.front() ) == ignoreLens.end() ); + } ); + if ( !memberIts.empty() ) + { + // maximal one member to be handled by an ArrayProxyNoTemporaries is of type void + assert( std::count_if( memberIts.begin(), memberIts.end(), []( auto it ) { return it->type.type == "void"; } ) <= + 1 ); + + // map from len-members to all the array members using that len + std::map::const_iterator, std::vector::const_iterator>> lenIts; + for ( auto const & mit : memberIts ) + { + std::string lenName = + ( mit->len.front() == R"(latexmath:[\textrm{codeSize} \over 4])" ) ? "codeSize" : mit->len.front(); + auto lenIt = std::find_if( + structData.second.members.begin(), mit, [&lenName]( MemberData const & md ) { return md.name == lenName; } ); + assert( lenIt != mit ); + lenIts[lenIt].push_back( mit ); + } + + std::string arguments, initializers; + bool listedArgument = false; + bool firstArgument = true; + bool arrayListed = false; + std::string templateHeader, sizeChecks; + for ( auto mit = structData.second.members.begin(); mit != structData.second.members.end(); ++mit ) + { + // gather the initializers; skip members 'pNext' and 'sType', they are directly set by initializers + if ( ( mit->name != "pNext" ) && ( mit->name != "sType" ) ) + { + auto litit = lenIts.find( mit ); + if ( litit != lenIts.end() ) + { + // len arguments just have an initalizer, from the ArrayProxyNoTemporaries size + assert( ( litit->second.size() == 1 ) || !litit->second.front()->optional ); + initializers += + ( firstArgument ? ": " : ", " ) + mit->name + "( " + generateLenInitializer( mit, litit ) + " )"; + sizeChecks += generateSizeCheck( litit->second, stripPrefix(structData.first, "Vk"), prefix ); + } + else if ( std::find( memberIts.begin(), memberIts.end(), mit ) != memberIts.end() ) + { + assert( beginsWith( mit->name, "p" ) ); + std::string argumentName = startLowerCase( stripPrefix( mit->name, "p" ) ) + "_"; + + assert( endsWith( mit->type.postfix, "*" ) ); + std::string argumentType = stripPostfix( mit->type.compose(), "*" ); + if ( mit->type.type == "void" ) + { + templateHeader = prefix + "template \n"; + + size_t pos = argumentType.find( "void" ); + assert( pos != std::string::npos ); + argumentType.replace( pos, strlen( "void" ), "T" ); + } + + arguments += listedArgument ? ", " : ""; + arguments += "VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<" + argumentType + "> const & " + argumentName; + if ( arrayListed ) + { + arguments += " = {}"; + } + listedArgument = true; + arrayListed = true; + + initializers += ( firstArgument ? ": " : ", " ) + mit->name + "( " + argumentName + ".data() )"; + } + else + { + listedArgument = appendStructConstructorArgument( arguments, listedArgument, *mit, arrayListed ); + initializers += ( firstArgument ? ": " : ", " ) + mit->name + "( " + mit->name + "_ )"; + } + firstArgument = false; + } + } + static const std::string constructorTemplate = R"( +#if !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +${templateHeader}${prefix}${structName}( ${arguments} ) +${prefix}${initializers} +${prefix}{${sizeChecks}} +#endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +)"; + + str += replaceWithMap( constructorTemplate, + { { "arguments", arguments }, + { "initializers", initializers }, + { "prefix", prefix }, + { "sizeChecks", sizeChecks }, + { "structName", stripPrefix( structData.first, "Vk" ) }, + { "templateHeader", templateHeader } } ); + } } bool VulkanHppGenerator::appendStructConstructorArgument( std::string & str, bool listedArgument, - MemberData const & memberData ) const + MemberData const & memberData, + bool withDefault ) const { // skip members 'pNext' and 'sType', as they are never explicitly set if ( ( memberData.name != "pNext" ) && ( memberData.name != "sType" ) ) { - str += ( listedArgument ? ( "," ) : "" ); + str += ( listedArgument ? ( ", " ) : "" ); if ( memberData.arraySizes.empty() ) { str += memberData.type.compose() + " "; @@ -3639,18 +3760,23 @@ bool VulkanHppGenerator::appendStructConstructorArgument( std::string & str { str += constructStandardArray( memberData.type.compose(), memberData.arraySizes ) + " const& "; } - str += memberData.name + "_ = "; + str += memberData.name + "_"; - auto enumIt = m_enums.find( memberData.type.type ); - if ( enumIt != m_enums.end() && memberData.type.postfix.empty() ) + if ( withDefault ) { - appendEnumInitializer( str, memberData.type, memberData.arraySizes, enumIt->second.values ); - } - else - { - // all the rest can be initialized with just {} - str += "{}"; + str += " = "; + auto enumIt = m_enums.find( memberData.type.type ); + if ( enumIt != m_enums.end() && memberData.type.postfix.empty() ) + { + appendEnumInitializer( str, memberData.type, memberData.arraySizes, enumIt->second.values ); + } + else + { + // all the rest can be initialized with just {} + str += "{}"; + } } + listedArgument = true; } return listedArgument; @@ -3785,10 +3911,6 @@ void VulkanHppGenerator::appendStructSetter( std::string & str : "" }, { "structureName", structureName } } ); - std::set ignoreLens = { "null-terminated", - R"(latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil])", - "2*VK_UUID_SIZE", - "2*ename:VK_UUID_SIZE" }; if ( !member.len.empty() && ( ignoreLens.find( member.len[0] ) == ignoreLens.end() ) ) { assert( member.name.front() == 'p' ); @@ -3878,7 +4000,8 @@ void VulkanHppGenerator::appendStructSubConstructor( std::string & bool listedArgument = true; for ( size_t i = subStruct->second.members.size(); i < structData.second.members.size(); i++ ) { - listedArgument = appendStructConstructorArgument( subArguments, listedArgument, structData.second.members[i] ); + listedArgument = + appendStructConstructorArgument( subArguments, listedArgument, structData.second.members[i], true ); assert( structData.second.members[i].arraySizes.empty() ); subCopies += @@ -4647,8 +4770,8 @@ std::map VulkanHppGenerator::determineVectorParamIndices( std::v assert( ( std::count_if( params.begin(), params.end(), findLambda ) == 0 ) || ( findIt < it ) ); // make sure, there is no other parameter like that - // add this parameter as a vector parameter, using the len-name parameter as the second value (or INVALID_INDEX - // if there is nothing like that) + // add this parameter as a vector parameter, using the len-name parameter as the second value (or + // INVALID_INDEX if there is nothing like that) vectorParamIndices.insert( std::make_pair( std::distance( params.begin(), it ), ( findIt < it ) ? std::distance( params.begin(), findIt ) : INVALID_INDEX ) ); @@ -4745,6 +4868,56 @@ std::string const & VulkanHppGenerator::getVulkanLicenseHeader() const return m_vulkanLicenseHeader; } +std::string VulkanHppGenerator::generateLenInitializer( + std::vector::const_iterator mit, + std::map::const_iterator, + std::vector::const_iterator>>::const_iterator litit ) const +{ + std::string initializer; + if ( ( 1 < litit->second.size() ) && + ( std::find_if( litit->second.begin(), litit->second.end(), []( std::vector::const_iterator it ) { + return !it->noAutoValidity; + } ) == litit->second.end() ) ) + { + // there are multiple arrays related to this len, all marked with noautovalidity + for ( size_t i = 0; i + 1 < litit->second.size(); i++ ) + { + auto arrayIt = litit->second[i]; + std::string argumentName = startLowerCase( stripPrefix( arrayIt->name, "p" ) ) + "_"; + initializer += "!" + argumentName + ".empty() ? " + argumentName + ".size() : "; + } + auto arrayIt = litit->second.back(); + std::string argumentName = startLowerCase( stripPrefix( arrayIt->name, "p" ) ) + "_"; + initializer += argumentName + ".size()"; + } + else + { + auto arrayIt = litit->second.front(); + assert( ( arrayIt->len.front() == litit->first->name ) || + ( ( arrayIt->len.front() == R"(latexmath:[\textrm{codeSize} \over 4])" ) && + ( litit->first->name == "codeSize" ) ) ); + + assert( beginsWith( arrayIt->name, "p" ) ); + std::string argumentName = startLowerCase( stripPrefix( arrayIt->name, "p" ) ) + "_"; + + assert( mit->type.prefix.empty() && mit->type.postfix.empty() ); + initializer = argumentName + ".size()"; + if ( arrayIt->len.front() == R"(latexmath:[\textrm{codeSize} \over 4])" ) + { + initializer += " * 4"; + } + if ( arrayIt->type.type == "void" ) + { + initializer += " * sizeof(T)"; + } + } + if ( mit->type.type != "size_t" ) + { + initializer = "static_cast<" + mit->type.type + ">( " + initializer + " )"; + } + return initializer; +} + std::pair VulkanHppGenerator::generateProtection( std::string const & feature, std::set const & extensions ) const { @@ -4781,6 +4954,79 @@ std::pair VulkanHppGenerator::generateProtection( std: } } +std::string + VulkanHppGenerator::generateSizeCheck( std::vector::const_iterator> const & arrayIts, + std::string const & structName, + std::string const & prefix ) const +{ + std::string sizeCheck; + if ( 1 < arrayIts.size() ) + { + std::string assertionText, throwText; + if ( std::find_if( arrayIts.begin(), arrayIts.end(), []( std::vector::const_iterator it ) { + return !it->noAutoValidity; + } ) == arrayIts.end() ) + { + // all the arrays are marked with noautovalidity -> exactly one of them has to be non-empty + std::string sum; + for ( size_t first = 0; first + 1 < arrayIts.size(); ++first ) + { + sum += "!" + startLowerCase( stripPrefix( arrayIts[first]->name, "p" ) ) + "_.empty() + "; + } + sum += "!" + startLowerCase( stripPrefix( arrayIts.back()->name, "p" ) ) + "_.empty()"; + assertionText += prefix + " VULKAN_HPP_ASSERT( ( " + sum + " ) == 1 );\n"; + throwText += prefix + " if ( ( " + sum + " ) != 1 )\n"; + throwText += prefix + " {\n"; + throwText += prefix + " throw LogicError( VULKAN_HPP_NAMESPACE_STRING \"::" + structName + "::" + structName + + ": ( " + sum + " ) != 1\" );\n"; + throwText += prefix + " }\n"; + } + else + { + // none of the arrays should be marked with noautovalidity ! + assert( std::find_if( arrayIts.begin(), arrayIts.end(), []( std::vector::const_iterator it ) { + return it->noAutoValidity; + } ) == arrayIts.end() ); + for ( size_t first = 0; first + 1 < arrayIts.size(); ++first ) + { + assert( beginsWith( arrayIts[first]->name, "p" ) ); + std::string firstName = startLowerCase( stripPrefix( arrayIts[first]->name, "p" ) ) + "_"; + for ( auto second = first + 1; second < arrayIts.size(); ++second ) + { + assert( beginsWith( arrayIts[second]->name, "p" ) ); + std::string secondName = startLowerCase( stripPrefix( arrayIts[second]->name, "p" ) ) + "_"; + std::string assertionCheck = firstName + ".size() == " + secondName + ".size()"; + std::string throwCheck = firstName + ".size() != " + secondName + ".size()"; + if ( arrayIts[first]->optional || arrayIts[second]->optional ) + { + assertionCheck = "( " + assertionCheck + " )"; + throwCheck = "( " + throwCheck + " )"; + if ( arrayIts[second]->optional ) + { + assertionCheck = secondName + ".empty() || " + assertionCheck; + throwCheck = "!" + secondName + ".empty() && " + throwCheck; + } + if ( arrayIts[first]->optional ) + { + assertionCheck = firstName + ".empty() || " + assertionCheck; + throwCheck = "!" + firstName + ".empty() && " + throwCheck; + } + } + assertionText += prefix + " VULKAN_HPP_ASSERT( " + assertionCheck + " );\n"; + throwText += prefix + " if ( " + throwCheck + " )\n"; + throwText += prefix + " {\n"; + throwText += prefix + " throw LogicError( VULKAN_HPP_NAMESPACE_STRING \"::" + structName + + "::" + structName + ": " + throwCheck + "\" );\n"; + throwText += prefix + " }\n"; + } + } + } + sizeCheck += "\n#ifdef VULKAN_HPP_NO_EXCEPTIONS\n" + assertionText + "#else\n" + throwText + + "#endif /*VULKAN_HPP_NO_EXCEPTIONS*/\n" + prefix; + } + return sizeCheck; +} + std::set VulkanHppGenerator::getPlatforms( std::set const & extensions ) const { std::set platforms; @@ -6489,9 +6735,8 @@ void VulkanHppGenerator::readStructMember( tinyxml2::XMLElement const * element, std::string const & len = memberData.len[0]; auto lenMember = std::find_if( members.begin(), members.end(), [&len]( MemberData const & md ) { return ( md.name == len ); } ); - check( ( len == "null-terminated" ) || ( len == R"(latexmath:[\textrm{codeSize} \over 4])" ) || - ( len == R"(latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil])" ) || - ( len == "2*VK_UUID_SIZE" ) || ( len == "2*ename:VK_UUID_SIZE" ) || ( lenMember != members.end() ), + check( ( lenMember != members.end() ) || ( ignoreLens.find( len ) != ignoreLens.end() ) || + ( len == R"(latexmath:[\textrm{codeSize} \over 4])" ), line, "member attribute holds unknown value <" + len + ">" ); if ( lenMember != members.end() ) @@ -6507,6 +6752,14 @@ void VulkanHppGenerator::readStructMember( tinyxml2::XMLElement const * element, "member attribute holds unknown second value <" + memberData.len[1] + ">" ); } } + else if ( attribute.first == "noautovalidity" ) + { + memberData.noAutoValidity = ( attribute.second == "true" ); + } + else if ( attribute.first == "optional" ) + { + memberData.optional = ( attribute.second == "true" ); + } else if ( attribute.first == "selection" ) { check( isUnion, line, "attribute is used with a non-union structure." ); diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index c5e9b36..befc9f6 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -194,6 +194,8 @@ private: std::vector arraySizes; std::string bitCount; std::vector len; + bool noAutoValidity = false; + bool optional = false; std::string selection; std::string selector; std::string values; @@ -478,7 +480,13 @@ private: void appendStructConstructors( std::string & str, std::pair const & structData, std::string const & prefix ) const; - bool appendStructConstructorArgument( std::string & str, bool listedArgument, MemberData const & memberData ) const; + void appendStructConstructorsEnhanced( std::string & str, + std::pair const & structData, + std::string const & prefix ) const; + bool appendStructConstructorArgument( std::string & str, + bool listedArgument, + MemberData const & memberData, + bool withDefault ) const; std::string appendStructMembers( std::string & str, std::pair const & structData, std::string const & prefix ) const; @@ -508,15 +516,22 @@ private: std::string determineSubStruct( std::pair const & structure ) const; size_t determineTemplateParamIndex( std::vector const & params, std::map const & vectorParamIndices ) const; - std::map determineVectorParamIndices( std::vector const & params ) const; + std::map determineVectorParamIndices( std::vector const & params ) const; + std::string generateLenInitializer( + std::vector::const_iterator mit, + std::map::const_iterator, + std::vector::const_iterator>>::const_iterator litit ) const; std::pair generateProtection( std::string const & feature, std::set const & extension ) const; std::pair generateProtection( std::string const & type, bool isAliased ) const; - std::set getPlatforms( std::set const & extensions ) const; - bool holdsSType( std::string const & type ) const; - bool isParam( std::string const & name, std::vector const & params ) const; - bool isParamIndirect( std::string const & name, std::vector const & params ) const; - bool isTwoStepAlgorithm( std::vector const & params ) const; + std::string generateSizeCheck( std::vector::const_iterator> const & arrayIts, + std::string const & structName, + std::string const & prefix ) const; + std::set getPlatforms( std::set const & extensions ) const; + bool holdsSType( std::string const & type ) const; + bool isParam( std::string const & name, std::vector const & params ) const; + bool isParamIndirect( std::string const & name, std::vector const & params ) const; + bool isTwoStepAlgorithm( std::vector const & params ) const; void readBaseType( tinyxml2::XMLElement const * element, std::map const & attributes ); void readBitmask( tinyxml2::XMLElement const * element, std::map const & attributes ); void readBitmaskAlias( tinyxml2::XMLElement const * element, std::map const & attributes ); diff --git a/samples/01_InitInstance/01_InitInstance.cpp b/samples/01_InitInstance/01_InitInstance.cpp index 77b6553..38e5802 100644 --- a/samples/01_InitInstance/01_InitInstance.cpp +++ b/samples/01_InitInstance/01_InitInstance.cpp @@ -45,6 +45,11 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } + catch ( std::exception & err ) + { + std::cout << "std::exception: " << err.what() << std::endl; + exit( -1 ); + } catch ( ... ) { std::cout << "unknown error\n"; diff --git a/samples/02_EnumerateDevices/02_EnumerateDevices.cpp b/samples/02_EnumerateDevices/02_EnumerateDevices.cpp index 59fa74e..582aec7 100644 --- a/samples/02_EnumerateDevices/02_EnumerateDevices.cpp +++ b/samples/02_EnumerateDevices/02_EnumerateDevices.cpp @@ -47,6 +47,11 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } + catch ( std::exception & err ) + { + std::cout << "std::exception: " << err.what() << std::endl; + exit( -1 ); + } catch ( ... ) { std::cout << "unknown error\n"; diff --git a/samples/03_InitDevice/03_InitDevice.cpp b/samples/03_InitDevice/03_InitDevice.cpp index 8bd283f..2cffe79 100644 --- a/samples/03_InitDevice/03_InitDevice.cpp +++ b/samples/03_InitDevice/03_InitDevice.cpp @@ -53,7 +53,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), static_cast( graphicsQueueFamilyIndex ), 1, &queuePriority ); vk::UniqueDevice device = - physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), 1, &deviceQueueCreateInfo ) ); + physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ) ); // Note: No need to explicitly destroy the device, as the corresponding destroy function is // called by the destructor of the UniqueDevice on leaving this scope. @@ -65,6 +65,11 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } + catch ( std::exception & err ) + { + std::cout << "std::exception: " << err.what() << std::endl; + exit( -1 ); + } catch ( ... ) { std::cout << "unknown error\n"; diff --git a/samples/04_InitCommandBuffer/04_InitCommandBuffer.cpp b/samples/04_InitCommandBuffer/04_InitCommandBuffer.cpp index 7c6df8e..3ca7d02 100644 --- a/samples/04_InitCommandBuffer/04_InitCommandBuffer.cpp +++ b/samples/04_InitCommandBuffer/04_InitCommandBuffer.cpp @@ -61,6 +61,11 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } + catch ( std::exception & err ) + { + std::cout << "std::exception: " << err.what() << std::endl; + exit( -1 ); + } catch ( ... ) { std::cout << "unknown error\n"; diff --git a/samples/05_InitSwapchain/05_InitSwapchain.cpp b/samples/05_InitSwapchain/05_InitSwapchain.cpp index 7bc7857..47125b7 100644 --- a/samples/05_InitSwapchain/05_InitSwapchain.cpp +++ b/samples/05_InitSwapchain/05_InitSwapchain.cpp @@ -142,8 +142,7 @@ int main( int /*argc*/, char ** /*argv*/ ) 1, vk::ImageUsageFlagBits::eColorAttachment, vk::SharingMode::eExclusive, - 0, - nullptr, + {}, preTransform, compositeAlpha, swapchainPresentMode, @@ -188,9 +187,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/06_InitDepthBuffer/06_InitDepthBuffer.cpp b/samples/06_InitDepthBuffer/06_InitDepthBuffer.cpp index 274850c..dec94ef 100644 --- a/samples/06_InitDepthBuffer/06_InitDepthBuffer.cpp +++ b/samples/06_InitDepthBuffer/06_InitDepthBuffer.cpp @@ -108,9 +108,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/07_InitUniformBuffer/07_InitUniformBuffer.cpp b/samples/07_InitUniformBuffer/07_InitUniformBuffer.cpp index 3b02e64..7f2552c 100644 --- a/samples/07_InitUniformBuffer/07_InitUniformBuffer.cpp +++ b/samples/07_InitUniformBuffer/07_InitUniformBuffer.cpp @@ -94,9 +94,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/08_InitPipelineLayout/08_InitPipelineLayout.cpp b/samples/08_InitPipelineLayout/08_InitPipelineLayout.cpp index 1f525cc..ccf81ee 100644 --- a/samples/08_InitPipelineLayout/08_InitPipelineLayout.cpp +++ b/samples/08_InitPipelineLayout/08_InitPipelineLayout.cpp @@ -43,11 +43,11 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DescriptorSetLayoutBinding descriptorSetLayoutBinding( 0, vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex ); vk::UniqueDescriptorSetLayout descriptorSetLayout = device->createDescriptorSetLayoutUnique( - vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), 1, &descriptorSetLayoutBinding ) ); + vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), descriptorSetLayoutBinding ) ); // create a PipelineLayout using that DescriptorSetLayout vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); // Note: No need to explicitly destroy the layouts, as the corresponding destroy function is // called by the destructor of the UniqueDescriptorSetLayout or UniquePipelineLayout, respectively, on leaving this @@ -60,9 +60,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/09_InitDescriptorSet/09_InitDescriptorSet.cpp b/samples/09_InitDescriptorSet/09_InitDescriptorSet.cpp index fc79661..681ce69 100644 --- a/samples/09_InitDescriptorSet/09_InitDescriptorSet.cpp +++ b/samples/09_InitDescriptorSet/09_InitDescriptorSet.cpp @@ -56,17 +56,16 @@ int main( int /*argc*/, char ** /*argv*/ ) // create a descriptor pool vk::DescriptorPoolSize poolSize( vk::DescriptorType::eUniformBuffer, 1 ); vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( - vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, 1, &poolSize ) ); + vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, poolSize ) ); // allocate a descriptor set vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::DescriptorBufferInfo descriptorBufferInfo( uniformBufferData.buffer.get(), 0, sizeof( glm::mat4x4 ) ); device->updateDescriptorSets( - vk::WriteDescriptorSet( - descriptorSet.get(), 0, 0, 1, vk::DescriptorType::eUniformBuffer, nullptr, &descriptorBufferInfo ), + vk::WriteDescriptorSet( descriptorSet.get(), 0, 0, vk::DescriptorType::eUniformBuffer, {}, descriptorBufferInfo ), {} ); /* VULKAN_HPP_KEY_END */ @@ -76,9 +75,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/10_InitRenderPass/10_InitRenderPass.cpp b/samples/10_InitRenderPass/10_InitRenderPass.cpp index 534e06a..8f4a2c6 100644 --- a/samples/10_InitRenderPass/10_InitRenderPass.cpp +++ b/samples/10_InitRenderPass/10_InitRenderPass.cpp @@ -52,7 +52,7 @@ int main( int /*argc*/, char ** /*argv*/ ) /* VULKAN_HPP_KEY_START */ - vk::AttachmentDescription attachmentDescriptions[2]; + std::array attachmentDescriptions; attachmentDescriptions[0] = vk::AttachmentDescription( vk::AttachmentDescriptionFlags(), colorFormat, vk::SampleCountFlagBits::e1, @@ -74,17 +74,11 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::AttachmentReference colorReference( 0, vk::ImageLayout::eColorAttachmentOptimal ); vk::AttachmentReference depthReference( 1, vk::ImageLayout::eDepthStencilAttachmentOptimal ); - vk::SubpassDescription subpass( vk::SubpassDescriptionFlags(), - vk::PipelineBindPoint::eGraphics, - 0, - nullptr, - 1, - &colorReference, - nullptr, - &depthReference ); + vk::SubpassDescription subpass( + vk::SubpassDescriptionFlags(), vk::PipelineBindPoint::eGraphics, {}, colorReference, {}, &depthReference ); vk::UniqueRenderPass renderPass = device->createRenderPassUnique( - vk::RenderPassCreateInfo( vk::RenderPassCreateFlags(), 2, attachmentDescriptions, 1, &subpass ) ); + vk::RenderPassCreateInfo( vk::RenderPassCreateFlags(), attachmentDescriptions, subpass ) ); // Note: No need to explicitly destroy the RenderPass or the Semaphore, as the corresponding destroy // functions are called by the destructor of the UniqueRenderPass and the UniqueSemaphore on leaving this scope. @@ -96,9 +90,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/11_InitShaders/11_InitShaders.cpp b/samples/11_InitShaders/11_InitShaders.cpp index 8d4ebc7..9c7d154 100644 --- a/samples/11_InitShaders/11_InitShaders.cpp +++ b/samples/11_InitShaders/11_InitShaders.cpp @@ -47,16 +47,14 @@ int main( int /*argc*/, char ** /*argv*/ ) bool ok = vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eVertex, vertexShaderText_PC_C, vertexShaderSPV ); assert( ok ); - vk::ShaderModuleCreateInfo vertexShaderModuleCreateInfo( - vk::ShaderModuleCreateFlags(), vertexShaderSPV.size() * sizeof( unsigned int ), vertexShaderSPV.data() ); - vk::UniqueShaderModule vertexShaderModule = device->createShaderModuleUnique( vertexShaderModuleCreateInfo ); + vk::ShaderModuleCreateInfo vertexShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), vertexShaderSPV ); + vk::UniqueShaderModule vertexShaderModule = device->createShaderModuleUnique( vertexShaderModuleCreateInfo ); std::vector fragmentShaderSPV; ok = vk::su::GLSLtoSPV( vk::ShaderStageFlagBits::eFragment, fragmentShaderText_C_C, fragmentShaderSPV ); assert( ok ); - vk::ShaderModuleCreateInfo fragmentShaderModuleCreateInfo( - vk::ShaderModuleCreateFlags(), fragmentShaderSPV.size() * sizeof( unsigned int ), fragmentShaderSPV.data() ); + vk::ShaderModuleCreateInfo fragmentShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), fragmentShaderSPV ); vk::UniqueShaderModule fragmentShaderModule = device->createShaderModuleUnique( fragmentShaderModuleCreateInfo ); glslang::FinalizeProcess(); @@ -71,9 +69,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/12_InitFrameBuffers/12_InitFrameBuffers.cpp b/samples/12_InitFrameBuffers/12_InitFrameBuffers.cpp index 9701407..0103f50 100644 --- a/samples/12_InitFrameBuffers/12_InitFrameBuffers.cpp +++ b/samples/12_InitFrameBuffers/12_InitFrameBuffers.cpp @@ -58,7 +58,7 @@ int main( int /*argc*/, char ** /*argv*/ ) /* VULKAN_KEY_START */ - vk::ImageView attachments[2]; + std::array attachments; attachments[1] = depthBufferData.imageView.get(); std::vector framebuffers; @@ -68,7 +68,6 @@ int main( int /*argc*/, char ** /*argv*/ ) attachments[0] = view.get(); framebuffers.push_back( device->createFramebufferUnique( vk::FramebufferCreateInfo( vk::FramebufferCreateFlags(), renderPass.get(), - 2, attachments, surfaceData.extent.width, surfaceData.extent.height, @@ -85,9 +84,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp b/samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp index d333d38..68e98c3 100644 --- a/samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp +++ b/samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp @@ -98,7 +98,7 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); @@ -107,7 +107,6 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); @@ -128,9 +127,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/14_InitPipeline/14_InitPipeline.cpp b/samples/14_InitPipeline/14_InitPipeline.cpp index 4a5cbf4..036314a 100644 --- a/samples/14_InitPipeline/14_InitPipeline.cpp +++ b/samples/14_InitPipeline/14_InitPipeline.cpp @@ -53,7 +53,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorSetLayout descriptorSetLayout = vk::su::createDescriptorSetLayout( device, { { vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); glslang::InitializeProcess(); vk::UniqueShaderModule vertexShaderModule = @@ -64,24 +64,22 @@ int main( int /*argc*/, char ** /*argv*/ ) /* VULKAN_KEY_START */ - vk::PipelineShaderStageCreateInfo pipelineShaderStageCreateInfos[2] = { + std::array pipelineShaderStageCreateInfos = { vk::PipelineShaderStageCreateInfo( vk::PipelineShaderStageCreateFlags(), vk::ShaderStageFlagBits::eVertex, vertexShaderModule.get(), "main" ), vk::PipelineShaderStageCreateInfo( vk::PipelineShaderStageCreateFlags(), vk::ShaderStageFlagBits::eFragment, fragmentShaderModule.get(), "main" ) }; - vk::VertexInputBindingDescription vertexInputBindingDescription( 0, sizeof( coloredCubeData[0] ) ); - vk::VertexInputAttributeDescription vertexInputAttributeDescriptions[2] = { + vk::VertexInputBindingDescription vertexInputBindingDescription( 0, sizeof( coloredCubeData[0] ) ); + std::array vertexInputAttributeDescriptions = { vk::VertexInputAttributeDescription( 0, 0, vk::Format::eR32G32B32A32Sfloat, 0 ), vk::VertexInputAttributeDescription( 1, 0, vk::Format::eR32G32B32A32Sfloat, 16 ) }; vk::PipelineVertexInputStateCreateInfo pipelineVertexInputStateCreateInfo( vk::PipelineVertexInputStateCreateFlags(), // flags - 1, // vertexBindingDescriptionCount - &vertexInputBindingDescription, // pVertexBindingDescription - 2, // vertexAttributeDescriptionCount - vertexInputAttributeDescriptions // pVertexAttributeDescriptions + vertexInputBindingDescription, // vertexBindingDescriptions + vertexInputAttributeDescriptions // vertexAttributeDescriptions ); vk::PipelineInputAssemblyStateCreateInfo pipelineInputAssemblyStateCreateInfo( @@ -139,19 +137,17 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::PipelineColorBlendStateCreateFlags(), // flags false, // logicOpEnable vk::LogicOp::eNoOp, // logicOp - 1, // attachmentCount - &pipelineColorBlendAttachmentState, // pAttachments + pipelineColorBlendAttachmentState, // attachments { { 1.0f, 1.0f, 1.0f, 1.0f } } // blendConstants ); - vk::DynamicState dynamicStates[2] = { vk::DynamicState::eViewport, vk::DynamicState::eScissor }; - vk::PipelineDynamicStateCreateInfo pipelineDynamicStateCreateInfo( - vk::PipelineDynamicStateCreateFlags(), 2, dynamicStates ); + std::array dynamicStates = { vk::DynamicState::eViewport, vk::DynamicState::eScissor }; + vk::PipelineDynamicStateCreateInfo pipelineDynamicStateCreateInfo( vk::PipelineDynamicStateCreateFlags(), + dynamicStates ); vk::GraphicsPipelineCreateInfo graphicsPipelineCreateInfo( vk::PipelineCreateFlags(), // flags - 2, // stageCount - pipelineShaderStageCreateInfos, // pStages + pipelineShaderStageCreateInfos, // stages &pipelineVertexInputStateCreateInfo, // pVertexInputState &pipelineInputAssemblyStateCreateInfo, // pInputAssemblyState nullptr, // pTessellationState @@ -174,9 +170,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/15_DrawCube/15_DrawCube.cpp b/samples/15_DrawCube/15_DrawCube.cpp index 1bf09b1..075b5f4 100644 --- a/samples/15_DrawCube/15_DrawCube.cpp +++ b/samples/15_DrawCube/15_DrawCube.cpp @@ -75,7 +75,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorSetLayout descriptorSetLayout = vk::su::createDescriptorSetLayout( device, { { vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -102,14 +102,11 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformBuffer, 1 } } ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::su::updateDescriptorSets( - device, - descriptorSet, - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, - {} ); + device, descriptorSet, { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, {} ); vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique( vk::PipelineCacheCreateInfo() ); vk::UniquePipeline graphicsPipeline = vk::su::createGraphicsPipeline( @@ -134,13 +131,12 @@ int main( int /*argc*/, char ** /*argv*/ ) commandBuffer->begin( vk::CommandBufferBeginInfo( vk::CommandBufferUsageFlags() ) ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -164,14 +160,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); /* VULKAN_KEY_END */ @@ -183,9 +178,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp b/samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp index 5376ee8..455e6d5 100644 --- a/samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp +++ b/samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp @@ -111,9 +111,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/CopyBlitImage/CopyBlitImage.cpp b/samples/CopyBlitImage/CopyBlitImage.cpp index e1441e9..273b665 100644 --- a/samples/CopyBlitImage/CopyBlitImage.cpp +++ b/samples/CopyBlitImage/CopyBlitImage.cpp @@ -122,7 +122,7 @@ int main( int /*argc*/, char ** /*argv*/ ) /* Queue the command buffer for execution */ vk::UniqueFence commandFence = device->createFenceUnique( {} ); vk::PipelineStageFlags pipeStageFlags( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - graphicsQueue.submit( vk::SubmitInfo( 1, &imageAcquiredSemaphore.get(), &pipeStageFlags, 1, &commandBuffer.get() ), + graphicsQueue.submit( vk::SubmitInfo( *imageAcquiredSemaphore, pipeStageFlags, *commandBuffer ), commandFence.get() ); /* Make sure command buffer is finished before mapping */ @@ -222,7 +222,7 @@ int main( int /*argc*/, char ** /*argv*/ ) commandBuffer->end(); vk::UniqueFence drawFence = device->createFenceUnique( {} ); - graphicsQueue.submit( vk::SubmitInfo( 0, nullptr, nullptr, 1, &commandBuffer.get() ), drawFence.get() ); + graphicsQueue.submit( vk::SubmitInfo( {}, {}, *commandBuffer ), drawFence.get() ); graphicsQueue.waitIdle(); /* Make sure command buffer is finished before presenting */ @@ -230,8 +230,7 @@ int main( int /*argc*/, char ** /*argv*/ ) ; /* Now present the image in the window */ - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer, nullptr ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer, {} ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); /* VULKAN_KEY_END */ @@ -241,9 +240,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/CreateDebugUtilsMessenger/CreateDebugUtilsMessenger.cpp b/samples/CreateDebugUtilsMessenger/CreateDebugUtilsMessenger.cpp index a9507fb..76522b0 100644 --- a/samples/CreateDebugUtilsMessenger/CreateDebugUtilsMessenger.cpp +++ b/samples/CreateDebugUtilsMessenger/CreateDebugUtilsMessenger.cpp @@ -127,7 +127,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::ApplicationInfo applicationInfo( AppName, 1, EngineName, 1, VK_API_VERSION_1_1 ); const char * extensionName = VK_EXT_DEBUG_UTILS_EXTENSION_NAME; vk::UniqueInstance instance = vk::createInstanceUnique( - vk::InstanceCreateInfo( vk::InstanceCreateFlags(), &applicationInfo, 0, nullptr, 1, &extensionName ) ); + vk::InstanceCreateInfo( vk::InstanceCreateFlags(), &applicationInfo, {}, extensionName ) ); pfnVkCreateDebugUtilsMessengerEXT = reinterpret_cast( instance->getProcAddr( "vkCreateDebugUtilsMessengerEXT" ) ); @@ -160,9 +160,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/DebugUtilsObjectName/DebugUtilsObjectName.cpp b/samples/DebugUtilsObjectName/DebugUtilsObjectName.cpp index 0a87ddc..13c42f4 100644 --- a/samples/DebugUtilsObjectName/DebugUtilsObjectName.cpp +++ b/samples/DebugUtilsObjectName/DebugUtilsObjectName.cpp @@ -68,9 +68,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error err ) + catch ( std::exception err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/DrawTexturedCube/DrawTexturedCube.cpp b/samples/DrawTexturedCube/DrawTexturedCube.cpp index 9409f3f..8d15188 100644 --- a/samples/DrawTexturedCube/DrawTexturedCube.cpp +++ b/samples/DrawTexturedCube/DrawTexturedCube.cpp @@ -82,7 +82,7 @@ int main( int /*argc*/, char ** /*argv*/ ) { { vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex }, { vk::DescriptorType::eCombinedImageSampler, 1, vk::ShaderStageFlagBits::eFragment } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -109,14 +109,11 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformBuffer, 1 }, { vk::DescriptorType::eCombinedImageSampler, 1 } } ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::su::updateDescriptorSets( - device, - descriptorSet, - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, - textureData ); + device, descriptorSet, { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, textureData ); vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique( vk::PipelineCacheCreateInfo() ); vk::UniquePipeline graphicsPipeline = @@ -141,13 +138,12 @@ int main( int /*argc*/, char ** /*argv*/ ) // commandBuffer->begin() has already been called above! - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -171,14 +167,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); /* VULKAN_KEY_END */ @@ -190,9 +185,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/DynamicUniform/DynamicUniform.cpp b/samples/DynamicUniform/DynamicUniform.cpp index f41c818..7eab201 100644 --- a/samples/DynamicUniform/DynamicUniform.cpp +++ b/samples/DynamicUniform/DynamicUniform.cpp @@ -140,20 +140,17 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorSetLayout descriptorSetLayout = vk::su::createDescriptorSetLayout( device, { { vk::DescriptorType::eUniformBufferDynamic, 1, vk::ShaderStageFlagBits::eVertex } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); // create a DescriptorPool with vk::DescriptorType::eUniformBufferDynamic vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformBufferDynamic, 1 } } ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::su::updateDescriptorSets( - device, - descriptorSet, - { { vk::DescriptorType::eUniformBufferDynamic, uniformBufferData.buffer, {} } }, - {} ); + device, descriptorSet, { { vk::DescriptorType::eUniformBufferDynamic, uniformBufferData.buffer, {} } }, {} ); vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique( vk::PipelineCacheCreateInfo() ); vk::UniquePipeline graphicsPipeline = vk::su::createGraphicsPipeline( @@ -176,13 +173,12 @@ int main( int /*argc*/, char ** /*argv*/ ) commandBuffer->begin( vk::CommandBufferBeginInfo( vk::CommandBufferUsageFlags() ) ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -216,14 +212,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); /* VULKAN_KEY_END */ @@ -235,9 +230,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp b/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp index 97516d3..13f1cce 100644 --- a/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp +++ b/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp @@ -136,13 +136,9 @@ int main( int /*argc*/, char ** /*argv*/ ) instanceExtensionNames.push_back( VK_EXT_DEBUG_UTILS_EXTENSION_NAME ); vk::ApplicationInfo applicationInfo( AppName, 1, EngineName, 1, VK_API_VERSION_1_1 ); - vk::InstanceCreateInfo instanceCreateInfo( vk::InstanceCreateFlags(), - &applicationInfo, - vk::su::checked_cast( instanceLayerNames.size() ), - instanceLayerNames.data(), - vk::su::checked_cast( instanceExtensionNames.size() ), - instanceExtensionNames.data() ); - vk::UniqueInstance instance = vk::createInstanceUnique( instanceCreateInfo ); + vk::InstanceCreateInfo instanceCreateInfo( + vk::InstanceCreateFlags(), &applicationInfo, instanceLayerNames, instanceExtensionNames ); + vk::UniqueInstance instance = vk::createInstanceUnique( instanceCreateInfo ); #if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) // initialize function pointers for instance @@ -189,7 +185,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), queueFamilyIndex, 1, &queuePriority ); vk::UniqueDevice device = - physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), 1, &deviceQueueCreateInfo ) ); + physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ) ); // Create a command pool (not a UniqueCommandPool, for testing purposes! vk::CommandPool commandPool = @@ -207,9 +203,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp b/samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp index 87cd11f..deb50dc 100644 --- a/samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp +++ b/samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp @@ -69,6 +69,11 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } + catch ( std::exception & err ) + { + std::cout << "std::exception: " << err.what() << std::endl; + exit( -1 ); + } catch ( ... ) { std::cout << "unknown error\n"; diff --git a/samples/Events/Events.cpp b/samples/Events/Events.cpp index e7a5dce..3ddcefa 100644 --- a/samples/Events/Events.cpp +++ b/samples/Events/Events.cpp @@ -55,8 +55,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence fence = device->createFenceUnique( vk::FenceCreateInfo() ); - vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 0, nullptr, &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( {}, {}, *commandBuffer ); graphicsQueue.submit( submitInfo, fence.get() ); // Make sure timeout is long enough for a simple command buffer without waiting for an event @@ -90,7 +89,6 @@ int main( int /*argc*/, char ** /*argv*/ ) // Note that stepping through this code in the debugger is a bad idea because the GPU can TDR waiting for the event. // Execute the code from vk::Queue::submit() through vk::Device::setEvent() without breakpoints - waitDestinationStageMask = vk::PipelineStageFlagBits::eBottomOfPipe; graphicsQueue.submit( submitInfo, fence.get() ); // We should timeout waiting for the fence because the GPU should be waiting on the event @@ -147,9 +145,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/ImmutableSampler/ImmutableSampler.cpp b/samples/ImmutableSampler/ImmutableSampler.cpp index 45a6aeb..58ede51 100644 --- a/samples/ImmutableSampler/ImmutableSampler.cpp +++ b/samples/ImmutableSampler/ImmutableSampler.cpp @@ -101,30 +101,28 @@ int main( int /*argc*/, char ** /*argv*/ ) commandBuffer->begin( vk::CommandBufferBeginInfo() ); textureData.setImage( device, commandBuffer, vk::su::CheckerboardImageGenerator() ); - vk::DescriptorSetLayoutBinding bindings[2] = { + std::array bindings = { vk::DescriptorSetLayoutBinding( 0, vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex ), - vk::DescriptorSetLayoutBinding( 1, - vk::DescriptorType::eCombinedImageSampler, - 1, - vk::ShaderStageFlagBits::eFragment, - &textureData.textureSampler.get() ) + vk::DescriptorSetLayoutBinding( + 1, vk::DescriptorType::eCombinedImageSampler, vk::ShaderStageFlagBits::eFragment, *textureData.textureSampler ) }; vk::UniqueDescriptorSetLayout descriptorSetLayout = device->createDescriptorSetLayoutUnique( - vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), 2, bindings ) ); + vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), bindings ) ); // Create pipeline layout vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); // Create a single pool to contain data for our descriptor set - vk::DescriptorPoolSize poolSizes[2] = { vk::DescriptorPoolSize( vk::DescriptorType::eUniformBuffer, 1 ), - vk::DescriptorPoolSize( vk::DescriptorType::eCombinedImageSampler, 1 ) }; - vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( - vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, 2, poolSizes ) ); + std::array poolSizes = { vk::DescriptorPoolSize( vk::DescriptorType::eUniformBuffer, 1 ), + vk::DescriptorPoolSize( + vk::DescriptorType::eCombinedImageSampler, 1 ) }; + vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( + vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, poolSizes ) ); // Populate descriptor sets vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::DescriptorBufferInfo bufferInfo( uniformBufferData.buffer.get(), 0, sizeof( glm::mat4x4 ) ); @@ -132,8 +130,8 @@ int main( int /*argc*/, char ** /*argv*/ ) textureData.imageData->imageView.get(), vk::ImageLayout::eShaderReadOnlyOptimal ); vk::WriteDescriptorSet writeDescriptorSets[2] = { - vk::WriteDescriptorSet( descriptorSet.get(), 0, 0, 1, vk::DescriptorType::eUniformBuffer, nullptr, &bufferInfo ), - vk::WriteDescriptorSet( descriptorSet.get(), 1, 0, 1, vk::DescriptorType::eCombinedImageSampler, &imageInfo ) + vk::WriteDescriptorSet( descriptorSet.get(), 0, 0, vk::DescriptorType::eUniformBuffer, {}, bufferInfo ), + vk::WriteDescriptorSet( descriptorSet.get(), 1, 0, vk::DescriptorType::eCombinedImageSampler, imageInfo ) }; device->updateDescriptorSets( vk::ArrayProxy( 2, writeDescriptorSets ), nullptr ); @@ -158,13 +156,12 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -187,8 +184,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::su::submitAndWait( device, graphicsQueue, commandBuffer ); - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); device->waitIdle(); @@ -198,9 +194,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/InitTexture/InitTexture.cpp b/samples/InitTexture/InitTexture.cpp index c6f52f7..4f3019e 100644 --- a/samples/InitTexture/InitTexture.cpp +++ b/samples/InitTexture/InitTexture.cpp @@ -74,8 +74,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::ImageUsageFlagBits::eSampled | ( needsStaging ? vk::ImageUsageFlagBits::eTransferDst : vk::ImageUsageFlagBits() ), vk::SharingMode::eExclusive, - 0, - nullptr, + {}, needsStaging ? vk::ImageLayout::eUndefined : vk::ImageLayout::ePreinitialized ) ); vk::MemoryRequirements memoryRequirements = device->getImageMemoryRequirements( image.get() ); @@ -207,9 +206,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/InputAttachment/InputAttachment.cpp b/samples/InputAttachment/InputAttachment.cpp index 8b45c1a..60ede43 100644 --- a/samples/InputAttachment/InputAttachment.cpp +++ b/samples/InputAttachment/InputAttachment.cpp @@ -162,12 +162,12 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DescriptorSetLayoutBinding layoutBinding( 0, vk::DescriptorType::eInputAttachment, 1, vk::ShaderStageFlagBits::eFragment ); vk::UniqueDescriptorSetLayout descriptorSetLayout = device->createDescriptorSetLayoutUnique( - vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), 1, &layoutBinding ) ); + vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), layoutBinding ) ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); - vk::AttachmentDescription attachments[2] = { + std::array attachments = { // First attachment is the color attachment - clear at the beginning of the renderpass and transition layout to // PRESENT_SRC_KHR at the end of renderpass vk::AttachmentDescription( vk::AttachmentDescriptionFlags(), @@ -195,9 +195,9 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::AttachmentReference colorReference( 0, vk::ImageLayout::eColorAttachmentOptimal ); vk::AttachmentReference inputReference( 1, vk::ImageLayout::eShaderReadOnlyOptimal ); vk::SubpassDescription subPass( - vk::SubpassDescriptionFlags(), vk::PipelineBindPoint::eGraphics, 1, &inputReference, 1, &colorReference ); - vk::UniqueRenderPass renderPass = device->createRenderPassUnique( - vk::RenderPassCreateInfo( vk::RenderPassCreateFlags(), 2, attachments, 1, &subPass ) ); + vk::SubpassDescriptionFlags(), vk::PipelineBindPoint::eGraphics, inputReference, colorReference ); + vk::UniqueRenderPass renderPass = + device->createRenderPassUnique( vk::RenderPassCreateInfo( vk::RenderPassCreateFlags(), attachments, subPass ) ); glslang::InitializeProcess(); vk::UniqueShaderModule vertexShaderModule = @@ -211,16 +211,16 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DescriptorPoolSize poolSize( vk::DescriptorType::eInputAttachment, 1 ); vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( - vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, 1, &poolSize ) ); + vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, poolSize ) ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::DescriptorImageInfo inputImageInfo( nullptr, inputAttachmentView.get(), vk::ImageLayout::eShaderReadOnlyOptimal ); vk::WriteDescriptorSet writeDescriptorSet( - descriptorSet.get(), 0, 0, 1, vk::DescriptorType::eInputAttachment, &inputImageInfo ); + descriptorSet.get(), 0, 0, vk::DescriptorType::eInputAttachment, inputImageInfo ); device->updateDescriptorSets( vk::ArrayProxy( 1, &writeDescriptorSet ), nullptr ); vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique( vk::PipelineCacheCreateInfo() ); @@ -248,8 +248,7 @@ int main( int /*argc*/, char ** /*argv*/ ) commandBuffer->beginRenderPass( vk::RenderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 1, - &clearValue ), + clearValue ), vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); commandBuffer->bindDescriptorSets( @@ -272,7 +271,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::su::submitAndWait( device, graphicsQueue, commandBuffer ); - presentQueue.presentKHR( vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); } catch ( vk::SystemError & err ) @@ -280,9 +279,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/InstanceExtensionProperties/InstanceExtensionProperties.cpp b/samples/InstanceExtensionProperties/InstanceExtensionProperties.cpp index cbc54f4..1dd8a5f 100644 --- a/samples/InstanceExtensionProperties/InstanceExtensionProperties.cpp +++ b/samples/InstanceExtensionProperties/InstanceExtensionProperties.cpp @@ -55,9 +55,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/InstanceLayerExtensionProperties/InstanceLayerExtensionProperties.cpp b/samples/InstanceLayerExtensionProperties/InstanceLayerExtensionProperties.cpp index 1bf4e3e..7fe34af 100644 --- a/samples/InstanceLayerExtensionProperties/InstanceLayerExtensionProperties.cpp +++ b/samples/InstanceLayerExtensionProperties/InstanceLayerExtensionProperties.cpp @@ -90,9 +90,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/InstanceLayerProperties/InstanceLayerProperties.cpp b/samples/InstanceLayerProperties/InstanceLayerProperties.cpp index faa7ab5..a638fad 100644 --- a/samples/InstanceLayerProperties/InstanceLayerProperties.cpp +++ b/samples/InstanceLayerProperties/InstanceLayerProperties.cpp @@ -54,9 +54,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::runtexceptionime_error: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/InstanceVersion/InstanceVersion.cpp b/samples/InstanceVersion/InstanceVersion.cpp index 7d9fcd1..f427560 100644 --- a/samples/InstanceVersion/InstanceVersion.cpp +++ b/samples/InstanceVersion/InstanceVersion.cpp @@ -45,9 +45,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/MultipleSets/MultipleSets.cpp b/samples/MultipleSets/MultipleSets.cpp index 20f75ea..d3282da 100644 --- a/samples/MultipleSets/MultipleSets.cpp +++ b/samples/MultipleSets/MultipleSets.cpp @@ -155,40 +155,41 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DescriptorSetLayoutBinding uniformBinding( 0, vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex ); vk::UniqueDescriptorSetLayout uniformLayout = device->createDescriptorSetLayoutUnique( - vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), 1, &uniformBinding ) ); + vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), uniformBinding ) ); // Create second layout containing combined sampler/image data vk::DescriptorSetLayoutBinding sampler2DBinding( 0, vk::DescriptorType::eCombinedImageSampler, 1, vk::ShaderStageFlagBits::eVertex ); vk::UniqueDescriptorSetLayout samplerLayout = device->createDescriptorSetLayoutUnique( - vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), 1, &sampler2DBinding ) ); + vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), sampler2DBinding ) ); // Create pipeline layout with multiple descriptor sets std::array descriptorSetLayouts = { { uniformLayout.get(), samplerLayout.get() } }; vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 2, descriptorSetLayouts.data() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), descriptorSetLayouts ) ); // Create a single pool to contain data for our two descriptor sets - vk::DescriptorPoolSize poolSizes[2] = { vk::DescriptorPoolSize( vk::DescriptorType::eUniformBuffer, 1 ), - vk::DescriptorPoolSize( vk::DescriptorType::eCombinedImageSampler, 1 ) }; - vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( - vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 2, 2, poolSizes ) ); + std::array poolSizes = { vk::DescriptorPoolSize( vk::DescriptorType::eUniformBuffer, 1 ), + vk::DescriptorPoolSize( + vk::DescriptorType::eCombinedImageSampler, 1 ) }; + vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( + vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 2, poolSizes ) ); // Populate descriptor sets std::vector descriptorSets = device->allocateDescriptorSetsUnique( - vk::DescriptorSetAllocateInfo( descriptorPool.get(), 2, descriptorSetLayouts.data() ) ); + vk::DescriptorSetAllocateInfo( descriptorPool.get(), descriptorSetLayouts ) ); // Populate with info about our uniform buffer vk::DescriptorBufferInfo uniformBufferInfo( uniformBufferData.buffer.get(), 0, sizeof( glm::mat4x4 ) ); vk::DescriptorImageInfo textureImageInfo( textureData.textureSampler.get(), textureData.imageData->imageView.get(), vk::ImageLayout::eShaderReadOnlyOptimal ); - std::array writeDescriptorSets = { { - vk::WriteDescriptorSet( - descriptorSets[0].get(), 0, 0, 1, vk::DescriptorType::eUniformBuffer, nullptr, &uniformBufferInfo ), - vk::WriteDescriptorSet( - descriptorSets[1].get(), 0, 0, 1, vk::DescriptorType::eCombinedImageSampler, &textureImageInfo ) - } }; + std::array writeDescriptorSets = { + { vk::WriteDescriptorSet( + descriptorSets[0].get(), 0, 0, vk::DescriptorType::eUniformBuffer, {}, uniformBufferInfo ), + vk::WriteDescriptorSet( + descriptorSets[1].get(), 0, 0, vk::DescriptorType::eCombinedImageSampler, textureImageInfo ) } + }; device->updateDescriptorSets( writeDescriptorSets, nullptr ); /* VULKAN_KEY_END */ @@ -213,13 +214,12 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -246,14 +246,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); device->waitIdle(); @@ -263,9 +262,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/OcclusionQuery/OcclusionQuery.cpp b/samples/OcclusionQuery/OcclusionQuery.cpp index 2af696e..1c5ee64 100644 --- a/samples/OcclusionQuery/OcclusionQuery.cpp +++ b/samples/OcclusionQuery/OcclusionQuery.cpp @@ -75,7 +75,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorSetLayout descriptorSetLayout = vk::su::createDescriptorSetLayout( device, { { vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -102,14 +102,11 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformBuffer, 1 } } ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::su::updateDescriptorSets( - device, - descriptorSet, - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, - {} ); + device, descriptorSet, { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, {} ); vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique( vk::PipelineCacheCreateInfo() ); vk::UniquePipeline graphicsPipeline = vk::su::createGraphicsPipeline( @@ -157,13 +154,12 @@ int main( int /*argc*/, char ** /*argv*/ ) commandBuffer->begin( vk::CommandBufferBeginInfo( vk::CommandBufferUsageFlags() ) ); commandBuffer->resetQueryPool( queryPool.get(), 0, 2 ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); commandBuffer->beginRenderPass( vk::RenderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D(), surfaceData.extent ), - 2, clearValues ), vk::SubpassContents::eInline ); @@ -201,7 +197,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); graphicsQueue.waitIdle(); @@ -231,8 +227,7 @@ int main( int /*argc*/, char ** /*argv*/ ) while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); /* VULKAN_KEY_END */ @@ -242,9 +237,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp b/samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp index 72496b9..50a6eed 100644 --- a/samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp +++ b/samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp @@ -64,9 +64,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp b/samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp index c94e664..8aef160 100644 --- a/samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp +++ b/samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp @@ -805,9 +805,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp b/samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp index 6779f67..a29f32c 100644 --- a/samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp +++ b/samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp @@ -72,7 +72,7 @@ int main( int /*argc*/, char ** /*argv*/ ) float queuePriority = 0.0f; vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), static_cast( graphicsQueueFamilyIndex ), 1, &queuePriority ); - vk::DeviceCreateInfo deviceCreateInfo( vk::DeviceCreateFlags(), 1, &deviceQueueCreateInfo ); + vk::DeviceCreateInfo deviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ); vk::DeviceGroupDeviceCreateInfo deviceGroupDeviceCreateInfo( groupProperties[i].physicalDeviceCount, groupProperties[i].physicalDevices ); @@ -89,9 +89,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp b/samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp index 2d425ec..7a37f09 100644 --- a/samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp +++ b/samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp @@ -101,9 +101,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp b/samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp index 5a38130..66efddc 100644 --- a/samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp +++ b/samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp @@ -1273,9 +1273,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp b/samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp index 64810dd..dee1b24 100644 --- a/samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp +++ b/samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp @@ -93,9 +93,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PipelineCache/PipelineCache.cpp b/samples/PipelineCache/PipelineCache.cpp index da3723e..23e2877 100644 --- a/samples/PipelineCache/PipelineCache.cpp +++ b/samples/PipelineCache/PipelineCache.cpp @@ -113,7 +113,7 @@ int main( int /*argc*/, char ** /*argv*/ ) { { vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex }, { vk::DescriptorType::eCombinedImageSampler, 1, vk::ShaderStageFlagBits::eFragment } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -140,14 +140,11 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformBuffer, 1 }, { vk::DescriptorType::eCombinedImageSampler, 1 } } ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::su::updateDescriptorSets( - device, - descriptorSet, - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, - textureData ); + device, descriptorSet, { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, textureData ); /* VULKAN_KEY_START */ @@ -314,14 +311,13 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); commandBuffer->beginRenderPass( vk::RenderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D(), surfaceData.extent ), - 2, clearValues ), vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -345,14 +341,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); // Store away the cache that we've populated. This could conceivably happen @@ -381,9 +376,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PipelineDerivative/PipelineDerivative.cpp b/samples/PipelineDerivative/PipelineDerivative.cpp index d8a8ecf..71a6fbf 100644 --- a/samples/PipelineDerivative/PipelineDerivative.cpp +++ b/samples/PipelineDerivative/PipelineDerivative.cpp @@ -80,7 +80,7 @@ int main( int /*argc*/, char ** /*argv*/ ) { { vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex }, { vk::DescriptorType::eCombinedImageSampler, 1, vk::ShaderStageFlagBits::eFragment } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -107,14 +107,11 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformBuffer, 1 }, { vk::DescriptorType::eCombinedImageSampler, 1 } } ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::su::updateDescriptorSets( - device, - descriptorSet, - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, - textureData ); + device, descriptorSet, { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, textureData ); vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique( vk::PipelineCacheCreateInfo() ); @@ -125,24 +122,20 @@ int main( int /*argc*/, char ** /*argv*/ ) // First pipeline has VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT set. // Second pipeline has a modified fragment shader and sets the VK_PIPELINE_CREATE_DERIVATIVE_BIT flag. - vk::PipelineShaderStageCreateInfo pipelineShaderStageCreateInfos[2] = { + std::array pipelineShaderStageCreateInfos = { vk::PipelineShaderStageCreateInfo( vk::PipelineShaderStageCreateFlags(), vk::ShaderStageFlagBits::eVertex, vertexShaderModule.get(), "main" ), vk::PipelineShaderStageCreateInfo( vk::PipelineShaderStageCreateFlags(), vk::ShaderStageFlagBits::eFragment, fragmentShaderModule.get(), "main" ) }; - vk::VertexInputBindingDescription vertexInputBindingDescription( 0, sizeof( texturedCubeData[0] ) ); - vk::VertexInputAttributeDescription vertexInputAttributeDescriptions[2] = { + vk::VertexInputBindingDescription vertexInputBindingDescription( 0, sizeof( texturedCubeData[0] ) ); + std::array vertexInputAttributeDescriptions = { vk::VertexInputAttributeDescription( 0, 0, vk::Format::eR32G32B32A32Sfloat, 0 ), vk::VertexInputAttributeDescription( 1, 0, vk::Format::eR32G32B32A32Sfloat, 16 ) }; vk::PipelineVertexInputStateCreateInfo pipelineVertexInputStateCreateInfo( - vk::PipelineVertexInputStateCreateFlags(), - 1, - &vertexInputBindingDescription, - 2, - vertexInputAttributeDescriptions ); + vk::PipelineVertexInputStateCreateFlags(), vertexInputBindingDescription, vertexInputAttributeDescriptions ); vk::PipelineInputAssemblyStateCreateInfo pipelineInputAssemblyStateCreateInfo( vk::PipelineInputAssemblyStateCreateFlags(), vk::PrimitiveTopology::eTriangleList ); @@ -190,16 +183,14 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::PipelineColorBlendStateCreateInfo pipelineColorBlendStateCreateInfo( vk::PipelineColorBlendStateCreateFlags(), false, vk::LogicOp::eNoOp, - 1, - &pipelineColorBlendAttachmentState, + pipelineColorBlendAttachmentState, { { 1.0f, 1.0f, 1.0f, 1.0f } } ); - vk::DynamicState dynamicStates[2] = { vk::DynamicState::eViewport, vk::DynamicState::eScissor }; - vk::PipelineDynamicStateCreateInfo pipelineDynamicStateCreateInfo( - vk::PipelineDynamicStateCreateFlags(), 2, dynamicStates ); + std::array dynamicStates = { vk::DynamicState::eViewport, vk::DynamicState::eScissor }; + vk::PipelineDynamicStateCreateInfo pipelineDynamicStateCreateInfo( vk::PipelineDynamicStateCreateFlags(), + dynamicStates ); vk::GraphicsPipelineCreateInfo graphicsPipelineCreateInfo( vk::PipelineCreateFlagBits::eAllowDerivatives, - 2, pipelineShaderStageCreateInfos, &pipelineVertexInputStateCreateInfo, &pipelineInputAssemblyStateCreateInfo, @@ -259,14 +250,13 @@ void main() assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); commandBuffer->beginRenderPass( vk::RenderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D(), surfaceData.extent ), - 2, clearValues ), vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, derivedPipeline.get() ); @@ -290,14 +280,13 @@ void main() vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); } catch ( vk::SystemError & err ) @@ -305,9 +294,9 @@ void main() std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PushConstants/PushConstants.cpp b/samples/PushConstants/PushConstants.cpp index abd6f57..1945657 100644 --- a/samples/PushConstants/PushConstants.cpp +++ b/samples/PushConstants/PushConstants.cpp @@ -144,24 +144,25 @@ int main( int /*argc*/, char ** /*argv*/ ) // Set up our push constant range, which mirrors the declaration of vk::PushConstantRange pushConstantRanges( vk::ShaderStageFlagBits::eFragment, 0, 8 ); - vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( vk::PipelineLayoutCreateInfo( - vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get(), 1, &pushConstantRanges ) ); + vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout, pushConstantRanges ) ); // Create a single pool to contain data for our descriptor set - vk::DescriptorPoolSize poolSizes[2] = { vk::DescriptorPoolSize( vk::DescriptorType::eUniformBuffer, 1 ), - vk::DescriptorPoolSize( vk::DescriptorType::eCombinedImageSampler, 1 ) }; - vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( - vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, 2, poolSizes ) ); + std::array poolSizes = { vk::DescriptorPoolSize( vk::DescriptorType::eUniformBuffer, 1 ), + vk::DescriptorPoolSize( + vk::DescriptorType::eCombinedImageSampler, 1 ) }; + vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( + vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, poolSizes ) ); // Populate descriptor sets vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); // Populate with info about our uniform buffer for MVP vk::DescriptorBufferInfo bufferInfo( uniformBufferData.buffer.get(), 0, sizeof( glm::mat4x4 ) ); device->updateDescriptorSets( - vk::WriteDescriptorSet( *descriptorSet, 0, 0, 1, vk::DescriptorType::eUniformBuffer, nullptr, &bufferInfo ), {} ); + vk::WriteDescriptorSet( *descriptorSet, 0, 0, vk::DescriptorType::eUniformBuffer, {}, bufferInfo ), {} ); // Create our push constant data, which matches shader expectations std::array pushConstants = { { (unsigned)2, (unsigned)0x3F800000 } }; @@ -194,14 +195,13 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -225,14 +225,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); } catch ( vk::SystemError & err ) @@ -240,9 +239,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/PushDescriptors/PushDescriptors.cpp b/samples/PushDescriptors/PushDescriptors.cpp index b0bf6b6..341748c 100644 --- a/samples/PushDescriptors/PushDescriptors.cpp +++ b/samples/PushDescriptors/PushDescriptors.cpp @@ -119,7 +119,7 @@ int main( int /*argc*/, char ** /*argv*/ ) { vk::DescriptorType::eCombinedImageSampler, 1, vk::ShaderStageFlagBits::eFragment } }, vk::DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -163,13 +163,12 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -179,8 +178,8 @@ int main( int /*argc*/, char ** /*argv*/ ) textureData.imageData->imageView.get(), vk::ImageLayout::eShaderReadOnlyOptimal ); vk::WriteDescriptorSet writeDescriptorSets[2] = { - vk::WriteDescriptorSet( {}, 0, 0, 1, vk::DescriptorType::eUniformBuffer, nullptr, &bufferInfo ), - vk::WriteDescriptorSet( {}, 1, 0, 1, vk::DescriptorType::eCombinedImageSampler, &imageInfo ) + vk::WriteDescriptorSet( {}, 0, 0, vk::DescriptorType::eUniformBuffer, {}, bufferInfo ), + vk::WriteDescriptorSet( {}, 1, 0, vk::DescriptorType::eCombinedImageSampler, imageInfo ) }; // this call is from an extension and needs the dynamic dispatcher !! @@ -204,14 +203,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); /* VULKAN_KEY_END */ @@ -223,9 +221,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/RayTracing/RayTracing.cpp b/samples/RayTracing/RayTracing.cpp index 163b397..6cfae75 100644 --- a/samples/RayTracing/RayTracing.cpp +++ b/samples/RayTracing/RayTracing.cpp @@ -15,8 +15,11 @@ // VulkanHpp Samples : RayTracing // Simple sample how to ray trace using Vulkan +// clang-format off +// we need to include vulkan.hpp before glfw3.h, so stop clang-format to reorder them #include #include +// clang-format on #include #include #include @@ -46,11 +49,11 @@ struct GeometryInstanceData uint32_t instanceOffset_, uint8_t flags_, uint64_t accelerationStructureHandle_ ) - : instanceId( instanceID_ ), - mask( mask_ ), - instanceOffset( instanceOffset_ ), - flags( flags_ ), - accelerationStructureHandle( accelerationStructureHandle_ ) + : instanceId( instanceID_ ) + , mask( mask_ ) + , instanceOffset( instanceOffset_ ) + , flags( flags_ ) + , accelerationStructureHandle( accelerationStructureHandle_ ) { assert( !( instanceID_ & 0xFF000000 ) && !( instanceOffset_ & 0xFF000000 ) ); memcpy( transform, &transform_, 12 * sizeof( float ) ); @@ -86,11 +89,8 @@ AccelerationStructureData vk::AccelerationStructureTypeNV accelerationStructureType = instances.empty() ? vk::AccelerationStructureTypeNV::eBottomLevel : vk::AccelerationStructureTypeNV::eTopLevel; - vk::AccelerationStructureInfoNV accelerationStructureInfo( accelerationStructureType, - {}, - vk::su::checked_cast( instances.size() ), - vk::su::checked_cast( geometries.size() ), - geometries.data() ); + vk::AccelerationStructureInfoNV accelerationStructureInfo( + accelerationStructureType, {}, vk::su::checked_cast( instances.size() ), geometries ); accelerationStructureData.acclerationStructure = device->createAccelerationStructureNVUnique( vk::AccelerationStructureCreateInfoNV( 0, accelerationStructureInfo ) ); @@ -157,11 +157,8 @@ AccelerationStructureData *accelerationStructureData.acclerationStructure, *accelerationStructureData.resultBufferData->deviceMemory ) ); commandBuffer->buildAccelerationStructureNV( - vk::AccelerationStructureInfoNV( accelerationStructureType, - {}, - vk::su::checked_cast( instances.size() ), - vk::su::checked_cast( geometries.size() ), - geometries.data() ), + vk::AccelerationStructureInfoNV( + accelerationStructureType, {}, vk::su::checked_cast( instances.size() ), geometries ), accelerationStructureData.instanceBufferData ? *accelerationStructureData.instanceBufferData->buffer : nullptr, 0, false, @@ -871,7 +868,7 @@ int main( int /*argc*/, char ** /*argv*/ ) static_cast( textures.size() ), vk::ShaderStageFlagBits::eFragment } } ); vk::UniquePipelineLayout pipelineLayout = - device->createPipelineLayoutUnique( vk::PipelineLayoutCreateInfo( {}, 1, &( *descriptorSetLayout ) ) ); + device->createPipelineLayoutUnique( vk::PipelineLayoutCreateInfo( {}, *descriptorSetLayout ) ); glslang::InitializeProcess(); vk::UniqueShaderModule vertexShaderModule = @@ -899,14 +896,13 @@ int main( int /*argc*/, char ** /*argv*/ ) physicalDevice, device, sizeof( UniformBufferObject ), vk::BufferUsageFlagBits::eUniformBuffer ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); - vk::su::updateDescriptorSets( - device, - descriptorSet, - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} }, - { vk::DescriptorType::eStorageBuffer, materialBufferData.buffer, {} } }, - textures ); + vk::su::updateDescriptorSets( device, + descriptorSet, + { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} }, + { vk::DescriptorType::eStorageBuffer, materialBufferData.buffer, {} } }, + textures ); // RayTracing specific stuff @@ -996,18 +992,16 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DescriptorPoolCreateInfo descriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, vk::su::checked_cast( swapChainData.images.size() ), - vk::su::checked_cast( descriptorPoolSizes.size() ), - descriptorPoolSizes.data() ); + descriptorPoolSizes ); vk::UniqueDescriptorPool rayTracingDescriptorPool = device->createDescriptorPoolUnique( descriptorPoolCreateInfo ); - vk::UniqueDescriptorSetLayout rayTracingDescriptorSetLayout = device->createDescriptorSetLayoutUnique( - vk::DescriptorSetLayoutCreateInfo( {}, static_cast( bindings.size() ), bindings.data() ) ); + vk::UniqueDescriptorSetLayout rayTracingDescriptorSetLayout = + device->createDescriptorSetLayoutUnique( vk::DescriptorSetLayoutCreateInfo( {}, bindings ) ); std::vector layouts; for ( size_t i = 0; i < swapChainData.images.size(); i++ ) { layouts.push_back( *rayTracingDescriptorSetLayout ); } - vk::DescriptorSetAllocateInfo descriptorSetAllocateInfo( - *rayTracingDescriptorPool, vk::su::checked_cast( layouts.size() ), layouts.data() ); + vk::DescriptorSetAllocateInfo descriptorSetAllocateInfo( *rayTracingDescriptorPool, layouts ); std::vector rayTracingDescriptorSets = device->allocateDescriptorSetsUnique( descriptorSetAllocateInfo ); @@ -1027,15 +1021,14 @@ int main( int /*argc*/, char ** /*argv*/ ) // view) for ( size_t i = 0; i < rayTracingDescriptorSets.size(); i++ ) { - vk::su::updateDescriptorSets( - device, - rayTracingDescriptorSets[i], - { { bindings[2].descriptorType, uniformBufferData.buffer, {} }, - { bindings[3].descriptorType, vertexBufferData.buffer, {} }, - { bindings[4].descriptorType, indexBufferData.buffer, {} }, - { bindings[5].descriptorType, materialBufferData.buffer, {} } }, - textures, - 2 ); + vk::su::updateDescriptorSets( device, + rayTracingDescriptorSets[i], + { { bindings[2].descriptorType, uniformBufferData.buffer, {} }, + { bindings[3].descriptorType, vertexBufferData.buffer, {} }, + { bindings[4].descriptorType, indexBufferData.buffer, {} }, + { bindings[5].descriptorType, materialBufferData.buffer, {} } }, + textures, + 2 ); } // create the ray-tracing shader modules @@ -1094,7 +1087,7 @@ int main( int /*argc*/, char ** /*argv*/ ) // Create the layout of the pipeline following the provided descriptor set layout vk::UniquePipelineLayout rayTracingPipelineLayout = - device->createPipelineLayoutUnique( vk::PipelineLayoutCreateInfo( {}, 1, &*rayTracingDescriptorSetLayout ) ); + device->createPipelineLayoutUnique( vk::PipelineLayoutCreateInfo( {}, *rayTracingDescriptorSetLayout ) ); // Assemble the shader stages and recursion depth info into the raytracing pipeline // The ray tracing process can shoot rays from the camera, and a shadow ray can be shot from the @@ -1102,14 +1095,9 @@ int main( int /*argc*/, char ** /*argv*/ ) // as possible for performance reasons. Even recursive ray tracing should be flattened into a loop // in the ray generation to avoid deep recursion. uint32_t maxRecursionDepth = 2; - vk::RayTracingPipelineCreateInfoNV rayTracingPipelineCreateInfo( {}, - static_cast( shaderStages.size() ), - shaderStages.data(), - static_cast( shaderGroups.size() ), - shaderGroups.data(), - maxRecursionDepth, - *rayTracingPipelineLayout ); - vk::UniquePipeline rayTracingPipeline = + vk::RayTracingPipelineCreateInfoNV rayTracingPipelineCreateInfo( + {}, shaderStages, shaderGroups, maxRecursionDepth, *rayTracingPipelineLayout ); + vk::UniquePipeline rayTracingPipeline = device->createRayTracingPipelineNVUnique( nullptr, rayTracingPipelineCreateInfo ); uint32_t shaderGroupHandleSize = @@ -1208,8 +1196,7 @@ int main( int /*argc*/, char ** /*argv*/ ) commandBuffer->beginRenderPass( vk::RenderPassBeginInfo( *renderPass, *framebuffers[backBufferIndex], vk::Rect2D( vk::Offset2D( 0, 0 ), windowExtent ), - static_cast( clearValues.size() ), - clearValues.data() ), + clearValues ), vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, *graphicsPipeline ); @@ -1237,7 +1224,7 @@ int main( int /*argc*/, char ** /*argv*/ ) nullptr, *swapChainData.imageViews[backBufferIndex], vk::ImageLayout::eGeneral ); device->updateDescriptorSets( vk::WriteDescriptorSet( - *rayTracingDescriptorSets[backBufferIndex], 1, 0, 1, bindings[1].descriptorType, &imageInfo ), + *rayTracingDescriptorSets[backBufferIndex], 1, 0, bindings[1].descriptorType, imageInfo ), {} ); vk::su::setImageLayout( commandBuffer, @@ -1293,11 +1280,8 @@ int main( int /*argc*/, char ** /*argv*/ ) 1, &( *perFrameData[frameIndex].renderCompleteSemaphore ) ), *perFrameData[frameIndex].fence ); - presentQueue.presentKHR( vk::PresentInfoKHR( 1, - &( *perFrameData[frameIndex].renderCompleteSemaphore ), - 1, - &( *swapChainData.swapChain ), - &backBufferIndex ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( + *perFrameData[frameIndex].renderCompleteSemaphore, *swapChainData.swapChain, backBufferIndex ) ); frameIndex = ( frameIndex + 1 ) % IMGUI_VK_QUEUED_FRAMES; double endTime = glfwGetTime(); @@ -1330,9 +1314,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp b/samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp index 0d933a3..e224562 100644 --- a/samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp +++ b/samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp @@ -77,7 +77,7 @@ int main( int /*argc*/, char ** /*argv*/ ) { { vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex }, { vk::DescriptorType::eCombinedImageSampler, 1, vk::ShaderStageFlagBits::eFragment } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -129,21 +129,19 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformBuffer, 2 }, { vk::DescriptorType::eCombinedImageSampler, 2 } } ); - vk::DescriptorSetLayout layouts[] = { descriptorSetLayout.get(), descriptorSetLayout.get() }; - std::vector descriptorSets = - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( descriptorPool.get(), 2, layouts ) ); + std::array layouts = { descriptorSetLayout.get(), descriptorSetLayout.get() }; + std::vector descriptorSets = + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( descriptorPool.get(), layouts ) ); assert( descriptorSets.size() == 2 ); - vk::su::updateDescriptorSets( - device, - descriptorSets[0], - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, - greenTextureData ); - vk::su::updateDescriptorSets( - device, - descriptorSets[1], - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, - checkeredTextureData ); + vk::su::updateDescriptorSets( device, + descriptorSets[0], + { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, + greenTextureData ); + vk::su::updateDescriptorSets( device, + descriptorSets[1], + { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, + checkeredTextureData ); /* VULKAN_KEY_START */ @@ -191,14 +189,13 @@ int main( int /*argc*/, char ** /*argv*/ ) secondaryCommandBuffers[i]->end(); } - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); // specifying VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS means this render pass may ONLY call // vkCmdExecuteCommands @@ -226,14 +223,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); /* VULKAN_KEY_END */ @@ -245,9 +241,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/SeparateImageSampler/SeparateImageSampler.cpp b/samples/SeparateImageSampler/SeparateImageSampler.cpp index 8ad1145..1844b9c 100644 --- a/samples/SeparateImageSampler/SeparateImageSampler.cpp +++ b/samples/SeparateImageSampler/SeparateImageSampler.cpp @@ -154,34 +154,30 @@ int main( int /*argc*/, char ** /*argv*/ ) // binding 0 = uniform buffer (MVP) // binding 1 = texture2D // binding 2 = sampler - std::array resourceBindings = { { - vk::DescriptorSetLayoutBinding( 0, vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex ), - vk::DescriptorSetLayoutBinding( 1, vk::DescriptorType::eSampledImage, 1, vk::ShaderStageFlagBits::eFragment ), - vk::DescriptorSetLayoutBinding( 2, vk::DescriptorType::eSampler, 1, vk::ShaderStageFlagBits::eFragment ) - } + std::array resourceBindings = { + { vk::DescriptorSetLayoutBinding( 0, vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex ), + vk::DescriptorSetLayoutBinding( 1, vk::DescriptorType::eSampledImage, 1, vk::ShaderStageFlagBits::eFragment ), + vk::DescriptorSetLayoutBinding( 2, vk::DescriptorType::eSampler, 1, vk::ShaderStageFlagBits::eFragment ) } }; vk::UniqueDescriptorSetLayout descriptorSetLayout = device->createDescriptorSetLayoutUnique( - vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), - static_cast( resourceBindings.size() ), - resourceBindings.data() ) ); + vk::DescriptorSetLayoutCreateInfo( vk::DescriptorSetLayoutCreateFlags(), resourceBindings ) ); // Create pipeline layout vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &( *descriptorSetLayout ) ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); // Create a single pool to contain data for the descriptor set - std::array poolSizes = { { vk::DescriptorPoolSize( vk::DescriptorType::eUniformBuffer, 1 ), - vk::DescriptorPoolSize( vk::DescriptorType::eSampledImage, 1 ), - vk::DescriptorPoolSize( vk::DescriptorType::eSampler, 1 ) } }; - vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( - vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, - 1, - static_cast( poolSizes.size() ), - poolSizes.data() ) ); + std::array poolSizes = { + { vk::DescriptorPoolSize( vk::DescriptorType::eUniformBuffer, 1 ), + vk::DescriptorPoolSize( vk::DescriptorType::eSampledImage, 1 ), + vk::DescriptorPoolSize( vk::DescriptorType::eSampler, 1 ) } + }; + vk::UniqueDescriptorPool descriptorPool = device->createDescriptorPoolUnique( + vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1, poolSizes ) ); // Populate descriptor sets vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::DescriptorBufferInfo bufferInfo( uniformBufferData.buffer.get(), 0, sizeof( glm::mat4x4 ) ); @@ -189,11 +185,11 @@ int main( int /*argc*/, char ** /*argv*/ ) textureData.imageData->imageView.get(), vk::ImageLayout::eShaderReadOnlyOptimal ); vk::DescriptorImageInfo samplerInfo( sampler.get(), {}, {} ); - std::array descriptorWrites = { { - vk::WriteDescriptorSet( *descriptorSet, 0, 0, 1, vk::DescriptorType::eUniformBuffer, nullptr, &bufferInfo ), - vk::WriteDescriptorSet( *descriptorSet, 1, 0, 1, vk::DescriptorType::eSampledImage, &imageInfo ), - vk::WriteDescriptorSet( *descriptorSet, 2, 0, 1, vk::DescriptorType::eSampler, &samplerInfo ) - } }; + std::array descriptorWrites = { + { vk::WriteDescriptorSet( *descriptorSet, 0, 0, vk::DescriptorType::eUniformBuffer, {}, bufferInfo ), + vk::WriteDescriptorSet( *descriptorSet, 1, 0, vk::DescriptorType::eSampledImage, imageInfo ), + vk::WriteDescriptorSet( *descriptorSet, 2, 0, vk::DescriptorType::eSampler, samplerInfo ) } + }; device->updateDescriptorSets( descriptorWrites, nullptr ); /* VULKAN_KEY_END */ @@ -219,14 +215,13 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); @@ -251,14 +246,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); device->waitIdle(); @@ -268,9 +262,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/SurfaceCapabilities/SurfaceCapabilities.cpp b/samples/SurfaceCapabilities/SurfaceCapabilities.cpp index 8483b24..a8e9420 100644 --- a/samples/SurfaceCapabilities/SurfaceCapabilities.cpp +++ b/samples/SurfaceCapabilities/SurfaceCapabilities.cpp @@ -173,9 +173,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/SurfaceFormats/SurfaceFormats.cpp b/samples/SurfaceFormats/SurfaceFormats.cpp index cde6cc2..cc9112b 100644 --- a/samples/SurfaceFormats/SurfaceFormats.cpp +++ b/samples/SurfaceFormats/SurfaceFormats.cpp @@ -65,9 +65,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/Template/Template.cpp b/samples/Template/Template.cpp index 47c20f7..a26566a 100644 --- a/samples/Template/Template.cpp +++ b/samples/Template/Template.cpp @@ -82,7 +82,7 @@ int main( int /*argc*/, char ** /*argv*/ ) { { vk::DescriptorType::eUniformBuffer, 1, vk::ShaderStageFlagBits::eVertex }, { vk::DescriptorType::eCombinedImageSampler, 1, vk::ShaderStageFlagBits::eFragment } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -109,13 +109,10 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformBuffer, 1 }, { vk::DescriptorType::eCombinedImageSampler, 1 } } ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::su::updateDescriptorSets( - device, - descriptorSet, - { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, - textureData ); + device, descriptorSet, { { vk::DescriptorType::eUniformBuffer, uniformBufferData.buffer, {} } }, textureData ); vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique( vk::PipelineCacheCreateInfo() ); vk::UniquePipeline graphicsPipeline = @@ -137,13 +134,12 @@ int main( int /*argc*/, char ** /*argv*/ ) assert( currentBuffer.result == vk::Result::eSuccess ); assert( currentBuffer.value < framebuffers.size() ); - vk::ClearValue clearValues[2]; + std::array clearValues; clearValues[0].color = vk::ClearColorValue( std::array( { { 0.2f, 0.2f, 0.2f, 0.2f } } ) ); clearValues[1].depthStencil = vk::ClearDepthStencilValue( 1.0f, 0 ); vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 2, clearValues ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); @@ -168,14 +164,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); device->waitIdle(); @@ -185,9 +180,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/TexelBuffer/TexelBuffer.cpp b/samples/TexelBuffer/TexelBuffer.cpp index b0ac3c8..7b5fbee 100644 --- a/samples/TexelBuffer/TexelBuffer.cpp +++ b/samples/TexelBuffer/TexelBuffer.cpp @@ -117,7 +117,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorSetLayout descriptorSetLayout = vk::su::createDescriptorSetLayout( device, { { vk::DescriptorType::eUniformTexelBuffer, 1, vk::ShaderStageFlagBits::eVertex } } ); vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique( - vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get() ) ); + vk::PipelineLayoutCreateInfo( vk::PipelineLayoutCreateFlags(), *descriptorSetLayout ) ); vk::UniqueRenderPass renderPass = vk::su::createRenderPass( device, @@ -137,7 +137,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueDescriptorPool descriptorPool = vk::su::createDescriptorPool( device, { { vk::DescriptorType::eUniformTexelBuffer, 1 } } ); vk::UniqueDescriptorSet descriptorSet = std::move( - device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, 1, &*descriptorSetLayout ) ) + device->allocateDescriptorSetsUnique( vk::DescriptorSetAllocateInfo( *descriptorPool, *descriptorSetLayout ) ) .front() ); vk::su::updateDescriptorSets( device, @@ -174,8 +174,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::RenderPassBeginInfo renderPassBeginInfo( renderPass.get(), framebuffers[currentBuffer.value].get(), vk::Rect2D( vk::Offset2D( 0, 0 ), surfaceData.extent ), - 1, - &clearValue ); + clearValue ); commandBuffer->beginRenderPass( renderPassBeginInfo, vk::SubpassContents::eInline ); commandBuffer->bindPipeline( vk::PipelineBindPoint::eGraphics, graphicsPipeline.get() ); @@ -198,14 +197,13 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::UniqueFence drawFence = device->createFenceUnique( vk::FenceCreateInfo() ); vk::PipelineStageFlags waitDestinationStageMask( vk::PipelineStageFlagBits::eColorAttachmentOutput ); - vk::SubmitInfo submitInfo( 1, &imageAcquiredSemaphore.get(), &waitDestinationStageMask, 1, &commandBuffer.get() ); + vk::SubmitInfo submitInfo( *imageAcquiredSemaphore, waitDestinationStageMask, *commandBuffer ); graphicsQueue.submit( submitInfo, drawFence.get() ); while ( vk::Result::eTimeout == device->waitForFences( drawFence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; - presentQueue.presentKHR( - vk::PresentInfoKHR( 0, nullptr, 1, &swapChainData.swapChain.get(), ¤tBuffer.value ) ); + presentQueue.presentKHR( vk::PresentInfoKHR( {}, *swapChainData.swapChain, currentBuffer.value ) ); std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) ); /* VULKAN_KEY_END */ @@ -217,9 +215,9 @@ int main( int /*argc*/, char ** /*argv*/ ) std::cout << "vk::SystemError: " << err.what() << std::endl; exit( -1 ); } - catch ( std::runtime_error & err ) + catch ( std::exception & err ) { - std::cout << "std::runtime_error: " << err.what() << std::endl; + std::cout << "std::exception: " << err.what() << std::endl; exit( -1 ); } catch ( ... ) diff --git a/samples/utils/shaders.cpp b/samples/utils/shaders.cpp index 8a4acc9..34c74b3 100644 --- a/samples/utils/shaders.cpp +++ b/samples/utils/shaders.cpp @@ -94,8 +94,7 @@ namespace vk bool ok = GLSLtoSPV( shaderStage, shaderText, shaderSPV ); assert( ok ); - return device->createShaderModuleUnique( vk::ShaderModuleCreateInfo( - vk::ShaderModuleCreateFlags(), shaderSPV.size() * sizeof( unsigned int ), shaderSPV.data() ) ); + return device->createShaderModuleUnique( vk::ShaderModuleCreateInfo( vk::ShaderModuleCreateFlags(), shaderSPV ) ); } } // namespace su } // namespace vk diff --git a/samples/utils/utils.cpp b/samples/utils/utils.cpp index 203e0d5..63becc7 100644 --- a/samples/utils/utils.cpp +++ b/samples/utils/utils.cpp @@ -76,10 +76,8 @@ namespace vk } ); assert( 0 < maxSets ); - vk::DescriptorPoolCreateInfo descriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, - maxSets, - checked_cast( poolSizes.size() ), - poolSizes.data() ); + vk::DescriptorPoolCreateInfo descriptorPoolCreateInfo( + vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, maxSets, poolSizes ); return device->createDescriptorPoolUnique( descriptorPoolCreateInfo ); } @@ -96,8 +94,7 @@ namespace vk std::get<1>( bindingData[i] ), std::get<2>( bindingData[i] ) ); } - return device->createDescriptorSetLayoutUnique( - vk::DescriptorSetLayoutCreateInfo( flags, checked_cast( bindings.size() ), bindings.data() ) ); + return device->createDescriptorSetLayoutUnique( vk::DescriptorSetLayoutCreateInfo( flags, bindings ) ); } vk::UniqueDevice createDevice( vk::PhysicalDevice physicalDevice, @@ -117,14 +114,8 @@ namespace vk float queuePriority = 0.0f; vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), queueFamilyIndex, 1, &queuePriority ); - vk::DeviceCreateInfo deviceCreateInfo( vk::DeviceCreateFlags(), - 1, - &deviceQueueCreateInfo, - 0, - nullptr, - checked_cast( enabledExtensions.size() ), - enabledExtensions.data(), - physicalDeviceFeatures ); + vk::DeviceCreateInfo deviceCreateInfo( + vk::DeviceCreateFlags(), deviceQueueCreateInfo, {}, enabledExtensions, physicalDeviceFeatures ); deviceCreateInfo.pNext = pNext; return physicalDevice.createDeviceUnique( deviceCreateInfo ); } @@ -168,7 +159,7 @@ namespace vk vk::UniquePipelineLayout const & pipelineLayout, vk::UniqueRenderPass const & renderPass ) { - vk::PipelineShaderStageCreateInfo pipelineShaderStageCreateInfos[2] = { + std::array pipelineShaderStageCreateInfos = { vk::PipelineShaderStageCreateInfo( vk::PipelineShaderStageCreateFlags(), vk::ShaderStageFlagBits::eVertex, vertexShaderData.first, @@ -193,11 +184,8 @@ namespace vk vertexInputAttributeDescriptions.push_back( vk::VertexInputAttributeDescription( i, 0, vertexInputAttributeFormatOffset[i].first, vertexInputAttributeFormatOffset[i].second ) ); } - pipelineVertexInputStateCreateInfo.vertexBindingDescriptionCount = 1; - pipelineVertexInputStateCreateInfo.pVertexBindingDescriptions = &vertexInputBindingDescription; - pipelineVertexInputStateCreateInfo.vertexAttributeDescriptionCount = - vk::su::checked_cast( vertexInputAttributeDescriptions.size() ); - pipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions = vertexInputAttributeDescriptions.data(); + pipelineVertexInputStateCreateInfo.setVertexBindingDescriptions( vertexInputBindingDescription ); + pipelineVertexInputStateCreateInfo.setVertexAttributeDescriptions( vertexInputAttributeDescriptions ); } vk::PipelineInputAssemblyStateCreateInfo pipelineInputAssemblyStateCreateInfo( @@ -246,16 +234,14 @@ namespace vk vk::PipelineColorBlendStateCreateInfo pipelineColorBlendStateCreateInfo( vk::PipelineColorBlendStateCreateFlags(), false, vk::LogicOp::eNoOp, - 1, - &pipelineColorBlendAttachmentState, + pipelineColorBlendAttachmentState, { { 1.0f, 1.0f, 1.0f, 1.0f } } ); - vk::DynamicState dynamicStates[2] = { vk::DynamicState::eViewport, vk::DynamicState::eScissor }; - vk::PipelineDynamicStateCreateInfo pipelineDynamicStateCreateInfo( - vk::PipelineDynamicStateCreateFlags(), 2, dynamicStates ); + std::array dynamicStates = { vk::DynamicState::eViewport, vk::DynamicState::eScissor }; + vk::PipelineDynamicStateCreateInfo pipelineDynamicStateCreateInfo( vk::PipelineDynamicStateCreateFlags(), + dynamicStates ); vk::GraphicsPipelineCreateInfo graphicsPipelineCreateInfo( vk::PipelineCreateFlags(), - 2, pipelineShaderStageCreateInfos, &pipelineVertexInputStateCreateInfo, &pipelineInputAssemblyStateCreateInfo, @@ -346,12 +332,7 @@ namespace vk #if defined( NDEBUG ) // in non-debug mode just use the InstanceCreateInfo for instance creation vk::StructureChain instanceCreateInfo( - { {}, - &applicationInfo, - checked_cast( enabledLayers.size() ), - enabledLayers.data(), - checked_cast( enabledExtensions.size() ), - enabledExtensions.data() } ); + { {}, &applicationInfo, enabledLayers, enabledExtensions } ); #else // in debug mode, addionally use the debugUtilsMessengerCallback in instance creation! vk::DebugUtilsMessageSeverityFlagsEXT severityFlags( vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning | @@ -360,12 +341,7 @@ namespace vk vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation ); vk::StructureChain instanceCreateInfo( - { {}, - &applicationInfo, - checked_cast( enabledLayers.size() ), - enabledLayers.data(), - checked_cast( enabledExtensions.size() ), - enabledExtensions.data() }, + { {}, &applicationInfo, enabledLayers, enabledExtensions }, { {}, severityFlags, messageTypeFlags, &vk::su::debugUtilsMessengerCallback } ); #endif vk::UniqueInstance instance = vk::createInstanceUnique( instanceCreateInfo.get() ); @@ -412,19 +388,13 @@ namespace vk vk::AttachmentReference depthAttachment( 1, vk::ImageLayout::eDepthStencilAttachmentOptimal ); vk::SubpassDescription subpassDescription( vk::SubpassDescriptionFlags(), vk::PipelineBindPoint::eGraphics, - 0, - nullptr, - 1, - &colorAttachment, - nullptr, + {}, + colorAttachment, + {}, ( depthFormat != vk::Format::eUndefined ) ? &depthAttachment : nullptr ); return device->createRenderPassUnique( - vk::RenderPassCreateInfo( vk::RenderPassCreateFlags(), - static_cast( attachmentDescriptions.size() ), - attachmentDescriptions.data(), - 1, - &subpassDescription ) ); + vk::RenderPassCreateInfo( vk::RenderPassCreateFlags(), attachmentDescriptions, subpassDescription ) ); } VKAPI_ATTR VkBool32 VKAPI_CALL @@ -753,8 +723,7 @@ namespace vk void submitAndWait( vk::UniqueDevice & device, vk::Queue queue, vk::UniqueCommandBuffer & commandBuffer ) { vk::UniqueFence fence = device->createFenceUnique( vk::FenceCreateInfo() ); - vk::PipelineStageFlags pipelineStageFlags = vk::PipelineStageFlagBits::eColorAttachmentOutput; - queue.submit( vk::SubmitInfo( 0, nullptr, &pipelineStageFlags, 1, &commandBuffer.get() ), fence.get() ); + queue.submit( vk::SubmitInfo( {}, {}, *commandBuffer ), fence.get() ); while ( vk::Result::eTimeout == device->waitForFences( fence.get(), VK_TRUE, vk::su::FenceTimeout ) ) ; } @@ -789,7 +758,7 @@ namespace vk vk::DescriptorImageInfo imageInfo( *textureData.textureSampler, *textureData.imageData->imageView, vk::ImageLayout::eShaderReadOnlyOptimal ); writeDescriptorSets.push_back( vk::WriteDescriptorSet( - *descriptorSet, dstBinding, 0, 1, vk::DescriptorType::eCombinedImageSampler, &imageInfo, nullptr, nullptr ) ); + *descriptorSet, dstBinding, 0, vk::DescriptorType::eCombinedImageSampler, imageInfo, {}, nullptr ) ); device->updateDescriptorSets( writeDescriptorSets, nullptr ); } @@ -896,8 +865,7 @@ namespace vk tiling, usage | vk::ImageUsageFlagBits::eSampled, vk::SharingMode::eExclusive, - 0, - nullptr, + {}, initialLayout ); image = device->createImageUnique( imageCreateInfo ); @@ -981,8 +949,7 @@ namespace vk 1, usage, vk::SharingMode::eExclusive, - 0, - nullptr, + {}, preTransform, compositeAlpha, presentMode, diff --git a/tests/DeviceFunctions/DeviceFunctions.cpp b/tests/DeviceFunctions/DeviceFunctions.cpp index fab8e7e..d6fe4fb 100644 --- a/tests/DeviceFunctions/DeviceFunctions.cpp +++ b/tests/DeviceFunctions/DeviceFunctions.cpp @@ -47,7 +47,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), static_cast( graphicsQueueFamilyIndex ), 1, &queuePriority ); vk::UniqueDevice device = - physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), 1, &deviceQueueCreateInfo ) ); + physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ) ); std::vector data; device->getAccelerationStructureHandleNV( {}, data, vk::DispatchLoaderDynamic() ); diff --git a/tests/NoExceptions/NoExceptions.cpp b/tests/NoExceptions/NoExceptions.cpp index b555d33..d57d2b6 100644 --- a/tests/NoExceptions/NoExceptions.cpp +++ b/tests/NoExceptions/NoExceptions.cpp @@ -60,7 +60,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DeviceQueueCreateFlags(), static_cast( graphicsQueueFamilyIndex ), 1, &queuePriority ); vk::UniqueDevice device = physicalDevices[0] - .createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), 1, &deviceQueueCreateInfo ) ) + .createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ) ) .value; VULKAN_HPP_DEFAULT_DISPATCHER.init( *device ); diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 9dd3ff7..1f4b099 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -28023,7 +28023,24 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + AccelerationStructureCreateInfoKHR( + VULKAN_HPP_NAMESPACE::DeviceSize compactedSize_, + VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_, + VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries< + const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateGeometryTypeInfoKHR> const & geometryInfos_, + VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {} ) + : compactedSize( compactedSize_ ) + , type( type_ ) + , flags( flags_ ) + , maxGeometryCount( static_cast( geometryInfos_.size() ) ) + , pGeometryInfos( geometryInfos_.data() ) + , deviceAddress( deviceAddress_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) AccelerationStructureCreateInfoKHR & operator=( VkAccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT @@ -28612,7 +28629,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + AccelerationStructureInfoNV( + VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_, + VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_, + uint32_t instanceCount_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_ ) + : type( type_ ) + , flags( flags_ ) + , instanceCount( instanceCount_ ) + , geometryCount( static_cast( geometries_.size() ) ) + , pGeometries( geometries_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) AccelerationStructureInfoNV & operator=( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -31036,7 +31067,20 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SampleLocationsInfoEXT( + VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel_, + VULKAN_HPP_NAMESPACE::Extent2D sampleLocationGridSize_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + sampleLocations_ ) + : sampleLocationsPerPixel( sampleLocationsPerPixel_ ) + , sampleLocationGridSize( sampleLocationGridSize_ ) + , sampleLocationsCount( static_cast( sampleLocations_.size() ) ) + , pSampleLocations( sampleLocations_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SampleLocationsInfoEXT & operator=( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -31338,7 +31382,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + BindAccelerationStructureMemoryInfoKHR( + VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure_, + VULKAN_HPP_NAMESPACE::DeviceMemory memory_, + VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_ ) + : accelerationStructure( accelerationStructure_ ) + , memory( memory_ ) + , memoryOffset( memoryOffset_ ) + , deviceIndexCount( static_cast( deviceIndices_.size() ) ) + , pDeviceIndices( deviceIndices_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) BindAccelerationStructureMemoryInfoKHR & operator=( VkBindAccelerationStructureMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT @@ -31466,7 +31524,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + BindBufferMemoryDeviceGroupInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_ ) + : deviceIndexCount( static_cast( deviceIndices_.size() ) ), pDeviceIndices( deviceIndices_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) BindBufferMemoryDeviceGroupInfo & operator=( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -31796,7 +31861,19 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + BindImageMemoryDeviceGroupInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + splitInstanceBindRegions_ = {} ) + : deviceIndexCount( static_cast( deviceIndices_.size() ) ) + , pDeviceIndices( deviceIndices_.data() ) + , splitInstanceBindRegionCount( static_cast( splitInstanceBindRegions_.size() ) ) + , pSplitInstanceBindRegions( splitInstanceBindRegions_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) BindImageMemoryDeviceGroupInfo & operator=( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -32422,7 +32499,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SparseBufferMemoryBindInfo( + VULKAN_HPP_NAMESPACE::Buffer buffer_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) + : buffer( buffer_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SparseBufferMemoryBindInfo & operator=( VkSparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -32507,7 +32592,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SparseImageOpaqueMemoryBindInfo( + VULKAN_HPP_NAMESPACE::Image image_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) + : image( image_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SparseImageOpaqueMemoryBindInfo & operator=( VkSparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -32920,7 +33013,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SparseImageMemoryBindInfo( + VULKAN_HPP_NAMESPACE::Image image_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) + : image( image_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SparseImageMemoryBindInfo & operator=( VkSparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -33023,7 +33124,31 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + BindSparseInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + bufferBinds_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + imageOpaqueBinds_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + imageBinds_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + signalSemaphores_ = {} ) + : waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) + , pWaitSemaphores( waitSemaphores_.data() ) + , bufferBindCount( static_cast( bufferBinds_.size() ) ) + , pBufferBinds( bufferBinds_.data() ) + , imageOpaqueBindCount( static_cast( imageOpaqueBinds_.size() ) ) + , pImageOpaqueBinds( imageOpaqueBinds_.data() ) + , imageBindCount( static_cast( imageBinds_.size() ) ) + , pImageBinds( imageBinds_.data() ) + , signalSemaphoreCount( static_cast( signalSemaphores_.size() ) ) + , pSignalSemaphores( signalSemaphores_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) BindSparseInfo & operator=( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -33378,7 +33503,22 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + BufferCreateInfo( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_, + VULKAN_HPP_NAMESPACE::DeviceSize size_, + VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_, + VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) + : flags( flags_ ) + , size( size_ ) + , usage( usage_ ) + , sharingMode( sharingMode_ ) + , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) + , pQueueFamilyIndices( queueFamilyIndices_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) BufferCreateInfo & operator=( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -34805,7 +34945,20 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + CoarseSampleOrderCustomNV( + VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_, + uint32_t sampleCount_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + sampleLocations_ ) + : shadingRate( shadingRate_ ) + , sampleCount( sampleCount_ ) + , sampleLocationCount( static_cast( sampleLocations_.size() ) ) + , pSampleLocations( sampleLocations_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) CoarseSampleOrderCustomNV & operator=( VkCoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -35586,7 +35739,19 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + template + SpecializationInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries< + const VULKAN_HPP_NAMESPACE::SpecializationMapEntry> const & mapEntries_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ = {} ) + : mapEntryCount( static_cast( mapEntries_.size() ) ) + , pMapEntries( mapEntries_.data() ) + , dataSize( data_.size() * sizeof( T ) ) + , pData( data_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SpecializationInfo & operator=( VkSpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -36712,7 +36877,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + D3D12FenceSubmitInfoKHR( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ = {} ) + : waitSemaphoreValuesCount( static_cast( waitSemaphoreValues_.size() ) ) + , pWaitSemaphoreValues( waitSemaphoreValues_.data() ) + , signalSemaphoreValuesCount( static_cast( signalSemaphoreValues_.size() ) ) + , pSignalSemaphoreValues( signalSemaphoreValues_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) D3D12FenceSubmitInfoKHR & operator=( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -37034,7 +37210,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + template + DebugMarkerObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, + uint64_t object_, + uint64_t tagName_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_ ) + : objectType( objectType_ ) + , object( object_ ) + , tagName( tagName_ ) + , tagSize( tag_.size() * sizeof( T ) ) + , pTag( tag_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DebugMarkerObjectTagInfoEXT & operator=( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -37467,7 +37657,32 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DebugUtilsMessengerCallbackDataEXT( + VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags_, + const char * pMessageIdName_, + int32_t messageIdNumber_, + const char * pMessage_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + queueLabels_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + cmdBufLabels_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + objects_ = {} ) + : flags( flags_ ) + , pMessageIdName( pMessageIdName_ ) + , messageIdNumber( messageIdNumber_ ) + , pMessage( pMessage_ ) + , queueLabelCount( static_cast( queueLabels_.size() ) ) + , pQueueLabels( queueLabels_.data() ) + , cmdBufLabelCount( static_cast( cmdBufLabels_.size() ) ) + , pCmdBufLabels( cmdBufLabels_.data() ) + , objectCount( static_cast( objects_.size() ) ) + , pObjects( objects_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DebugUtilsMessengerCallbackDataEXT & operator=( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -37783,7 +37998,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + template + DebugUtilsObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, + uint64_t objectHandle_, + uint64_t tagName_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_ ) + : objectType( objectType_ ) + , objectHandle( objectHandle_ ) + , tagName( tagName_ ) + , tagSize( tag_.size() * sizeof( T ) ) + , pTag( tag_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DebugUtilsObjectTagInfoEXT & operator=( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -38480,7 +38709,19 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DescriptorPoolCreateInfo( + VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_, + uint32_t maxSets_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & poolSizes_ ) + : flags( flags_ ) + , maxSets( maxSets_ ) + , poolSizeCount( static_cast( poolSizes_.size() ) ) + , pPoolSizes( poolSizes_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DescriptorPoolCreateInfo & operator=( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -38687,7 +38928,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DescriptorSetAllocateInfo( + VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + setLayouts_ ) + : descriptorPool( descriptorPool_ ) + , descriptorSetCount( static_cast( setLayouts_.size() ) ) + , pSetLayouts( setLayouts_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DescriptorSetAllocateInfo & operator=( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -38799,7 +39051,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DescriptorSetLayoutBinding( + uint32_t binding_, + VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_, + VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & immutableSamplers_ ) + : binding( binding_ ) + , descriptorType( descriptorType_ ) + , descriptorCount( static_cast( immutableSamplers_.size() ) ) + , stageFlags( stageFlags_ ) + , pImmutableSamplers( immutableSamplers_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DescriptorSetLayoutBinding & operator=( VkDescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -38905,7 +39171,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DescriptorSetLayoutBindingFlagsCreateInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + bindingFlags_ ) + : bindingCount( static_cast( bindingFlags_.size() ) ), pBindingFlags( bindingFlags_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DescriptorSetLayoutBindingFlagsCreateInfo & operator=( VkDescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT @@ -39014,7 +39288,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DescriptorSetLayoutCreateInfo( + VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + bindings_ ) + : flags( flags_ ), bindingCount( static_cast( bindings_.size() ) ), pBindings( bindings_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DescriptorSetLayoutCreateInfo & operator=( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -39196,7 +39479,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DescriptorSetVariableDescriptorCountAllocateInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorCounts_ ) + : descriptorSetCount( static_cast( descriptorCounts_.size() ) ) + , pDescriptorCounts( descriptorCounts_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DescriptorSetVariableDescriptorCountAllocateInfo & operator=( VkDescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT @@ -39502,7 +39793,29 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DescriptorUpdateTemplateCreateInfo( + VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + descriptorUpdateEntries_, + VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ = + VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType::eDescriptorSet, + VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ = {}, + VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, + VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {}, + uint32_t set_ = {} ) + : flags( flags_ ) + , descriptorUpdateEntryCount( static_cast( descriptorUpdateEntries_.size() ) ) + , pDescriptorUpdateEntries( descriptorUpdateEntries_.data() ) + , templateType( templateType_ ) + , descriptorSetLayout( descriptorSetLayout_ ) + , pipelineBindPoint( pipelineBindPoint_ ) + , pipelineLayout( pipelineLayout_ ) + , set( set_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DescriptorUpdateTemplateCreateInfo & operator=( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT @@ -39661,7 +39974,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DeviceQueueCreateInfo( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_, + uint32_t queueFamilyIndex_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queuePriorities_ ) + : flags( flags_ ) + , queueFamilyIndex( queueFamilyIndex_ ) + , queueCount( static_cast( queuePriorities_.size() ) ) + , pQueuePriorities( queuePriorities_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DeviceQueueCreateInfo & operator=( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -40402,7 +40726,26 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DeviceCreateInfo( + VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + queueCreateInfos_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ = {}, + const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures_ = {} ) + : flags( flags_ ) + , queueCreateInfoCount( static_cast( queueCreateInfos_.size() ) ) + , pQueueCreateInfos( queueCreateInfos_.data() ) + , enabledLayerCount( static_cast( pEnabledLayerNames_.size() ) ) + , ppEnabledLayerNames( pEnabledLayerNames_.data() ) + , enabledExtensionCount( static_cast( pEnabledExtensionNames_.size() ) ) + , ppEnabledExtensionNames( pEnabledExtensionNames_.data() ) + , pEnabledFeatures( pEnabledFeatures_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DeviceCreateInfo & operator=( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -40905,7 +41248,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DeviceGroupDeviceCreateInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + physicalDevices_ ) + : physicalDeviceCount( static_cast( physicalDevices_.size() ) ) + , pPhysicalDevices( physicalDevices_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DeviceGroupDeviceCreateInfo & operator=( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -41086,7 +41438,17 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DeviceGroupPresentInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceMasks_, + VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ = + VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR::eLocal ) + : swapchainCount( static_cast( deviceMasks_.size() ) ) + , pDeviceMasks( deviceMasks_.data() ) + , mode( mode_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DeviceGroupPresentInfoKHR & operator=( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -41196,7 +41558,17 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DeviceGroupRenderPassBeginInfo( + uint32_t deviceMask_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceRenderAreas_ ) + : deviceMask( deviceMask_ ) + , deviceRenderAreaCount( static_cast( deviceRenderAreas_.size() ) ) + , pDeviceRenderAreas( deviceRenderAreas_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DeviceGroupRenderPassBeginInfo & operator=( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -41314,7 +41686,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DeviceGroupSubmitInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreDeviceIndices_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferDeviceMasks_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreDeviceIndices_ = {} ) + : waitSemaphoreCount( static_cast( waitSemaphoreDeviceIndices_.size() ) ) + , pWaitSemaphoreDeviceIndices( waitSemaphoreDeviceIndices_.data() ) + , commandBufferCount( static_cast( commandBufferDeviceMasks_.size() ) ) + , pCommandBufferDeviceMasks( commandBufferDeviceMasks_.data() ) + , signalSemaphoreCount( static_cast( signalSemaphoreDeviceIndices_.size() ) ) + , pSignalSemaphoreDeviceIndices( signalSemaphoreDeviceIndices_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DeviceGroupSubmitInfo & operator=( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -43758,7 +44144,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + DrmFormatModifierPropertiesListEXT( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + drmFormatModifierProperties_ ) + : drmFormatModifierCount( static_cast( drmFormatModifierProperties_.size() ) ) + , pDrmFormatModifierProperties( drmFormatModifierProperties_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) DrmFormatModifierPropertiesListEXT & operator=( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -46001,7 +46396,25 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + FramebufferAttachmentImageInfo( + VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_, + uint32_t width_, + uint32_t height_, + uint32_t layerCount_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_ ) + : flags( flags_ ) + , usage( usage_ ) + , width( width_ ) + , height( height_ ) + , layerCount( layerCount_ ) + , viewFormatCount( static_cast( viewFormats_.size() ) ) + , pViewFormats( viewFormats_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) FramebufferAttachmentImageInfo & operator=( VkFramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -46140,7 +46553,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + FramebufferAttachmentsCreateInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + attachmentImageInfos_ ) + : attachmentImageInfoCount( static_cast( attachmentImageInfos_.size() ) ) + , pAttachmentImageInfos( attachmentImageInfos_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) FramebufferAttachmentsCreateInfo & operator=( VkFramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -46254,7 +46676,25 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + FramebufferCreateInfo( + VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags_, + VULKAN_HPP_NAMESPACE::RenderPass renderPass_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, + uint32_t width_ = {}, + uint32_t height_ = {}, + uint32_t layers_ = {} ) + : flags( flags_ ) + , renderPass( renderPass_ ) + , attachmentCount( static_cast( attachments_.size() ) ) + , pAttachments( attachments_.data() ) + , width( width_ ) + , height( height_ ) + , layers( layers_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) FramebufferCreateInfo & operator=( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -46566,7 +47006,38 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + GeneratedCommandsInfoNV( + VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, + VULKAN_HPP_NAMESPACE::Pipeline pipeline_, + VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + streams_, + uint32_t sequencesCount_ = {}, + VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer_ = {}, + VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset_ = {}, + VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ = {}, + VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ = {}, + VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ = {}, + VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ = {}, + VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ = {} ) + : pipelineBindPoint( pipelineBindPoint_ ) + , pipeline( pipeline_ ) + , indirectCommandsLayout( indirectCommandsLayout_ ) + , streamCount( static_cast( streams_.size() ) ) + , pStreams( streams_.data() ) + , sequencesCount( sequencesCount_ ) + , preprocessBuffer( preprocessBuffer_ ) + , preprocessOffset( preprocessOffset_ ) + , preprocessSize( preprocessSize_ ) + , sequencesCountBuffer( sequencesCountBuffer_ ) + , sequencesCountOffset( sequencesCountOffset_ ) + , sequencesIndexBuffer( sequencesIndexBuffer_ ) + , sequencesIndexOffset( sequencesIndexOffset_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) GeneratedCommandsInfoNV & operator=( VkGeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -47049,7 +47520,22 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineVertexInputStateCreateInfo( + VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + vertexBindingDescriptions_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + vertexAttributeDescriptions_ = {} ) + : flags( flags_ ) + , vertexBindingDescriptionCount( static_cast( vertexBindingDescriptions_.size() ) ) + , pVertexBindingDescriptions( vertexBindingDescriptions_.data() ) + , vertexAttributeDescriptionCount( static_cast( vertexAttributeDescriptions_.size() ) ) + , pVertexAttributeDescriptions( vertexAttributeDescriptions_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineVertexInputStateCreateInfo & operator=( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT @@ -47503,7 +47989,20 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineViewportStateCreateInfo( + VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewports_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & scissors_ = {} ) + : flags( flags_ ) + , viewportCount( static_cast( viewports_.size() ) ) + , pViewports( viewports_.data() ) + , scissorCount( static_cast( scissors_.size() ) ) + , pScissors( scissors_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineViewportStateCreateInfo & operator=( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -48410,7 +48909,24 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineColorBlendStateCreateInfo( + VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags_, + VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable_, + VULKAN_HPP_NAMESPACE::LogicOp logicOp_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries< + const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState> const & attachments_, + std::array const & blendConstants_ = {} ) + : flags( flags_ ) + , logicOpEnable( logicOpEnable_ ) + , logicOp( logicOp_ ) + , attachmentCount( static_cast( attachments_.size() ) ) + , pAttachments( attachments_.data() ) + , blendConstants( blendConstants_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineColorBlendStateCreateInfo & operator=( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -48547,7 +49063,17 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineDynamicStateCreateInfo( + VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicStates_ ) + : flags( flags_ ) + , dynamicStateCount( static_cast( dynamicStates_.size() ) ) + , pDynamicStates( dynamicStates_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineDynamicStateCreateInfo & operator=( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -48688,7 +49214,46 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + GraphicsPipelineCreateInfo( + VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + stages_, + const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, + VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, + VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, + uint32_t subpass_ = {}, + VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, + int32_t basePipelineIndex_ = {} ) + : flags( flags_ ) + , stageCount( static_cast( stages_.size() ) ) + , pStages( stages_.data() ) + , pVertexInputState( pVertexInputState_ ) + , pInputAssemblyState( pInputAssemblyState_ ) + , pTessellationState( pTessellationState_ ) + , pViewportState( pViewportState_ ) + , pRasterizationState( pRasterizationState_ ) + , pMultisampleState( pMultisampleState_ ) + , pDepthStencilState( pDepthStencilState_ ) + , pColorBlendState( pColorBlendState_ ) + , pDynamicState( pDynamicState_ ) + , layout( layout_ ) + , renderPass( renderPass_ ) + , subpass( subpass_ ) + , basePipelineHandle( basePipelineHandle_ ) + , basePipelineIndex( basePipelineIndex_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) GraphicsPipelineCreateInfo & operator=( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -48916,7 +49481,20 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + GraphicsShaderGroupCreateInfoNV( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + stages_, + const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, + const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {} ) + : stageCount( static_cast( stages_.size() ) ) + , pStages( stages_.data() ) + , pVertexInputState( pVertexInputState_ ) + , pTessellationState( pTessellationState_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) GraphicsShaderGroupCreateInfoNV & operator=( VkGraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -49042,7 +49620,19 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + GraphicsPipelineShaderGroupsCreateInfoNV( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + groups_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelines_ = {} ) + : groupCount( static_cast( groups_.size() ) ) + , pGroups( groups_.data() ) + , pipelineCount( static_cast( pipelines_.size() ) ) + , pPipelines( pipelines_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) GraphicsPipelineShaderGroupsCreateInfoNV & operator=( VkGraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -49759,7 +50349,36 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + ImageCreateInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ImageType imageType_, + VULKAN_HPP_NAMESPACE::Format format_, + VULKAN_HPP_NAMESPACE::Extent3D extent_, + uint32_t mipLevels_, + uint32_t arrayLayers_, + VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_, + VULKAN_HPP_NAMESPACE::ImageTiling tiling_, + VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_, + VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, + VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) + : flags( flags_ ) + , imageType( imageType_ ) + , format( format_ ) + , extent( extent_ ) + , mipLevels( mipLevels_ ) + , arrayLayers( arrayLayers_ ) + , samples( samples_ ) + , tiling( tiling_ ) + , usage( usage_ ) + , sharingMode( sharingMode_ ) + , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) + , pQueueFamilyIndices( queueFamilyIndices_.data() ) + , initialLayout( initialLayout_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ImageCreateInfo & operator=( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -50004,7 +50623,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + ImageDrmFormatModifierExplicitCreateInfoEXT( + uint64_t drmFormatModifier_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + planeLayouts_ ) + : drmFormatModifier( drmFormatModifier_ ) + , drmFormatModifierPlaneCount( static_cast( planeLayouts_.size() ) ) + , pPlaneLayouts( planeLayouts_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ImageDrmFormatModifierExplicitCreateInfoEXT & operator=( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -50122,7 +50752,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + ImageDrmFormatModifierListCreateInfoEXT( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drmFormatModifiers_ ) + : drmFormatModifierCount( static_cast( drmFormatModifiers_.size() ) ) + , pDrmFormatModifiers( drmFormatModifiers_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ImageDrmFormatModifierListCreateInfoEXT & operator=( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -50303,7 +50941,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + ImageFormatListCreateInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_ ) + : viewFormatCount( static_cast( viewFormats_.size() ) ), pViewFormats( viewFormats_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ImageFormatListCreateInfo & operator=( VkImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -52763,7 +53408,48 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + IndirectCommandsLayoutTokenNV( + VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType_, + uint32_t stream_, + uint32_t offset_, + uint32_t vertexBindingUnit_, + VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride_, + VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout_, + VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags_, + uint32_t pushconstantOffset_, + uint32_t pushconstantSize_, + VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypes_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypeValues_ = {} ) + : tokenType( tokenType_ ) + , stream( stream_ ) + , offset( offset_ ) + , vertexBindingUnit( vertexBindingUnit_ ) + , vertexDynamicStride( vertexDynamicStride_ ) + , pushconstantPipelineLayout( pushconstantPipelineLayout_ ) + , pushconstantShaderStageFlags( pushconstantShaderStageFlags_ ) + , pushconstantOffset( pushconstantOffset_ ) + , pushconstantSize( pushconstantSize_ ) + , indirectStateFlags( indirectStateFlags_ ) + , indexTypeCount( static_cast( indexTypes_.size() ) ) + , pIndexTypes( indexTypes_.data() ) + , pIndexTypeValues( indexTypeValues_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( indexTypes_.size() == indexTypeValues_.size() ); +# else + if ( indexTypes_.size() != indexTypeValues_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::IndirectCommandsLayoutTokenNV::IndirectCommandsLayoutTokenNV: indexTypes_.size() != indexTypeValues_.size()" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) IndirectCommandsLayoutTokenNV & operator=( VkIndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -52972,7 +53658,23 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + IndirectCommandsLayoutCreateInfoNV( + VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags_, + VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + tokens_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streamStrides_ = {} ) + : flags( flags_ ) + , pipelineBindPoint( pipelineBindPoint_ ) + , tokenCount( static_cast( tokens_.size() ) ) + , pTokens( tokens_.data() ) + , streamCount( static_cast( streamStrides_.size() ) ) + , pStreamStrides( streamStrides_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) IndirectCommandsLayoutCreateInfoNV & operator=( VkIndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -53284,7 +53986,22 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + InstanceCreateInfo( + VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags_, + const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ = {} ) + : flags( flags_ ) + , pApplicationInfo( pApplicationInfo_ ) + , enabledLayerCount( static_cast( pEnabledLayerNames_.size() ) ) + , ppEnabledLayerNames( pEnabledLayerNames_.data() ) + , enabledExtensionCount( static_cast( pEnabledExtensionNames_.size() ) ) + , ppEnabledExtensionNames( pEnabledExtensionNames_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) InstanceCreateInfo & operator=( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -60599,7 +61316,19 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PhysicalDeviceImageDrmFormatModifierInfoEXT( + uint64_t drmFormatModifier_, + VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) + : drmFormatModifier( drmFormatModifier_ ) + , sharingMode( sharingMode_ ) + , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) + , pQueueFamilyIndices( queueFamilyIndices_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PhysicalDeviceImageDrmFormatModifierInfoEXT & operator=( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -69357,7 +70086,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + template + PipelineCacheCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_ ) + : flags( flags_ ), initialDataSize( initialData_.size() * sizeof( T ) ), pInitialData( initialData_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineCacheCreateInfo & operator=( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -69672,7 +70409,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineCoverageModulationStateCreateInfoNV( + VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags_, + VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode_, + VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & coverageModulationTable_ ) + : flags( flags_ ) + , coverageModulationMode( coverageModulationMode_ ) + , coverageModulationTableEnable( coverageModulationTableEnable_ ) + , coverageModulationTableCount( static_cast( coverageModulationTable_.size() ) ) + , pCoverageModulationTable( coverageModulationTable_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineCoverageModulationStateCreateInfoNV & operator=( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -70080,7 +70831,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineCreationFeedbackCreateInfoEXT( + VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT * pPipelineCreationFeedback_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + pipelineStageCreationFeedbacks_ ) + : pPipelineCreationFeedback( pPipelineCreationFeedback_ ) + , pipelineStageCreationFeedbackCount( static_cast( pipelineStageCreationFeedbacks_.size() ) ) + , pPipelineStageCreationFeedbacks( pipelineStageCreationFeedbacks_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineCreationFeedbackCreateInfoEXT & operator=( VkPipelineCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -70204,7 +70966,19 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineDiscardRectangleStateCreateInfoEXT( + VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags_, + VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & discardRectangles_ ) + : flags( flags_ ) + , discardRectangleMode( discardRectangleMode_ ) + , discardRectangleCount( static_cast( discardRectangles_.size() ) ) + , pDiscardRectangles( discardRectangles_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineDiscardRectangleStateCreateInfoEXT & operator=( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -70428,7 +71202,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + template + PipelineExecutableInternalRepresentationKHR( std::array const & name_, + std::array const & description_, + VULKAN_HPP_NAMESPACE::Bool32 isText_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) + : name( name_ ) + , description( description_ ) + , isText( isText_ ) + , dataSize( data_.size() * sizeof( T ) ) + , pData( data_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineExecutableInternalRepresentationKHR & operator=( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT @@ -70888,7 +71676,22 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineLayoutCreateInfo( + VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + setLayouts_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + pushConstantRanges_ = {} ) + : flags( flags_ ) + , setLayoutCount( static_cast( setLayouts_.size() ) ) + , pSetLayouts( setLayouts_.data() ) + , pushConstantRangeCount( static_cast( pushConstantRanges_.size() ) ) + , pPushConstantRanges( pushConstantRanges_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineLayoutCreateInfo & operator=( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -71022,7 +71825,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineLibraryCreateInfoKHR( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & libraries_ ) + : libraryCount( static_cast( libraries_.size() ) ), pLibraries( libraries_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineLibraryCreateInfoKHR & operator=( VkPipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -72096,7 +72906,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineVertexInputDivisorStateCreateInfoEXT( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries< + const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT> const & vertexBindingDivisors_ ) + : vertexBindingDivisorCount( static_cast( vertexBindingDivisors_.size() ) ) + , pVertexBindingDivisors( vertexBindingDivisors_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineVertexInputDivisorStateCreateInfoEXT & operator=( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -72212,7 +73031,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineViewportCoarseSampleOrderStateCreateInfoNV( + VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + customSampleOrders_ ) + : sampleOrderType( sampleOrderType_ ) + , customSampleOrderCount( static_cast( customSampleOrders_.size() ) ) + , pCustomSampleOrders( customSampleOrders_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineViewportCoarseSampleOrderStateCreateInfoNV & operator=( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -72334,7 +73164,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineViewportExclusiveScissorStateCreateInfoNV( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & exclusiveScissors_ ) + : exclusiveScissorCount( static_cast( exclusiveScissors_.size() ) ) + , pExclusiveScissors( exclusiveScissors_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineViewportExclusiveScissorStateCreateInfoNV & operator=( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -72440,7 +73278,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + ShadingRatePaletteNV( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + shadingRatePaletteEntries_ ) + : shadingRatePaletteEntryCount( static_cast( shadingRatePaletteEntries_.size() ) ) + , pShadingRatePaletteEntries( shadingRatePaletteEntries_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ShadingRatePaletteNV & operator=( VkShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -72524,7 +73371,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineViewportShadingRateImageStateCreateInfoNV( + VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + shadingRatePalettes_ ) + : shadingRateImageEnable( shadingRateImageEnable_ ) + , viewportCount( static_cast( shadingRatePalettes_.size() ) ) + , pShadingRatePalettes( shadingRatePalettes_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineViewportShadingRateImageStateCreateInfoNV & operator=( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -72733,7 +73591,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineViewportSwizzleStateCreateInfoNV( + VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + viewportSwizzles_ ) + : flags( flags_ ) + , viewportCount( static_cast( viewportSwizzles_.size() ) ) + , pViewportSwizzles( viewportSwizzles_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineViewportSwizzleStateCreateInfoNV & operator=( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -72916,7 +73785,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PipelineViewportWScalingStateCreateInfoNV( + VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + viewportWScalings_ ) + : viewportWScalingEnable( viewportWScalingEnable_ ) + , viewportCount( static_cast( viewportWScalings_.size() ) ) + , pViewportWScalings( viewportWScalings_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PipelineViewportWScalingStateCreateInfoNV & operator=( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -73121,7 +74001,46 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PresentInfoKHR( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & swapchains_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageIndices_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & results_ = {} ) + : waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) + , pWaitSemaphores( waitSemaphores_.data() ) + , swapchainCount( static_cast( swapchains_.size() ) ) + , pSwapchains( swapchains_.data() ) + , pImageIndices( imageIndices_.data() ) + , pResults( results_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( swapchains_.size() == imageIndices_.size() ); + VULKAN_HPP_ASSERT( results_.empty() || ( swapchains_.size() == results_.size() ) ); + VULKAN_HPP_ASSERT( results_.empty() || ( imageIndices_.size() == results_.size() ) ); +# else + if ( swapchains_.size() != imageIndices_.size() ) + { + throw LogicError( VULKAN_HPP_NAMESPACE_STRING + "::PresentInfoKHR::PresentInfoKHR: swapchains_.size() != imageIndices_.size()" ); + } + if ( !results_.empty() && ( swapchains_.size() != results_.size() ) ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::PresentInfoKHR::PresentInfoKHR: !results_.empty() && ( swapchains_.size() != results_.size() )" ); + } + if ( !results_.empty() && ( imageIndices_.size() != results_.size() ) ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::PresentInfoKHR::PresentInfoKHR: !results_.empty() && ( imageIndices_.size() != results_.size() )" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PresentInfoKHR & operator=( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -73348,7 +74267,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PresentRegionKHR( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & rectangles_ ) + : rectangleCount( static_cast( rectangles_.size() ) ), pRectangles( rectangles_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PresentRegionKHR & operator=( VkPresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -73426,7 +74352,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PresentRegionsKHR( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) + : swapchainCount( static_cast( regions_.size() ) ), pRegions( regions_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PresentRegionsKHR & operator=( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -73590,7 +74523,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + PresentTimesInfoGOOGLE( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & times_ ) + : swapchainCount( static_cast( times_.size() ) ), pTimes( times_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) PresentTimesInfoGOOGLE & operator=( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -73962,7 +74902,17 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + QueryPoolPerformanceCreateInfoKHR( + uint32_t queueFamilyIndex_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & counterIndices_ ) + : queueFamilyIndex( queueFamilyIndex_ ) + , counterIndexCount( static_cast( counterIndices_.size() ) ) + , pCounterIndices( counterIndices_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) QueryPoolPerformanceCreateInfoKHR & operator=( VkQueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -74633,7 +75583,34 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RayTracingPipelineCreateInfoKHR( + VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + stages_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries< + const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR> const & groups_ = {}, + uint32_t maxRecursionDepth_ = {}, + VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR libraries_ = {}, + const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface_ = {}, + VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, + VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, + int32_t basePipelineIndex_ = {} ) + : flags( flags_ ) + , stageCount( static_cast( stages_.size() ) ) + , pStages( stages_.data() ) + , groupCount( static_cast( groups_.size() ) ) + , pGroups( groups_.data() ) + , maxRecursionDepth( maxRecursionDepth_ ) + , libraries( libraries_ ) + , pLibraryInterface( pLibraryInterface_ ) + , layout( layout_ ) + , basePipelineHandle( basePipelineHandle_ ) + , basePipelineIndex( basePipelineIndex_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RayTracingPipelineCreateInfoKHR & operator=( VkRayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -74956,7 +75933,30 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RayTracingPipelineCreateInfoNV( + VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + stages_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries< + const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV> const & groups_ = {}, + uint32_t maxRecursionDepth_ = {}, + VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, + VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, + int32_t basePipelineIndex_ = {} ) + : flags( flags_ ) + , stageCount( static_cast( stages_.size() ) ) + , pStages( stages_.data() ) + , groupCount( static_cast( groups_.size() ) ) + , pGroups( groups_.data() ) + , maxRecursionDepth( maxRecursionDepth_ ) + , layout( layout_ ) + , basePipelineHandle( basePipelineHandle_ ) + , basePipelineIndex( basePipelineIndex_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RayTracingPipelineCreateInfoNV & operator=( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -75172,7 +76172,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RenderPassAttachmentBeginInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) + : attachmentCount( static_cast( attachments_.size() ) ), pAttachments( attachments_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RenderPassAttachmentBeginInfo & operator=( VkRenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -75281,7 +76288,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RenderPassBeginInfo( + VULKAN_HPP_NAMESPACE::RenderPass renderPass_, + VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_, + VULKAN_HPP_NAMESPACE::Rect2D renderArea_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & clearValues_ ) + : renderPass( renderPass_ ) + , framebuffer( framebuffer_ ) + , renderArea( renderArea_ ) + , clearValueCount( static_cast( clearValues_.size() ) ) + , pClearValues( clearValues_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RenderPassBeginInfo & operator=( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -75415,7 +76436,43 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SubpassDescription( + VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_, + VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + inputAttachments_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + colorAttachments_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + resolveAttachments_ = {}, + const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ = {} ) + : flags( flags_ ) + , pipelineBindPoint( pipelineBindPoint_ ) + , inputAttachmentCount( static_cast( inputAttachments_.size() ) ) + , pInputAttachments( inputAttachments_.data() ) + , colorAttachmentCount( static_cast( colorAttachments_.size() ) ) + , pColorAttachments( colorAttachments_.data() ) + , pResolveAttachments( resolveAttachments_.data() ) + , pDepthStencilAttachment( pDepthStencilAttachment_ ) + , preserveAttachmentCount( static_cast( preserveAttachments_.size() ) ) + , pPreserveAttachments( preserveAttachments_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( resolveAttachments_.empty() || ( colorAttachments_.size() == resolveAttachments_.size() ) ); +# else + if ( !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() ) ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::SubpassDescription::SubpassDescription: !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() )" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SubpassDescription & operator=( VkSubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -75710,7 +76767,26 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RenderPassCreateInfo( + VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + attachments_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + subpasses_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + dependencies_ = {} ) + : flags( flags_ ) + , attachmentCount( static_cast( attachments_.size() ) ) + , pAttachments( attachments_.data() ) + , subpassCount( static_cast( subpasses_.size() ) ) + , pSubpasses( subpasses_.data() ) + , dependencyCount( static_cast( dependencies_.size() ) ) + , pDependencies( dependencies_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RenderPassCreateInfo & operator=( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -75885,7 +76961,45 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SubpassDescription2( + VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_, + VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, + uint32_t viewMask_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + inputAttachments_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + colorAttachments_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + resolveAttachments_ = {}, + const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ = {} ) + : flags( flags_ ) + , pipelineBindPoint( pipelineBindPoint_ ) + , viewMask( viewMask_ ) + , inputAttachmentCount( static_cast( inputAttachments_.size() ) ) + , pInputAttachments( inputAttachments_.data() ) + , colorAttachmentCount( static_cast( colorAttachments_.size() ) ) + , pColorAttachments( colorAttachments_.data() ) + , pResolveAttachments( resolveAttachments_.data() ) + , pDepthStencilAttachment( pDepthStencilAttachment_ ) + , preserveAttachmentCount( static_cast( preserveAttachments_.size() ) ) + , pPreserveAttachments( preserveAttachments_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( resolveAttachments_.empty() || ( colorAttachments_.size() == resolveAttachments_.size() ) ); +# else + if ( !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() ) ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::SubpassDescription2::SubpassDescription2: !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() )" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SubpassDescription2 & operator=( VkSubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -76244,7 +77358,29 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RenderPassCreateInfo2( + VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + attachments_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + subpasses_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + dependencies_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlatedViewMasks_ = {} ) + : flags( flags_ ) + , attachmentCount( static_cast( attachments_.size() ) ) + , pAttachments( attachments_.data() ) + , subpassCount( static_cast( subpasses_.size() ) ) + , pSubpasses( subpasses_.data() ) + , dependencyCount( static_cast( dependencies_.size() ) ) + , pDependencies( dependencies_.data() ) + , correlatedViewMaskCount( static_cast( correlatedViewMasks_.size() ) ) + , pCorrelatedViewMasks( correlatedViewMasks_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RenderPassCreateInfo2 & operator=( VkRenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -76518,7 +77654,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RenderPassInputAttachmentAspectCreateInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + aspectReferences_ ) + : aspectReferenceCount( static_cast( aspectReferences_.size() ) ) + , pAspectReferences( aspectReferences_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RenderPassInputAttachmentAspectCreateInfo & operator=( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT @@ -76633,7 +77778,21 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RenderPassMultiviewCreateInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewMasks_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewOffsets_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlationMasks_ = {} ) + : subpassCount( static_cast( viewMasks_.size() ) ) + , pViewMasks( viewMasks_.data() ) + , dependencyCount( static_cast( viewOffsets_.size() ) ) + , pViewOffsets( viewOffsets_.data() ) + , correlationMaskCount( static_cast( correlationMasks_.size() ) ) + , pCorrelationMasks( correlationMasks_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RenderPassMultiviewCreateInfo & operator=( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -76853,7 +78012,20 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + RenderPassSampleLocationsBeginInfoEXT( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + attachmentInitialSampleLocations_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + postSubpassSampleLocations_ = {} ) + : attachmentInitialSampleLocationsCount( static_cast( attachmentInitialSampleLocations_.size() ) ) + , pAttachmentInitialSampleLocations( attachmentInitialSampleLocations_.data() ) + , postSubpassSampleLocationsCount( static_cast( postSubpassSampleLocations_.size() ) ) + , pPostSubpassSampleLocations( postSubpassSampleLocations_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) RenderPassSampleLocationsBeginInfoEXT & operator=( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT @@ -78237,7 +79409,29 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SemaphoreWaitInfo( + VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & semaphores_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ = {} ) + : flags( flags_ ) + , semaphoreCount( static_cast( semaphores_.size() ) ) + , pSemaphores( semaphores_.data() ) + , pValues( values_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( semaphores_.size() == values_.size() ); +# else + if ( semaphores_.size() != values_.size() ) + { + throw LogicError( VULKAN_HPP_NAMESPACE_STRING + "::SemaphoreWaitInfo::SemaphoreWaitInfo: semaphores_.size() != values_.size()" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SemaphoreWaitInfo & operator=( VkSemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -78415,7 +79609,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + ShaderModuleCreateInfo( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & code_ ) + : flags( flags_ ), codeSize( code_.size() * 4 ), pCode( code_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ShaderModuleCreateInfo & operator=( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -79292,7 +80493,36 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SubmitInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + waitDstStageMask_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + commandBuffers_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + signalSemaphores_ = {} ) + : waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) + , pWaitSemaphores( waitSemaphores_.data() ) + , pWaitDstStageMask( waitDstStageMask_.data() ) + , commandBufferCount( static_cast( commandBuffers_.size() ) ) + , pCommandBuffers( commandBuffers_.data() ) + , signalSemaphoreCount( static_cast( signalSemaphores_.size() ) ) + , pSignalSemaphores( signalSemaphores_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( waitSemaphores_.size() == waitDstStageMask_.size() ); +# else + if ( waitSemaphores_.size() != waitDstStageMask_.size() ) + { + throw LogicError( VULKAN_HPP_NAMESPACE_STRING + "::SubmitInfo::SubmitInfo: waitSemaphores_.size() != waitDstStageMask_.size()" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SubmitInfo & operator=( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -80565,7 +81795,45 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + SwapchainCreateInfoKHR( + VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags_, + VULKAN_HPP_NAMESPACE::SurfaceKHR surface_, + uint32_t minImageCount_, + VULKAN_HPP_NAMESPACE::Format imageFormat_, + VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace_, + VULKAN_HPP_NAMESPACE::Extent2D imageExtent_, + uint32_t imageArrayLayers_, + VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_, + VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, + VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ = + VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, + VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha_ = + VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR::eOpaque, + VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate, + VULKAN_HPP_NAMESPACE::Bool32 clipped_ = {}, + VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain_ = {} ) + : flags( flags_ ) + , surface( surface_ ) + , minImageCount( minImageCount_ ) + , imageFormat( imageFormat_ ) + , imageColorSpace( imageColorSpace_ ) + , imageExtent( imageExtent_ ) + , imageArrayLayers( imageArrayLayers_ ) + , imageUsage( imageUsage_ ) + , imageSharingMode( imageSharingMode_ ) + , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) + , pQueueFamilyIndices( queueFamilyIndices_.data() ) + , preTransform( preTransform_ ) + , compositeAlpha( compositeAlpha_ ) + , presentMode( presentMode_ ) + , clipped( clipped_ ) + , oldSwapchain( oldSwapchain_ ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) SwapchainCreateInfoKHR & operator=( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -80939,7 +82207,18 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + TimelineSemaphoreSubmitInfo( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ = {} ) + : waitSemaphoreValueCount( static_cast( waitSemaphoreValues_.size() ) ) + , pWaitSemaphoreValues( waitSemaphoreValues_.data() ) + , signalSemaphoreValueCount( static_cast( signalSemaphoreValues_.size() ) ) + , pSignalSemaphoreValues( signalSemaphoreValues_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) TimelineSemaphoreSubmitInfo & operator=( VkTimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -81148,7 +82427,15 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + template + ValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_ ) + : flags( flags_ ), initialDataSize( initialData_.size() * sizeof( T ) ), pInitialData( initialData_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ValidationCacheCreateInfoEXT & operator=( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -81261,7 +82548,20 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + ValidationFeaturesEXT( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + enabledValidationFeatures_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + disabledValidationFeatures_ = {} ) + : enabledValidationFeatureCount( static_cast( enabledValidationFeatures_.size() ) ) + , pEnabledValidationFeatures( enabledValidationFeatures_.data() ) + , disabledValidationFeatureCount( static_cast( disabledValidationFeatures_.size() ) ) + , pDisabledValidationFeatures( disabledValidationFeatures_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ValidationFeaturesEXT & operator=( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -81390,7 +82690,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + ValidationFlagsEXT( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + disabledValidationChecks_ ) + : disabledValidationCheckCount( static_cast( disabledValidationChecks_.size() ) ) + , pDisabledValidationChecks( disabledValidationChecks_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) ValidationFlagsEXT & operator=( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -81696,7 +83005,61 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + Win32KeyedMutexAcquireReleaseInfoKHR( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeouts_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + releaseSyncs_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ = {} ) + : acquireCount( static_cast( acquireSyncs_.size() ) ) + , pAcquireSyncs( acquireSyncs_.data() ) + , pAcquireKeys( acquireKeys_.data() ) + , pAcquireTimeouts( acquireTimeouts_.data() ) + , releaseCount( static_cast( releaseSyncs_.size() ) ) + , pReleaseSyncs( releaseSyncs_.data() ) + , pReleaseKeys( releaseKeys_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireKeys_.size() ); + VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireTimeouts_.size() ); + VULKAN_HPP_ASSERT( acquireKeys_.size() == acquireTimeouts_.size() ); +# else + if ( acquireSyncs_.size() != acquireKeys_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireSyncs_.size() != acquireKeys_.size()" ); + } + if ( acquireSyncs_.size() != acquireTimeouts_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireSyncs_.size() != acquireTimeouts_.size()" ); + } + if ( acquireKeys_.size() != acquireTimeouts_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireKeys_.size() != acquireTimeouts_.size()" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( releaseSyncs_.size() == releaseKeys_.size() ); +# else + if ( releaseSyncs_.size() != releaseKeys_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: releaseSyncs_.size() != releaseKeys_.size()" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) Win32KeyedMutexAcquireReleaseInfoKHR & operator=( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT @@ -81886,7 +83249,61 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + Win32KeyedMutexAcquireReleaseInfoNV( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeoutMilliseconds_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + releaseSyncs_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ = {} ) + : acquireCount( static_cast( acquireSyncs_.size() ) ) + , pAcquireSyncs( acquireSyncs_.data() ) + , pAcquireKeys( acquireKeys_.data() ) + , pAcquireTimeoutMilliseconds( acquireTimeoutMilliseconds_.data() ) + , releaseCount( static_cast( releaseSyncs_.size() ) ) + , pReleaseSyncs( releaseSyncs_.data() ) + , pReleaseKeys( releaseKeys_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireKeys_.size() ); + VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireTimeoutMilliseconds_.size() ); + VULKAN_HPP_ASSERT( acquireKeys_.size() == acquireTimeoutMilliseconds_.size() ); +# else + if ( acquireSyncs_.size() != acquireKeys_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireSyncs_.size() != acquireKeys_.size()" ); + } + if ( acquireSyncs_.size() != acquireTimeoutMilliseconds_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireSyncs_.size() != acquireTimeoutMilliseconds_.size()" ); + } + if ( acquireKeys_.size() != acquireTimeoutMilliseconds_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireKeys_.size() != acquireTimeoutMilliseconds_.size()" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( releaseSyncs_.size() == releaseKeys_.size() ); +# else + if ( releaseSyncs_.size() != releaseKeys_.size() ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: releaseSyncs_.size() != releaseKeys_.size()" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +# endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) Win32KeyedMutexAcquireReleaseInfoNV & operator=( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT @@ -82179,7 +83596,42 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + WriteDescriptorSet( + VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_, + uint32_t dstBinding_, + uint32_t dstArrayElement_, + VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageInfo_, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + bufferInfo_ = {}, + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + texelBufferView_ = {} ) + : dstSet( dstSet_ ) + , dstBinding( dstBinding_ ) + , dstArrayElement( dstArrayElement_ ) + , descriptorCount( static_cast( !imageInfo_.empty() ? imageInfo_.size() + : !bufferInfo_.empty() ? bufferInfo_.size() + : texelBufferView_.size() ) ) + , descriptorType( descriptorType_ ) + , pImageInfo( imageInfo_.data() ) + , pBufferInfo( bufferInfo_.data() ) + , pTexelBufferView( texelBufferView_.data() ) + { +# ifdef VULKAN_HPP_NO_EXCEPTIONS + VULKAN_HPP_ASSERT( ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() ) == 1 ); +# else + if ( ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() ) != 1 ) + { + throw LogicError( + VULKAN_HPP_NAMESPACE_STRING + "::WriteDescriptorSet::WriteDescriptorSet: ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() ) != 1" ); + } +# endif /*VULKAN_HPP_NO_EXCEPTIONS*/ + } +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) WriteDescriptorSet & operator=( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT { @@ -82346,7 +83798,16 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + WriteDescriptorSetAccelerationStructureKHR( + VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & + accelerationStructures_ ) + : accelerationStructureCount( static_cast( accelerationStructures_.size() ) ) + , pAccelerationStructures( accelerationStructures_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) WriteDescriptorSetAccelerationStructureKHR & operator=( VkWriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT @@ -82455,7 +83916,14 @@ namespace VULKAN_HPP_NAMESPACE { *this = rhs; } -#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) + +# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) + template + WriteDescriptorSetInlineUniformBlockEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) + : dataSize( static_cast( data_.size() * sizeof( T ) ) ), pData( data_.data() ) + {} +# endif // !defined(VULKAN_HPP_DISABLE_ENHANCED_MODE) +#endif // !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) WriteDescriptorSetInlineUniformBlockEXT & operator=( VkWriteDescriptorSetInlineUniformBlockEXT const & rhs ) VULKAN_HPP_NOEXCEPT