diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 2c8e36d..b805def 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -370,7 +370,7 @@ ${enums} return replaceWithMap( enumsTemplate, { { "enums", enums } } ); } -std::string VulkanHppGenerator::generateHandles() +std::string VulkanHppGenerator::generateHandles() const { // Note: reordering structs or handles by features and extensions is not possible! // first, forward declare all the structs! @@ -388,11 +388,12 @@ std::string VulkanHppGenerator::generateHandles() } // then list all the handles + std::set listedHandles; for ( auto const & handle : m_handles ) { - if ( m_listedTypes.find( handle.first ) == m_listedTypes.end() ) + if ( listedHandles.find( handle.first ) == listedHandles.end() ) { - str += generateHandle( handle ); + str += generateHandle( handle, listedHandles ); } } return str; @@ -400,44 +401,40 @@ std::string VulkanHppGenerator::generateHandles() std::string VulkanHppGenerator::generateHashStructures() const { - const std::string hashTemplate = R"( -${enter} template <> struct hash - { - std::size_t operator()(VULKAN_HPP_NAMESPACE::${type} const & ${name}) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}(static_cast(${name})); - } - }; -${leave})"; + const std::string hashesTemplate = R"( + //======================= + //=== HASH structures === + //======================= - std::string str; - for ( auto handle : m_handles ) - { - if ( !handle.first.empty() ) - { - std::string enter, leave; - std::tie( enter, leave ) = generateProtection( handle.first, !handle.second.alias.empty() ); +${hashes} +)"; - std::string type = stripPrefix( handle.first, "Vk" ); - std::string name = startLowerCase( type ); - str += - replaceWithMap( hashTemplate, { { "enter", enter }, { "leave", leave }, { "name", name }, { "type", type } } ); - } + std::string hashes; + for ( auto const & feature : m_features ) + { + hashes += generateHashStructures( feature.second.types, feature.first ); } - return str; + for ( auto const & extIt : m_extensionsByNumber ) + { + hashes += generateHashStructures( extIt.second->second.types, extIt.second->first ); + } + return replaceWithMap( hashesTemplate, { { "hashes", hashes } } ); } std::string VulkanHppGenerator::generateIndexTypeTraits() const { - auto indexType = m_enums.find( "VkIndexType" ); - assert( indexType != m_enums.end() ); - - std::string str = R"( + const std::string indexTypeTraitsTemplate = R"( template struct IndexTypeValue {}; + +${indexTypeTraits} )"; + auto indexType = m_enums.find( "VkIndexType" ); + assert( indexType != m_enums.end() ); + + std::string indexTypeTraits; std::set seenCppTypes; for ( auto const & value : indexType->second.values ) { @@ -471,84 +468,54 @@ std::string VulkanHppGenerator::generateIndexTypeTraits() const // IndexType traits aren't necessarily invertible. // The Type -> Enum translation will only occur for the first prefixed enum value. // A hypothetical extension to this enum with a conflicting prefix will use the core spec value. - str += - "\n" - " template <>\n" - " struct IndexTypeValue<" + - cppType + - ">\n" - " {\n" - " static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::" + - valueName + - ";\n" - " };\n"; + const std::string typeToEnumTemplate = R"( + template <> + struct IndexTypeValue<${cppType}> + { + static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::${valueName}; + }; +)"; + indexTypeTraits += replaceWithMap( typeToEnumTemplate, { { "cppType", cppType }, { "valueName", valueName } } ); } + // Enum -> Type translations are always able to occur. - str += - "\n" - " template <>\n" - " struct CppType\n" - " {\n" - " using Type = " + - cppType + - ";\n" - " };\n"; + const std::string enumToTypeTemplate = R"( + template <> + struct CppType + { + using Type = ${cppType}; + }; +)"; + indexTypeTraits += replaceWithMap( enumToTypeTemplate, { { "cppType", cppType }, { "valueName", valueName } } ); } } - return str; + + return replaceWithMap( indexTypeTraitsTemplate, { { "indexTypeTraits", indexTypeTraits } } ); } std::string VulkanHppGenerator::generateRAIICommandDefinitions() const { - std::string str = R"( + const std::string commandDefinitionsTemplate = R"( //=========================== //=== COMMAND Definitions === //=========================== + +${commandDefinitions} )"; + std::string commandDefinitions; std::set listedCommands; // some commands are listed with more than one extension! for ( auto const & feature : m_features ) { - str += "\n //=== " + feature.first + " ===\n"; - for ( auto const & command : feature.second.commands ) - { - if ( m_RAIISpecialFunctions.find( command ) == m_RAIISpecialFunctions.end() ) - { - assert( listedCommands.find( command ) == listedCommands.end() ); - listedCommands.insert( command ); - str += constructRAIIHandleMemberFunction( - command, determineInitialSkipCount( command ), m_RAIISpecialFunctions, true ); - } - } + commandDefinitions += generateRAIICommandDefinitions( feature.second.commands, listedCommands, feature.first ); } for ( auto const & extIt : m_extensionsByNumber ) { - std::vector commands; - for ( auto const & command : extIt.second->second.commands ) - { - if ( ( m_RAIISpecialFunctions.find( command ) == m_RAIISpecialFunctions.end() ) && - ( listedCommands.find( command ) == listedCommands.end() ) ) - { - listedCommands.insert( command ); - commands.push_back( command ); - } - } - if ( !commands.empty() ) - { - std::string enter, leave; - std::tie( enter, leave ) = generateProtection( extIt.second->first, std::string() ); - str += "\n" + enter + " //=== " + extIt.second->first + " ===\n"; - for ( auto const & command : commands ) - { - str += constructRAIIHandleMemberFunction( - command, determineInitialSkipCount( command ), m_RAIISpecialFunctions, true ); - } - str += leave; - } + commandDefinitions += + generateRAIICommandDefinitions( extIt.second->second.commands, listedCommands, extIt.second->first ); } - return str; + + return replaceWithMap( commandDefinitionsTemplate, { { "commandDefinitions", commandDefinitions } } ); } std::string VulkanHppGenerator::generateRAIIDispatchers() const @@ -676,23 +643,31 @@ ${members} std::string VulkanHppGenerator::generateRAIIHandles() const { - std::string str = "\n"; + const std::string raiiHandlesTemplate = R"( + //==================== + //=== RAII HANDLES === + //==================== + +${raiiHandles} +)"; + + std::string raiiHandles = "\n"; std::set listedHandles; auto handleIt = m_handles.begin(); assert( handleIt->first.empty() ); - appendRAIIHandleContext( str, *handleIt, m_RAIISpecialFunctions ); + appendRAIIHandleContext( raiiHandles, *handleIt, m_RAIISpecialFunctions ); for ( ++handleIt; handleIt != m_handles.end(); ++handleIt ) { - appendRAIIHandle( str, *handleIt, listedHandles, m_RAIISpecialFunctions ); + appendRAIIHandle( raiiHandles, *handleIt, listedHandles, m_RAIISpecialFunctions ); } - return str; + return replaceWithMap( raiiHandlesTemplate, { { "raiiHandles", raiiHandles } } ); } // Intended only for `enum class Result`! std::string VulkanHppGenerator::generateResultExceptions() const { - std::string templateString = R"( + const std::string templateString = R"( ${enter} class ${className} : public SystemError { public: @@ -723,84 +698,51 @@ ${leave})"; return str; } -std::string VulkanHppGenerator::generateStructs() +std::string VulkanHppGenerator::generateStructExtendsStructs() const { - // Note reordering structs or handles by features and extensions is not possible! - std::string str; - for ( auto const & structure : m_structures ) + const std::string structExtendsTemplate = R"( + //======================= + //=== STRUCTS EXTENDS === + //======================= + +${structExtends} +)"; + + std::string structExtends; + std::set listedStructs; + for ( auto const & feature : m_features ) { - if ( m_listedTypes.find( structure.first ) == m_listedTypes.end() ) - { - appendStruct( str, structure ); - } + structExtends += generateStructExtendsStructs( feature.second.types, listedStructs, feature.first ); } - return str; + for ( auto const & extIt : m_extensionsByNumber ) + { + structExtends += generateStructExtendsStructs( extIt.second->second.types, listedStructs, extIt.second->first ); + } + + return replaceWithMap( structExtendsTemplate, { { "structExtends", structExtends } } ); } -std::string VulkanHppGenerator::generateStructureChainValidation() +std::string VulkanHppGenerator::generateStructs() const { - // append all template functions for the structure pointer chain validation - std::string str; + const std::string structsTemplate = R"( + //=============== + //=== STRUCTS === + //=============== + +${structs} +)"; + + // Note reordering structs or handles by features and extensions is not possible! + std::set listedStructs; + std::string structs; for ( auto const & structure : m_structures ) { - if ( !structure.second.structExtends.empty() ) + if ( listedStructs.find( structure.first ) == listedStructs.end() ) { - std::string enter, leave; - std::tie( enter, leave ) = generateProtection( structure.first, !structure.second.aliases.empty() ); - - str += enter; - // append out allowed structure chains - for ( auto extendName : structure.second.structExtends ) - { - std::map::const_iterator itExtend = m_structures.find( extendName ); - if ( itExtend == m_structures.end() ) - { - // look if the extendName acutally is an alias of some other structure - itExtend = std::find_if( m_structures.begin(), - m_structures.end(), - [extendName]( auto const & sd ) - { return sd.second.aliases.find( extendName ) != sd.second.aliases.end(); } ); - } - if ( itExtend == m_structures.end() ) - { - std::string errorString; - errorString = "<" + extendName + "> does not specify a struct in structextends field."; - - // check if symbol name is an alias to a struct - auto itAlias = - std::find_if( m_structures.begin(), - m_structures.end(), - [&extendName]( std::pair const & it ) -> bool { - return std::find( it.second.aliases.begin(), it.second.aliases.end(), extendName ) != - it.second.aliases.end(); - } ); - if ( itAlias != m_structures.end() ) - { - errorString += " The symbol is an alias and maps to <" + itAlias->first + ">."; - } - check( false, structure.second.xmlLine, errorString ); - } - - std::string subEnter, subLeave; - std::tie( subEnter, subLeave ) = generateProtection( itExtend->first, !itExtend->second.aliases.empty() ); - - if ( enter != subEnter ) - { - str += subEnter; - } - - str += " template <> struct StructExtends<" + stripPrefix( structure.first, "Vk" ) + ", " + - stripPrefix( extendName, "Vk" ) + ">{ enum { value = true }; };\n"; - - if ( leave != subLeave ) - { - str += subLeave; - } - } - str += leave; + appendStruct( structs, structure, listedStructs ); } } - return str; + return replaceWithMap( structsTemplate, { { "structs", structs } } ); } std::string VulkanHppGenerator::generateThrowResultException() const @@ -872,6 +814,134 @@ void VulkanHppGenerator::prepareRAIIHandles() // VulkanHppGenerator private interface // +void VulkanHppGenerator::addCommand( std::string const & name, CommandData & commandData ) +{ + // find the handle this command is going to be associated to + check( !commandData.params.empty(), commandData.xmlLine, "command <" + name + "> with no params" ); + std::map::iterator handleIt = m_handles.find( commandData.params[0].type.type ); + if ( handleIt == m_handles.end() ) + { + handleIt = m_handles.find( "" ); + } + check( handleIt != m_handles.end(), commandData.xmlLine, "could not find a handle to hold command <" + name + ">" ); + commandData.handle = handleIt->first; + + // add this command to the list of commands + check( m_commands.insert( std::make_pair( name, commandData ) ).second, + commandData.xmlLine, + "already encountered command <" + name + ">" ); + + // put the command into the handle's list of commands + check( handleIt->second.commands.insert( name ).second, + commandData.xmlLine, + "command list of handle <" + handleIt->first + "> already holds a commnand <" + name + ">" ); +} + +void VulkanHppGenerator::addMissingFlagBits( std::vector & types, std::string const & referencedIn ) +{ + std::vector newTypes; + for ( auto & type : types ) + { + auto bitmaskIt = m_bitmasks.find( type ); + if ( ( bitmaskIt != m_bitmasks.end() ) && bitmaskIt->second.requirements.empty() ) + { + size_t pos = bitmaskIt->first.find( "Flags" ); + assert( pos != std::string::npos ); + std::string flagBits = bitmaskIt->first.substr( 0, pos + 4 ) + "Bit" + bitmaskIt->first.substr( pos + 4 ); + bitmaskIt->second.requirements = flagBits; + + // some flagsBits are specified but never listed as required for any flags! + // so, even if this bitmask has not enum listed as required, it might still already exist in the enums list + if ( m_enums.find( flagBits ) == m_enums.end() ) + { + EnumData flagBitsData( 0 ); + flagBitsData.isBitmask = true; + m_enums.insert( std::make_pair( flagBits, flagBitsData ) ); + + assert( m_types.find( flagBits ) == m_types.end() ); + TypeData typeData( TypeCategory::Bitmask ); + typeData.referencedIn = referencedIn; + m_types.insert( std::make_pair( flagBits, typeData ) ); + } + else + { + assert( m_types.find( flagBits ) != m_types.end() ); + } + + assert( std::find_if( types.begin(), + types.end(), + [&flagBits]( std::string const & type ) { return ( type == flagBits ); } ) == types.end() ); + newTypes.push_back( flagBits ); + } + } + types.insert( types.end(), newTypes.begin(), newTypes.end() ); +} + +std::string VulkanHppGenerator::addTitleAndProtection( std::string const & str, std::string const & title ) const +{ + if ( !str.empty() ) + { + std::string enter, leave; + std::tie( enter, leave ) = std::tie( enter, leave ) = generateProtection( title, std::string() ); + return "\n" + enter + " //=== " + title + " ===\n" + str + leave; + } + return str; +} + +void VulkanHppGenerator::appendDispatchLoaderDynamicCommands( std::vector const & commands, + std::set & listedCommands, + std::string const & title, + std::string & commandMembers, + std::string & initialCommandAssignments, + std::string & instanceCommandAssignments, + std::string & deviceCommandAssignments ) const +{ + std::string members, initial, instance, device; + for ( auto const & command : commands ) + { + if ( listedCommands.find( command ) == listedCommands.end() ) + { + listedCommands.insert( command ); + + auto commandIt = m_commands.find( command ); + assert( commandIt != m_commands.end() ); + + members += " PFN_" + commandIt->first + " " + commandIt->first + " = 0;\n"; + if ( commandIt->second.handle.empty() ) + { + initial += generateDispatchLoaderDynamicCommandAssignment( commandIt->first, commandIt->second, "NULL" ); + } + else + { + instance += generateDispatchLoaderDynamicCommandAssignment( commandIt->first, commandIt->second, "instance" ); + if ( isDeviceCommand( commandIt->second ) ) + { + device += generateDispatchLoaderDynamicCommandAssignment( commandIt->first, commandIt->second, "device" ); + } + } + } + } + std::string enter, leave; + std::tie( enter, leave ) = generateProtection( title, std::string() ); + std::string header = "\n" + enter + " //=== " + title + " ===\n"; + if ( !members.empty() ) + { + commandMembers += header + members + leave; + } + if ( !initial.empty() ) + { + initialCommandAssignments += header + initial + leave; + } + if ( !instance.empty() ) + { + instanceCommandAssignments += header + instance + leave; + } + if ( !device.empty() ) + { + deviceCommandAssignments += header + device + leave; + } +} + // // VulkanHppGenerator local functions // @@ -1472,582 +1542,6 @@ void writeToFile( std::string const & str, std::string const & fileName ) #endif } -void VulkanHppGenerator::addCommand( std::string const & name, CommandData & commandData ) -{ - // find the handle this command is going to be associated to - check( !commandData.params.empty(), commandData.xmlLine, "command <" + name + "> with no params" ); - std::map::iterator handleIt = m_handles.find( commandData.params[0].type.type ); - if ( handleIt == m_handles.end() ) - { - handleIt = m_handles.find( "" ); - } - check( handleIt != m_handles.end(), commandData.xmlLine, "could not find a handle to hold command <" + name + ">" ); - commandData.handle = handleIt->first; - - // add this command to the list of commands - check( m_commands.insert( std::make_pair( name, commandData ) ).second, - commandData.xmlLine, - "already encountered command <" + name + ">" ); - - // put the command into the handle's list of commands - check( handleIt->second.commands.insert( name ).second, - commandData.xmlLine, - "command list of handle <" + handleIt->first + "> already holds a commnand <" + name + ">" ); -} - -void VulkanHppGenerator::addMissingFlagBits( std::vector & types, std::string const & referencedIn ) -{ - std::vector newTypes; - for ( auto & type : types ) - { - auto bitmaskIt = m_bitmasks.find( type ); - if ( ( bitmaskIt != m_bitmasks.end() ) && bitmaskIt->second.requirements.empty() ) - { - size_t pos = bitmaskIt->first.find( "Flags" ); - assert( pos != std::string::npos ); - std::string flagBits = bitmaskIt->first.substr( 0, pos + 4 ) + "Bit" + bitmaskIt->first.substr( pos + 4 ); - bitmaskIt->second.requirements = flagBits; - - // some flagsBits are specified but never listed as required for any flags! - // so, even if this bitmask has not enum listed as required, it might still already exist in the enums list - if ( m_enums.find( flagBits ) == m_enums.end() ) - { - EnumData flagBitsData( 0 ); - flagBitsData.isBitmask = true; - m_enums.insert( std::make_pair( flagBits, flagBitsData ) ); - - assert( m_types.find( flagBits ) == m_types.end() ); - TypeData typeData( TypeCategory::Bitmask ); - typeData.referencedIn = referencedIn; - m_types.insert( std::make_pair( flagBits, typeData ) ); - } - else - { - assert( m_types.find( flagBits ) != m_types.end() ); - } - - assert( std::find_if( types.begin(), - types.end(), - [&flagBits]( std::string const & type ) { return ( type == flagBits ); } ) == types.end() ); - newTypes.push_back( flagBits ); - } - } - types.insert( types.end(), newTypes.begin(), newTypes.end() ); -} - -void VulkanHppGenerator::appendDispatchLoaderDynamicCommands( std::vector const & commands, - std::set & listedCommands, - std::string const & title, - std::string & commandMembers, - std::string & initialCommandAssignments, - std::string & instanceCommandAssignments, - std::string & deviceCommandAssignments ) const -{ - std::string members, initial, instance, device; - for ( auto const & command : commands ) - { - if ( listedCommands.find( command ) == listedCommands.end() ) - { - listedCommands.insert( command ); - - auto commandIt = m_commands.find( command ); - assert( commandIt != m_commands.end() ); - - members += " PFN_" + commandIt->first + " " + commandIt->first + " = 0;\n"; - if ( commandIt->second.handle.empty() ) - { - initial += generateDispatchLoaderDynamicCommandAssignment( commandIt->first, commandIt->second, "NULL" ); - } - else - { - instance += generateDispatchLoaderDynamicCommandAssignment( commandIt->first, commandIt->second, "instance" ); - if ( isDeviceCommand( commandIt->second ) ) - { - device += generateDispatchLoaderDynamicCommandAssignment( commandIt->first, commandIt->second, "device" ); - } - } - } - } - std::string enter, leave; - std::tie( enter, leave ) = generateProtection( title, std::string() ); - std::string header = "\n" + enter + " //=== " + title + " ===\n"; - if ( !members.empty() ) - { - commandMembers += header + members + leave; - } - if ( !initial.empty() ) - { - initialCommandAssignments += header + initial + leave; - } - if ( !instance.empty() ) - { - instanceCommandAssignments += header + instance + leave; - } - if ( !device.empty() ) - { - deviceCommandAssignments += header + device + leave; - } -} - -void VulkanHppGenerator::appendDestroyCommand( std::string & str, - std::string const & name, - CommandData const & commandData -#if !defined( NDEBUG ) - , - std::string const & handleName -#endif -) const -{ - // special handling for destroy functions, filter out alias functions - std::string commandName = generateCommandName( name, commandData.params, 1, m_tags ); - if ( commandData.alias.empty() && - ( ( ( name.substr( 2, 7 ) == "Destroy" ) && ( commandName != "destroy" ) ) || - ( name.substr( 2, 4 ) == "Free" ) || ( name == "vkReleasePerformanceConfigurationINTEL" ) ) ) - { - assert( ( 1 < commandData.params.size() ) && ( commandData.params[0].type.type == handleName ) ); - // make sure, the object to destroy/free/release is not optional in the shortened version! - CommandData localCommandData = commandData; - localCommandData.params[1].optional = false; - - std::string destroyCommandString = generateCommand( name, localCommandData, 1, false ); - std::string shortenedName; - if ( name.substr( 2, 7 ) == "Destroy" ) - { - shortenedName = "destroy"; - } - else if ( name.substr( 2, 4 ) == "Free" ) - { - shortenedName = "free"; - } - else - { - assert( name == "vkReleasePerformanceConfigurationINTEL" ); - shortenedName = "release"; - } - size_t pos = destroyCommandString.find( commandName ); - while ( pos != std::string::npos ) - { - destroyCommandString.replace( pos, commandName.length(), shortenedName ); - pos = destroyCommandString.find( commandName, pos ); - } - // we need to remove the default argument for the first argument, to prevent ambiguities! - assert( 1 < localCommandData.params.size() ); - pos = destroyCommandString.find( localCommandData.params[1].name ); // skip the standard version of the function - assert( pos != std::string::npos ); - pos = destroyCommandString.find( localCommandData.params[1].name, - pos + 1 ); // get the argument to destroy in the advanced version - assert( pos != std::string::npos ); - pos = destroyCommandString.find( " VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT", pos ); - if ( pos != std::string::npos ) - { - destroyCommandString.erase( pos, strlen( " VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT" ) ); - } - str += "\n" + destroyCommandString; - } -} - -void VulkanHppGenerator::appendEnum( std::string & str, std::pair const & enumData ) const -{ - str += " enum class " + stripPrefix( enumData.first, "Vk" ); - if ( enumData.second.isBitmask ) - { - auto bitmaskIt = - std::find_if( m_bitmasks.begin(), - m_bitmasks.end(), - [&enumData]( auto const & bitmask ) { return bitmask.second.requirements == enumData.first; } ); - assert( bitmaskIt != m_bitmasks.end() ); - str += " : " + bitmaskIt->first; - } - - std::string enumList, previousEnter, previousLeave; - std::map valueToNameMap; - for ( auto const & value : enumData.second.values ) - { - std::string enter, leave; - std::tie( enter, leave ) = generateProtection( value.extension, value.protect ); - if ( previousEnter != enter ) - { - enumList += previousLeave + enter; - } - std::string valueName = generateEnumValueName( enumData.first, value.name, enumData.second.isBitmask, m_tags ); - enumList += " " + valueName + " = " + value.name + ",\n"; - assert( valueToNameMap.find( valueName ) == valueToNameMap.end() ); - valueToNameMap[valueName] = value.name; - - previousEnter = enter; - previousLeave = leave; - } - enumList += previousLeave; - - for ( auto const & alias : enumData.second.aliases ) - { - std::string aliasName = - generateEnumValueName( enumData.second.alias.empty() ? enumData.first : enumData.second.alias, - alias.first, - enumData.second.isBitmask, - m_tags ); - // make sure to only list alias values that differ from all previous values - auto valueToNameIt = valueToNameMap.find( aliasName ); - if ( valueToNameIt == valueToNameMap.end() ) - { -#if !defined( NDEBUG ) - auto enumIt = std::find_if( enumData.second.values.begin(), - enumData.second.values.end(), - [&alias]( EnumValueData const & evd ) { return alias.second.name == evd.name; } ); - if ( enumIt == enumData.second.values.end() ) - { - auto aliasIt = enumData.second.aliases.find( alias.second.name ); - assert( aliasIt != enumData.second.aliases.end() ); - auto nextAliasIt = enumData.second.aliases.find( aliasIt->second.name ); - while ( nextAliasIt != enumData.second.aliases.end() ) - { - aliasIt = nextAliasIt; - nextAliasIt = enumData.second.aliases.find( aliasIt->second.name ); - } - enumIt = std::find_if( enumData.second.values.begin(), - enumData.second.values.end(), - [&aliasIt]( EnumValueData const & evd ) { return aliasIt->second.name == evd.name; } ); - } - assert( enumIt != enumData.second.values.end() ); - assert( enumIt->extension.empty() || generateProtection( enumIt->extension, enumIt->protect ).first.empty() ); -#endif - enumList += " " + aliasName + " = " + alias.first + ",\n"; - - // map the aliasName to the name of the base - std::string baseName = findBaseName( alias.second.name, enumData.second.aliases ); - assert( std::find_if( enumData.second.values.begin(), - enumData.second.values.end(), - [&baseName]( EnumValueData const & evd ) - { return evd.name == baseName; } ) != enumData.second.values.end() ); - valueToNameMap[aliasName] = baseName; - } -#if !defined( NDEBUG ) - else - { - // verify, that the identical value represents the identical name - std::string baseName = findBaseName( alias.second.name, enumData.second.aliases ); - assert( std::find_if( enumData.second.values.begin(), - enumData.second.values.end(), - [&baseName]( EnumValueData const & evd ) - { return evd.name == baseName; } ) != enumData.second.values.end() ); - assert( baseName == valueToNameIt->second ); - } -#endif - } - if ( enumList.empty() ) - { - str += "\n {};\n"; - } - else - { - size_t pos = enumList.rfind( ',' ); - assert( pos != std::string::npos ); - enumList.erase( pos, 1 ); - str += "\n {\n" + enumList + " };\n"; - } - - if ( !enumData.second.alias.empty() ) - { - str += - " using " + stripPrefix( enumData.second.alias, "Vk" ) + " = " + stripPrefix( enumData.first, "Vk" ) + ";\n"; - } -} - -void VulkanHppGenerator::appendEnumInitializer( std::string & str, - TypeInfo const & type, - std::vector const & arraySizes, - std::vector const & values, - bool bitmask ) const -{ - // enum arguments might need special initialization - assert( type.prefix.empty() && !values.empty() ); - std::string valueName = generateEnumValueName( type.type, values.front().name, bitmask, m_tags ); - std::string value = "VULKAN_HPP_NAMESPACE::" + stripPrefix( type.type, "Vk" ) + "::" + valueName; - if ( arraySizes.empty() ) - { - str += value; - } - else - { - assert( arraySizes.size() == 1 ); - auto constIt = m_constants.find( arraySizes[0] ); - int count = std::stoi( ( constIt == m_constants.end() ) ? arraySizes[0] : constIt->second ); - assert( 1 < count ); - str += "{ { " + value; - for ( int i = 1; i < count; i++ ) - { - str += ", " + value; - } - str += " } }"; - } -} - -void VulkanHppGenerator::appendEnumToString( std::string & str, - std::pair const & enumData ) const -{ - std::string enumName = stripPrefix( enumData.first, "Vk" ); - - str += - "\n" - " VULKAN_HPP_INLINE std::string to_string( " + - enumName + ( enumData.second.values.empty() ? "" : " value" ) + - " )\n" - " {"; - - if ( enumData.second.values.empty() ) - { - str += - "\n" - " return \"(void)\";\n"; - } - else - { - str += - "\n" - " switch ( value )\n" - " {\n"; - std::string previousEnter, previousLeave; - for ( auto const & value : enumData.second.values ) - { - std::string enter, leave; - std::tie( enter, leave ) = generateProtection( value.extension, value.protect ); - if ( previousEnter != enter ) - { - str += previousLeave + enter; - } - std::string valueName = generateEnumValueName( enumData.first, value.name, enumData.second.isBitmask, m_tags ); - str += " case " + enumName + "::" + valueName + " : return \"" + valueName.substr( 1 ) + "\";\n"; - previousEnter = enter; - previousLeave = leave; - } - str += - previousLeave + - " default: return \"invalid ( \" + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + \" )\";\n" - " }\n"; - } - - str += " }\n"; -} - -std::string VulkanHppGenerator::appendFunctionBodyEnhancedLocalReturnVariable( std::string & str, - std::string const & indentation, - CommandData const & commandData, - size_t returnParamIndex, - std::string const & enhancedReturnType, - bool withAllocator ) const -{ - std::string pureReturnType = stripPrefix( commandData.params[returnParamIndex].type.type, "Vk" ); - std::string returnName = startLowerCase( stripPrefix( commandData.params[returnParamIndex].name, "p" ) ); - - // there is a returned parameter -> we need a local variable to hold that value - assert( stripPrefix( commandData.returnType, "Vk" ) != enhancedReturnType ); - // the returned parameter is somehow enhanced by us - str += indentation + " "; - // in non-singular case, use the enhanced type for the return variable (like vector<...>) - str += enhancedReturnType + " " + returnName; - - if ( withAllocator ) - { - str += "( vectorAllocator )"; - } - str += ";\n"; - - return returnName; -} - -void VulkanHppGenerator::appendFunctionBodyEnhancedMultiVectorSizeCheck( - std::string & str, - std::string const & indentation, - std::string const & name, - CommandData const & commandData, - size_t initialSkipCount, - size_t returnParamIndex, - std::map const & vectorParamIndices ) const -{ - std::string const sizeCheckTemplate = - R"#(#ifdef VULKAN_HPP_NO_EXCEPTIONS -${i} VULKAN_HPP_ASSERT( ${firstVectorName}.size() == ${secondVectorName}.size() ); -#else -${i} if ( ${firstVectorName}.size() != ${secondVectorName}.size() ) -${i} { -${i} throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}: ${firstVectorName}.size() != ${secondVectorName}.size()" ); -${i} } -#endif /*VULKAN_HPP_NO_EXCEPTIONS*/ -)#"; - - // add some error checks if multiple vectors need to have the same size - std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags ); - for ( std::map::const_iterator it0 = vectorParamIndices.begin(); it0 != vectorParamIndices.end(); - ++it0 ) - { - if ( it0->first != returnParamIndex ) - { - for ( std::map::const_iterator it1 = std::next( it0 ); it1 != vectorParamIndices.end(); ++it1 ) - { - if ( ( it1->first != returnParamIndex ) && ( it0->second == it1->second ) ) - { - str += replaceWithMap( - sizeCheckTemplate, - std::map( - { { "firstVectorName", startLowerCase( stripPrefix( commandData.params[it0->first].name, "p" ) ) }, - { "secondVectorName", startLowerCase( stripPrefix( commandData.params[it1->first].name, "p" ) ) }, - { "className", commandData.params[initialSkipCount - 1].type.type }, - { "commandName", commandName }, - { "i", indentation } } ) ); - } - } - } - } -} - -void VulkanHppGenerator::appendFunctionBodyEnhancedReturnResultValue( std::string & str, - std::string const & indentation, - std::string const & returnName, - std::string const & name, - CommandData const & commandData, - size_t initialSkipCount, - size_t returnParamIndex, - bool twoStep ) const -{ - std::string type = ( returnParamIndex != INVALID_INDEX ) ? commandData.params[returnParamIndex].type.type : ""; - std::string returnVectorName = ( returnParamIndex != INVALID_INDEX ) - ? stripPostfix( stripPrefix( commandData.params[returnParamIndex].name, "p" ), "s" ) - : ""; - std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags ); - - assert( commandData.returnType != "void" ); - - str += indentation + " return createResultValue( result, "; - - // if the return type is "Result" or there is at least one success code, create the Result/Value construct to return - if ( returnParamIndex != INVALID_INDEX ) - { - // if there's a return parameter, list it in the Result/Value constructor - str += returnName + ", "; - } - - // now the function name (with full namespace) as a string - str += "VULKAN_HPP_NAMESPACE_STRING\"::" + - ( commandData.handle.empty() ? "" : stripPrefix( commandData.handle, "Vk" ) + "::" ) + commandName + "\""; - - if ( !twoStep && ( 1 < commandData.successCodes.size() ) ) - { - // and for the single-step algorithms with more than one success code list them all - str += ", { " + generateSuccessCode( commandData.successCodes[0], m_tags ); - for ( size_t i = 1; i < commandData.successCodes.size(); i++ ) - { - str += ", " + generateSuccessCode( commandData.successCodes[i], m_tags ); - } - str += " }"; - } - - str += " );\n"; -} - -void VulkanHppGenerator::appendFunctionBodyEnhancedTwoStep( std::string & str, - std::string const & indentation, - std::string const & name, - CommandData const & commandData, - size_t returnParamIndex, - size_t templateParamIndex, - std::map const & vectorParamIndices, - std::string const & returnName ) const -{ - assert( ( commandData.returnType == "VkResult" ) || ( commandData.returnType == "void" ) ); - assert( returnParamIndex != INVALID_INDEX ); - - // local count variable to hold the size of the vector to fill - std::map::const_iterator returnit = vectorParamIndices.find( returnParamIndex ); - assert( returnit != vectorParamIndices.end() && ( returnit->second != INVALID_INDEX ) ); - - // take the pure type of the size parameter; strip the leading 'p' from its name for its local name - std::string sizeName = startLowerCase( stripPrefix( commandData.params[returnit->second].name, "p" ) ); - str += - indentation + " " + stripPrefix( commandData.params[returnit->second].type.type, "Vk" ) + " " + sizeName + ";\n"; - - std::string const multiSuccessTemplate = - R"(${i} Result result; -${i} do -${i} { -${i} result = static_cast( ${call1} ); -${i} if ( ( result == Result::eSuccess ) && ${sizeName} ) -${i} { -${i} ${returnName}.resize( ${sizeName} ); -${i} result = static_cast( ${call2} ); -${i} } -${i} } while ( result == Result::eIncomplete ); -${i} if ( result == Result::eSuccess ) -${i} { -${i} VULKAN_HPP_ASSERT( ${sizeName} <= ${returnName}.size() ); -${i} ${returnName}.resize( ${sizeName} ); -${i} } -)"; - std::string const singleSuccessTemplate = - R"(${i} Result result = static_cast( ${call1} ); -${i} if ( ( result == Result::eSuccess ) && ${sizeName} ) -${i} { -${i} ${returnName}.resize( ${sizeName} ); -${i} result = static_cast( ${call2} ); -${i} } -)"; - std::string const voidMultiCallTemplate = - R"(${i} ${call1}; -${i} ${returnName}.resize( ${sizeName} ); -${i} ${call2}; -)"; - std::string const & selectedTemplate = - ( commandData.returnType == "VkResult" ) - ? ( ( 1 < commandData.successCodes.size() ) ? multiSuccessTemplate : singleSuccessTemplate ) - : voidMultiCallTemplate; - - std::string call1 = - generateFunctionCall( name, commandData, returnParamIndex, templateParamIndex, vectorParamIndices, true, true ); - std::string call2 = - generateFunctionCall( name, commandData, returnParamIndex, templateParamIndex, vectorParamIndices, true, false ); - - str += replaceWithMap( selectedTemplate, - { { "sizeName", sizeName }, - { "returnName", returnName }, - { "call1", call1 }, - { "call2", call2 }, - { "i", indentation } } ); -} - -bool VulkanHppGenerator::appendFunctionHeaderArgumentEnhanced( std::string & str, - ParamData const & param, - size_t paramIndex, - std::map const & vectorParamIndices, - bool skip, - bool argEncountered, - bool isTemplateParam ) const -{ - if ( !skip ) - { - if ( argEncountered ) - { - str += ", "; - } - std::string strippedParameterName = startLowerCase( stripPrefix( param.name, "p" ) ); - - std::map::const_iterator it = vectorParamIndices.find( paramIndex ); - if ( it == vectorParamIndices.end() ) - { - // the argument ist not a vector - assert( param.type.postfix.empty() ); - // and its not a pointer -> just use its type and name here - str += param.type.compose() + " " + param.name + generateCArraySizes( param.arraySizes ); - } - else - { - // the argument is a vector - appendFunctionHeaderArgumentEnhancedVector( - str, param, strippedParameterName, it->second != INVALID_INDEX, isTemplateParam ); - } - argEncountered = true; - } - return argEncountered; -} - void VulkanHppGenerator::appendFunctionHeaderArgumentEnhancedVector( std::string & str, ParamData const & param, std::string const & strippedParameterName, @@ -2285,24 +1779,27 @@ ${memberFunctionDeclarations} { { "memberFunctionDeclarations", constructRAIIHandleMemberFunctionDeclarations( handle, specialFunctions ) } } ); } -void VulkanHppGenerator::appendStruct( std::string & str, std::pair const & structure ) +void VulkanHppGenerator::appendStruct( std::string & str, + std::pair const & structure, + std::set & listedStructs ) const { - assert( m_listedTypes.find( structure.first ) == m_listedTypes.end() ); + assert( listedStructs.find( structure.first ) == listedStructs.end() ); for ( auto const & member : structure.second.members ) { - if ( structure.first != member.type.type ) // some structures hold a pointer to the very same structure type + if ( !isHandleType( member.type.type ) && + ( structure.first != member.type.type ) ) // some structures hold a pointer to the very same structure type { - appendType( str, member.type.type ); + appendType( str, member.type.type, listedStructs ); } } if ( !structure.second.subStruct.empty() ) { auto structureIt = m_structures.find( structure.second.subStruct ); - if ( ( structureIt != m_structures.end() ) && ( m_listedTypes.find( structureIt->first ) == m_listedTypes.end() ) ) + if ( ( structureIt != m_structures.end() ) && ( listedStructs.find( structureIt->first ) == listedStructs.end() ) ) { - appendStruct( str, *structureIt ); + appendStruct( str, *structureIt, listedStructs ); } } @@ -2315,7 +1812,7 @@ void VulkanHppGenerator::appendStruct( std::string & str, std::pairsecond.values, enumIt->second.isBitmask ); + str += generateEnumInitializer( + memberData.type, memberData.arraySizes, enumIt->second.values, enumIt->second.isBitmask ); } else { @@ -8916,7 +8417,8 @@ std::string VulkanHppGenerator::appendStructMembers( std::string & auto enumIt = m_enums.find( member.type.type ); if ( member.arraySizes.empty() && ( enumIt != m_enums.end() ) && member.type.postfix.empty() ) { - appendEnumInitializer( str, member.type, member.arraySizes, enumIt->second.values, enumIt->second.isBitmask ); + str += + generateEnumInitializer( member.type, member.arraySizes, enumIt->second.values, enumIt->second.isBitmask ); } else { @@ -9177,9 +8679,11 @@ ${members} str += leave; } -void VulkanHppGenerator::appendType( std::string & str, std::string const & typeName ) +void VulkanHppGenerator::appendType( std::string & str, + std::string const & typeName, + std::set & listedTypes ) const { - if ( m_listedTypes.find( typeName ) == m_listedTypes.end() ) + if ( listedTypes.find( typeName ) == listedTypes.end() ) { auto typeIt = m_types.find( typeName ); assert( typeIt != m_types.end() ); @@ -9195,14 +8699,14 @@ void VulkanHppGenerator::appendType( std::string & str, std::string const & type [&typeName]( std::pair const & hd ) { return hd.second.alias == typeName; } ); assert( handleIt != m_handles.end() ); - if ( m_listedTypes.find( handleIt->first ) == m_listedTypes.end() ) + if ( listedTypes.find( handleIt->first ) == listedTypes.end() ) { - str += generateHandle( *handleIt ); + str += generateHandle( *handleIt, listedTypes ); } } else { - str += generateHandle( *handleIt ); + str += generateHandle( *handleIt, listedTypes ); } } break; @@ -9217,18 +8721,18 @@ void VulkanHppGenerator::appendType( std::string & str, std::string const & type [&typeName]( std::pair const & sd ) { return sd.second.aliases.find( typeName ) != sd.second.aliases.end(); } ); assert( structIt != m_structures.end() ); - if ( m_listedTypes.find( structIt->first ) == m_listedTypes.end() ) + if ( listedTypes.find( structIt->first ) == listedTypes.end() ) { - appendStruct( str, *structIt ); + appendStruct( str, *structIt, listedTypes ); } } else { - appendStruct( str, *structIt ); + appendStruct( str, *structIt, listedTypes ); } } break; - default: m_listedTypes.insert( typeIt->first ); break; + default: listedTypes.insert( typeIt->first ); break; } } } @@ -10292,13 +9796,7 @@ std::string VulkanHppGenerator::generateBitmasks( std::vector const str += generateBitmask( bitmaskIt ); } } - if ( !str.empty() ) - { - std::string enter, leave; - std::tie( enter, leave ) = std::tie( enter, leave ) = generateProtection( title, std::string() ); - str = "\n" + enter + " //=== " + title + " ===\n" + str + leave; - } - return str; + return addTitleAndProtection( str, title ); } std::string VulkanHppGenerator::generateCommand( std::string const & name, @@ -10347,13 +9845,7 @@ std::string VulkanHppGenerator::generateCommandDefinitions( std::vectorsecond.handle ); } } - if ( !str.empty() ) - { - std::string enter, leave; - std::tie( enter, leave ) = generateProtection( title, std::string() ); - str = "\n" + enter + " //=== " + title + " ===\n" + str + leave; - } - return str; + return addTitleAndProtection( str, title ); } std::string VulkanHppGenerator::generateCommandDefinitions( std::string const & command, @@ -11370,6 +10862,58 @@ std::string VulkanHppGenerator::generateCommandVoid2Return( std::string const & return ""; } +std::string VulkanHppGenerator::generateDestroyCommand( std::string const & name, + CommandData const & commandData ) const +{ + // special handling for destroy functions, filter out alias functions + std::string commandName = generateCommandName( name, commandData.params, 1, m_tags ); + if ( commandData.alias.empty() && + ( ( ( name.substr( 2, 7 ) == "Destroy" ) && ( commandName != "destroy" ) ) || + ( name.substr( 2, 4 ) == "Free" ) || ( name == "vkReleasePerformanceConfigurationINTEL" ) ) ) + { + assert( 1 < commandData.params.size() ); + // make sure, the object to destroy/free/release is not optional in the shortened version! + CommandData localCommandData = commandData; + localCommandData.params[1].optional = false; + + std::string destroyCommandString = generateCommand( name, localCommandData, 1, false ); + std::string shortenedName; + if ( name.substr( 2, 7 ) == "Destroy" ) + { + shortenedName = "destroy"; + } + else if ( name.substr( 2, 4 ) == "Free" ) + { + shortenedName = "free"; + } + else + { + assert( name == "vkReleasePerformanceConfigurationINTEL" ); + shortenedName = "release"; + } + size_t pos = destroyCommandString.find( commandName ); + while ( pos != std::string::npos ) + { + destroyCommandString.replace( pos, commandName.length(), shortenedName ); + pos = destroyCommandString.find( commandName, pos ); + } + // we need to remove the default argument for the first argument, to prevent ambiguities! + assert( 1 < localCommandData.params.size() ); + pos = destroyCommandString.find( localCommandData.params[1].name ); // skip the standard version of the function + assert( pos != std::string::npos ); + pos = destroyCommandString.find( localCommandData.params[1].name, + pos + 1 ); // get the argument to destroy in the advanced version + assert( pos != std::string::npos ); + pos = destroyCommandString.find( " VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT", pos ); + if ( pos != std::string::npos ) + { + destroyCommandString.erase( pos, strlen( " VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT" ) ); + } + return "\n" + destroyCommandString; + } + return ""; +} + std::string VulkanHppGenerator::generateDispatchLoaderDynamicCommandAssignment( std::string const & commandName, CommandData const & commandData, std::string const & firstArg ) const @@ -11427,11 +10971,143 @@ std::string VulkanHppGenerator::generateDispatchLoaderStaticCommands( std::vecto { "returnType", commandIt->second.returnType } } ); } } - if ( !str.empty() ) + return addTitleAndProtection( str, title ); +} + +std::string VulkanHppGenerator::generateEnum( std::pair const & enumData ) const +{ + std::string str = " enum class " + stripPrefix( enumData.first, "Vk" ); + if ( enumData.second.isBitmask ) + { + auto bitmaskIt = + std::find_if( m_bitmasks.begin(), + m_bitmasks.end(), + [&enumData]( auto const & bitmask ) { return bitmask.second.requirements == enumData.first; } ); + assert( bitmaskIt != m_bitmasks.end() ); + str += " : " + bitmaskIt->first; + } + + std::string enumList, previousEnter, previousLeave; + std::map valueToNameMap; + for ( auto const & value : enumData.second.values ) { std::string enter, leave; - std::tie( enter, leave ) = generateProtection( title, std::string() ); - str = "\n" + enter + " //=== " + title + " ===\n" + str + leave; + std::tie( enter, leave ) = generateProtection( value.extension, value.protect ); + if ( previousEnter != enter ) + { + enumList += previousLeave + enter; + } + std::string valueName = generateEnumValueName( enumData.first, value.name, enumData.second.isBitmask, m_tags ); + enumList += " " + valueName + " = " + value.name + ",\n"; + assert( valueToNameMap.find( valueName ) == valueToNameMap.end() ); + valueToNameMap[valueName] = value.name; + + previousEnter = enter; + previousLeave = leave; + } + enumList += previousLeave; + + for ( auto const & alias : enumData.second.aliases ) + { + std::string aliasName = + generateEnumValueName( enumData.second.alias.empty() ? enumData.first : enumData.second.alias, + alias.first, + enumData.second.isBitmask, + m_tags ); + // make sure to only list alias values that differ from all previous values + auto valueToNameIt = valueToNameMap.find( aliasName ); + if ( valueToNameIt == valueToNameMap.end() ) + { +#if !defined( NDEBUG ) + auto enumIt = std::find_if( enumData.second.values.begin(), + enumData.second.values.end(), + [&alias]( EnumValueData const & evd ) { return alias.second.name == evd.name; } ); + if ( enumIt == enumData.second.values.end() ) + { + auto aliasIt = enumData.second.aliases.find( alias.second.name ); + assert( aliasIt != enumData.second.aliases.end() ); + auto nextAliasIt = enumData.second.aliases.find( aliasIt->second.name ); + while ( nextAliasIt != enumData.second.aliases.end() ) + { + aliasIt = nextAliasIt; + nextAliasIt = enumData.second.aliases.find( aliasIt->second.name ); + } + enumIt = std::find_if( enumData.second.values.begin(), + enumData.second.values.end(), + [&aliasIt]( EnumValueData const & evd ) { return aliasIt->second.name == evd.name; } ); + } + assert( enumIt != enumData.second.values.end() ); + assert( enumIt->extension.empty() || generateProtection( enumIt->extension, enumIt->protect ).first.empty() ); +#endif + enumList += " " + aliasName + " = " + alias.first + ",\n"; + + // map the aliasName to the name of the base + std::string baseName = findBaseName( alias.second.name, enumData.second.aliases ); + assert( std::find_if( enumData.second.values.begin(), + enumData.second.values.end(), + [&baseName]( EnumValueData const & evd ) + { return evd.name == baseName; } ) != enumData.second.values.end() ); + valueToNameMap[aliasName] = baseName; + } +#if !defined( NDEBUG ) + else + { + // verify, that the identical value represents the identical name + std::string baseName = findBaseName( alias.second.name, enumData.second.aliases ); + assert( std::find_if( enumData.second.values.begin(), + enumData.second.values.end(), + [&baseName]( EnumValueData const & evd ) + { return evd.name == baseName; } ) != enumData.second.values.end() ); + assert( baseName == valueToNameIt->second ); + } +#endif + } + if ( enumList.empty() ) + { + str += "\n {};\n"; + } + else + { + size_t pos = enumList.rfind( ',' ); + assert( pos != std::string::npos ); + enumList.erase( pos, 1 ); + str += "\n {\n" + enumList + " };\n"; + } + + if ( !enumData.second.alias.empty() ) + { + str += + " using " + stripPrefix( enumData.second.alias, "Vk" ) + " = " + stripPrefix( enumData.first, "Vk" ) + ";\n"; + } + return str; +} + +std::string VulkanHppGenerator::generateEnumInitializer( TypeInfo const & type, + std::vector const & arraySizes, + std::vector const & values, + bool bitmask ) const +{ + // enum arguments might need special initialization + assert( type.prefix.empty() && !values.empty() ); + std::string valueName = generateEnumValueName( type.type, values.front().name, bitmask, m_tags ); + std::string value = "VULKAN_HPP_NAMESPACE::" + stripPrefix( type.type, "Vk" ) + "::" + valueName; + std::string str; + if ( arraySizes.empty() ) + { + str += value; + } + else + { + assert( arraySizes.size() == 1 ); + auto constIt = m_constants.find( arraySizes[0] ); + int count = std::stoi( ( constIt == m_constants.end() ) ? arraySizes[0] : constIt->second ); + assert( 1 < count ); + str += "{ { " + value; + for ( int i = 1; i < count; i++ ) + { + str += ", " + value; + } + str += " } }"; } return str; } @@ -11449,16 +11125,242 @@ std::string VulkanHppGenerator::generateEnums( std::vector const & listedEnums.insert( type ); str += "\n"; - appendEnum( str, *enumIt ); - appendEnumToString( str, *enumIt ); + str += generateEnum( *enumIt ); + str += generateEnumToString( *enumIt ); } } - if ( !str.empty() ) + return addTitleAndProtection( str, title ); +} + +std::string VulkanHppGenerator::generateEnumToString( std::pair const & enumData ) const +{ + std::string enumName = stripPrefix( enumData.first, "Vk" ); + + std::string str = + "\n" + " VULKAN_HPP_INLINE std::string to_string( " + + enumName + ( enumData.second.values.empty() ? "" : " value" ) + + " )\n" + " {"; + + if ( enumData.second.values.empty() ) { - std::string enter, leave; - std::tie( enter, leave ) = generateProtection( title, std::string() ); - str = "\n" + enter + " //=== " + title + " ===\n" + str + leave; + str += + "\n" + " return \"(void)\";\n"; } + else + { + str += + "\n" + " switch ( value )\n" + " {\n"; + std::string previousEnter, previousLeave; + for ( auto const & value : enumData.second.values ) + { + std::string enter, leave; + std::tie( enter, leave ) = generateProtection( value.extension, value.protect ); + if ( previousEnter != enter ) + { + str += previousLeave + enter; + } + std::string valueName = generateEnumValueName( enumData.first, value.name, enumData.second.isBitmask, m_tags ); + str += " case " + enumName + "::" + valueName + " : return \"" + valueName.substr( 1 ) + "\";\n"; + previousEnter = enter; + previousLeave = leave; + } + str += + previousLeave + + " default: return \"invalid ( \" + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + \" )\";\n" + " }\n"; + } + + str += " }\n"; + return str; +} + +std::string VulkanHppGenerator::generateFunctionBodyEnhancedLocalReturnVariable( std::string const & indentation, + CommandData const & commandData, + size_t returnParamIndex, + std::string const & enhancedReturnType, + bool withAllocator ) const +{ + std::string pureReturnType = stripPrefix( commandData.params[returnParamIndex].type.type, "Vk" ); + std::string returnName = startLowerCase( stripPrefix( commandData.params[returnParamIndex].name, "p" ) ); + + // there is a returned parameter -> we need a local variable to hold that value + assert( stripPrefix( commandData.returnType, "Vk" ) != enhancedReturnType ); + // the returned parameter is somehow enhanced by us + std::string str = indentation + " "; + // in non-singular case, use the enhanced type for the return variable (like vector<...>) + str += enhancedReturnType + " " + returnName; + + if ( withAllocator ) + { + str += "( vectorAllocator )"; + } + str += ";\n"; + + return str; +} + +std::string VulkanHppGenerator::generateFunctionBodyEnhancedMultiVectorSizeCheck( + std::string const & indentation, + std::string const & name, + CommandData const & commandData, + size_t initialSkipCount, + size_t returnParamIndex, + std::map const & vectorParamIndices ) const +{ + std::string const sizeCheckTemplate = + R"#(#ifdef VULKAN_HPP_NO_EXCEPTIONS +${i} VULKAN_HPP_ASSERT( ${firstVectorName}.size() == ${secondVectorName}.size() ); +#else +${i} if ( ${firstVectorName}.size() != ${secondVectorName}.size() ) +${i} { +${i} throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::${className}::${commandName}: ${firstVectorName}.size() != ${secondVectorName}.size()" ); +${i} } +#endif /*VULKAN_HPP_NO_EXCEPTIONS*/ +)#"; + + // add some error checks if multiple vectors need to have the same size + std::string str; + std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags ); + for ( std::map::const_iterator it0 = vectorParamIndices.begin(); it0 != vectorParamIndices.end(); + ++it0 ) + { + if ( it0->first != returnParamIndex ) + { + for ( std::map::const_iterator it1 = std::next( it0 ); it1 != vectorParamIndices.end(); ++it1 ) + { + if ( ( it1->first != returnParamIndex ) && ( it0->second == it1->second ) ) + { + str += replaceWithMap( + sizeCheckTemplate, + std::map( + { { "firstVectorName", startLowerCase( stripPrefix( commandData.params[it0->first].name, "p" ) ) }, + { "secondVectorName", startLowerCase( stripPrefix( commandData.params[it1->first].name, "p" ) ) }, + { "className", commandData.params[initialSkipCount - 1].type.type }, + { "commandName", commandName }, + { "i", indentation } } ) ); + } + } + } + } + return str; +} + +std::string VulkanHppGenerator::generateFunctionBodyEnhancedReturnResultValue( std::string const & indentation, + std::string const & returnName, + std::string const & name, + CommandData const & commandData, + size_t initialSkipCount, + size_t returnParamIndex, + bool twoStep ) const +{ + std::string type = ( returnParamIndex != INVALID_INDEX ) ? commandData.params[returnParamIndex].type.type : ""; + std::string returnVectorName = ( returnParamIndex != INVALID_INDEX ) + ? stripPostfix( stripPrefix( commandData.params[returnParamIndex].name, "p" ), "s" ) + : ""; + std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags ); + + assert( commandData.returnType != "void" ); + + std::string str = indentation + " return createResultValue( result, "; + + // if the return type is "Result" or there is at least one success code, create the Result/Value construct to return + if ( returnParamIndex != INVALID_INDEX ) + { + // if there's a return parameter, list it in the Result/Value constructor + str += returnName + ", "; + } + + // now the function name (with full namespace) as a string + str += "VULKAN_HPP_NAMESPACE_STRING\"::" + + ( commandData.handle.empty() ? "" : stripPrefix( commandData.handle, "Vk" ) + "::" ) + commandName + "\""; + + if ( !twoStep && ( 1 < commandData.successCodes.size() ) ) + { + // and for the single-step algorithms with more than one success code list them all + str += ", { " + generateSuccessCode( commandData.successCodes[0], m_tags ); + for ( size_t i = 1; i < commandData.successCodes.size(); i++ ) + { + str += ", " + generateSuccessCode( commandData.successCodes[i], m_tags ); + } + str += " }"; + } + + str += " );\n"; + return str; +} + +std::string + VulkanHppGenerator::generateFunctionBodyEnhancedTwoStep( std::string const & indentation, + std::string const & name, + CommandData const & commandData, + size_t returnParamIndex, + size_t templateParamIndex, + std::map const & vectorParamIndices, + std::string const & returnName ) const +{ + assert( ( commandData.returnType == "VkResult" ) || ( commandData.returnType == "void" ) ); + assert( returnParamIndex != INVALID_INDEX ); + + // local count variable to hold the size of the vector to fill + std::map::const_iterator returnit = vectorParamIndices.find( returnParamIndex ); + assert( returnit != vectorParamIndices.end() && ( returnit->second != INVALID_INDEX ) ); + + // take the pure type of the size parameter; strip the leading 'p' from its name for its local name + std::string sizeName = startLowerCase( stripPrefix( commandData.params[returnit->second].name, "p" ) ); + std::string str = + indentation + " " + stripPrefix( commandData.params[returnit->second].type.type, "Vk" ) + " " + sizeName + ";\n"; + + std::string const multiSuccessTemplate = + R"(${i} Result result; +${i} do +${i} { +${i} result = static_cast( ${call1} ); +${i} if ( ( result == Result::eSuccess ) && ${sizeName} ) +${i} { +${i} ${returnName}.resize( ${sizeName} ); +${i} result = static_cast( ${call2} ); +${i} } +${i} } while ( result == Result::eIncomplete ); +${i} if ( result == Result::eSuccess ) +${i} { +${i} VULKAN_HPP_ASSERT( ${sizeName} <= ${returnName}.size() ); +${i} ${returnName}.resize( ${sizeName} ); +${i} } +)"; + std::string const singleSuccessTemplate = + R"(${i} Result result = static_cast( ${call1} ); +${i} if ( ( result == Result::eSuccess ) && ${sizeName} ) +${i} { +${i} ${returnName}.resize( ${sizeName} ); +${i} result = static_cast( ${call2} ); +${i} } +)"; + std::string const voidMultiCallTemplate = + R"(${i} ${call1}; +${i} ${returnName}.resize( ${sizeName} ); +${i} ${call2}; +)"; + std::string const & selectedTemplate = + ( commandData.returnType == "VkResult" ) + ? ( ( 1 < commandData.successCodes.size() ) ? multiSuccessTemplate : singleSuccessTemplate ) + : voidMultiCallTemplate; + + std::string call1 = + generateFunctionCall( name, commandData, returnParamIndex, templateParamIndex, vectorParamIndices, true, true ); + std::string call2 = + generateFunctionCall( name, commandData, returnParamIndex, templateParamIndex, vectorParamIndices, true, false ); + + str += replaceWithMap( selectedTemplate, + { { "sizeName", sizeName }, + { "returnName", returnName }, + { "call1", call1 }, + { "call2", call2 }, + { "i", indentation } } ); return str; } @@ -11580,9 +11482,40 @@ std::string VulkanHppGenerator::generateFunctionCall( std::string const & return str; } -std::string VulkanHppGenerator::generateHandle( std::pair const & handleData ) +std::string + VulkanHppGenerator::generateFunctionHeaderArgumentEnhanced( ParamData const & param, + size_t paramIndex, + std::map const & vectorParamIndices, + bool skip, + bool isTemplateParam ) const { - assert( m_listedTypes.find( handleData.first ) == m_listedTypes.end() ); + std::string str; + if ( !skip ) + { + std::string strippedParameterName = startLowerCase( stripPrefix( param.name, "p" ) ); + + std::map::const_iterator it = vectorParamIndices.find( paramIndex ); + if ( it == vectorParamIndices.end() ) + { + // the argument ist not a vector + assert( param.type.postfix.empty() ); + // and its not a pointer -> just use its type and name here + str += param.type.compose() + " " + param.name + generateCArraySizes( param.arraySizes ); + } + else + { + // the argument is a vector + appendFunctionHeaderArgumentEnhancedVector( + str, param, strippedParameterName, it->second != INVALID_INDEX, isTemplateParam ); + } + } + return str; +} + +std::string VulkanHppGenerator::generateHandle( std::pair const & handleData, + std::set & listedHandles ) const +{ + assert( listedHandles.find( handleData.first ) == listedHandles.end() ); std::string str; // first check for any handle that needs to be listed before this one @@ -11595,7 +11528,7 @@ std::string VulkanHppGenerator::generateHandle( std::pairfirst, commandIt->second, 1, false ); - appendDestroyCommand( commands, - commandIt->first, - commandIt->second -#if !defined( NDEBUG ) - , - handleData.first -#endif - ); + commands += generateDestroyCommand( commandIt->first, commandIt->second ); } } } @@ -11701,14 +11627,7 @@ std::string VulkanHppGenerator::generateHandle( std::pairfirst, commandIt->second.params, 1, m_tags ); commands += "\n"; commands += generateCommand( commandIt->first, commandIt->second, 1, false ); - appendDestroyCommand( commands, - commandIt->first, - commandIt->second -#if !defined( NDEBUG ) - , - handleData.first -#endif - ); + commands += generateDestroyCommand( commandIt->first, commandIt->second ); } commands += leave; } @@ -11859,10 +11778,37 @@ ${usingAlias}${leave})"; { "usingAlias", usingAlias } } ); } - m_listedTypes.insert( handleData.first ); + listedHandles.insert( handleData.first ); return str; } +std::string VulkanHppGenerator::generateHashStructures( std::vector const & types, + std::string const & title ) const +{ + const std::string hashTemplate = R"( + template <> struct hash + { + std::size_t operator()(VULKAN_HPP_NAMESPACE::${type} const & ${name}) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}(static_cast(${name})); + } + }; +)"; + + std::string str; + for ( auto const & type : types ) + { + auto handleIt = m_handles.find( type ); + if ( handleIt != m_handles.end() ) + { + std::string handleType = stripPrefix( handleIt->first, "Vk" ); + std::string handleName = startLowerCase( handleType ); + str += replaceWithMap( hashTemplate, { { "name", handleName }, { "type", handleType } } ); + } + } + return addTitleAndProtection( str, title ); +} + std::string VulkanHppGenerator::generateLenInitializer( std::vector::const_iterator mit, std::map::const_iterator, @@ -11957,6 +11903,23 @@ std::pair VulkanHppGenerator::generateProtection( std: } } +std::string VulkanHppGenerator::generateRAIICommandDefinitions( std::vector const & commands, + std::set & listedCommands, + std::string const & title ) const +{ + std::string str; + for ( auto const & command : commands ) + { + if ( listedCommands.find( command ) == listedCommands.end() ) + { + listedCommands.insert( command ); + str += constructRAIIHandleMemberFunction( + command, determineInitialSkipCount( command ), m_RAIISpecialFunctions, true ); + } + } + return addTitleAndProtection( str, title ); +} + std::string VulkanHppGenerator::generateSizeCheck( std::vector::const_iterator> const & arrayIts, std::string const & structName, @@ -12026,6 +11989,75 @@ std::string return sizeCheck; } +std::string VulkanHppGenerator::generateStructExtendsStructs( std::vector const & types, + std::set & listedStructs, + std::string const & title ) const +{ + std::string str; + for ( auto const & type : types ) + { + auto structIt = m_structures.find( type ); + if ( structIt != m_structures.end() ) + { + assert( listedStructs.find( type ) == listedStructs.end() ); + listedStructs.insert( type ); + + std::string enter, leave; + std::tie( enter, leave ) = generateProtection( title, std::string() ); + + // append all allowed structure chains + for ( auto extendName : structIt->second.structExtends ) + { + std::map::const_iterator itExtend = m_structures.find( extendName ); + if ( itExtend == m_structures.end() ) + { + // look if the extendName acutally is an alias of some other structure + itExtend = std::find_if( m_structures.begin(), + m_structures.end(), + [extendName]( auto const & sd ) + { return sd.second.aliases.find( extendName ) != sd.second.aliases.end(); } ); + } + if ( itExtend == m_structures.end() ) + { + std::string errorString; + errorString = "<" + extendName + "> does not specify a struct in structextends field."; + + // check if symbol name is an alias to a struct + auto itAlias = + std::find_if( m_structures.begin(), + m_structures.end(), + [&extendName]( std::pair const & it ) -> bool { + return std::find( it.second.aliases.begin(), it.second.aliases.end(), extendName ) != + it.second.aliases.end(); + } ); + if ( itAlias != m_structures.end() ) + { + errorString += " The symbol is an alias and maps to <" + itAlias->first + ">."; + } + check( false, structIt->second.xmlLine, errorString ); + } + + std::string subEnter, subLeave; + std::tie( subEnter, subLeave ) = generateProtection( itExtend->first, !itExtend->second.aliases.empty() ); + + if ( enter != subEnter ) + { + str += subEnter; + } + + str += " template <> struct StructExtends<" + stripPrefix( structIt->first, "Vk" ) + ", " + + stripPrefix( extendName, "Vk" ) + ">{ enum { value = true }; };\n"; + + if ( leave != subLeave ) + { + str += subLeave; + } + } + } + } + return addTitleAndProtection( str, title ); +} + std::string VulkanHppGenerator::getPlatform( std::string const & extension ) const { auto extensionIt = m_extensions.find( extension ); @@ -16800,7 +16832,7 @@ namespace VULKAN_HPP_NAMESPACE namespace VULKAN_HPP_NAMESPACE { )"; - str += generator.generateStructureChainValidation(); + str += generator.generateStructExtendsStructs(); str += dynamicLoader; str += generator.generateDispatchLoaderDynamic(); str += diff --git a/VulkanHppGenerator.hpp b/VulkanHppGenerator.hpp index 5f2bf11..9cbb910 100644 --- a/VulkanHppGenerator.hpp +++ b/VulkanHppGenerator.hpp @@ -31,15 +31,15 @@ public: std::string generateDispatchLoaderDynamic() const; // uses vkGet*ProcAddress to get function pointers std::string generateDispatchLoaderStatic() const; // uses exported symbols from loader std::string generateEnums() const; - std::string generateHandles(); + std::string generateHandles() const; std::string generateHashStructures() const; std::string generateIndexTypeTraits() const; std::string generateRAIICommandDefinitions() const; std::string generateRAIIDispatchers() const; std::string generateRAIIHandles() const; std::string generateResultExceptions() const; - std::string generateStructs(); - std::string generateStructureChainValidation(); + std::string generateStructExtendsStructs() const; + std::string generateStructs() const; std::string generateThrowResultException() const; std::string const & getTypesafeCheck() const; std::string const & getVersion() const; @@ -307,66 +307,16 @@ private: }; private: - void addCommand( std::string const & name, CommandData & commandData ); - void addMissingFlagBits( std::vector & types, std::string const & referencedIn ); - void appendDispatchLoaderDynamicCommands( std::vector const & commands, - std::set & listedCommands, - std::string const & title, - std::string & commandMembers, - std::string & initialCommandAssignments, - std::string & instanceCommandAssignments, - std::string & deviceCommandAssignments ) const; - void appendDestroyCommand( std::string & str, - std::string const & name, - CommandData const & commandData -#if !defined( NDEBUG ) - , - std::string const & handleName -#endif - ) const; - void appendEnum( std::string & str, std::pair const & enumData ) const; - void appendEnumInitializer( std::string & str, - TypeInfo const & type, - std::vector const & arraySizes, - std::vector const & values, - bool bitmask ) const; - void appendEnumToString( std::string & str, std::pair const & enumData ) const; - std::string appendFunctionBodyEnhancedLocalReturnVariable( std::string & str, - std::string const & indentation, - CommandData const & commandData, - size_t returnParamIndex, - std::string const & enhancedReturnType, - bool withAllocator ) const; - void appendFunctionBodyEnhancedMultiVectorSizeCheck( std::string & str, - std::string const & indentation, - std::string const & name, - CommandData const & commandData, - size_t initialSkipCount, - size_t returnParamIndex, - std::map const & vectorParamIndices ) const; - void appendFunctionBodyEnhancedReturnResultValue( std::string & str, - std::string const & indentation, - std::string const & returnName, - std::string const & name, - CommandData const & commandData, - size_t initialSkipCount, - size_t returnParamIndex, - bool twoStep ) const; - void appendFunctionBodyEnhancedTwoStep( std::string & str, - std::string const & indentation, - std::string const & name, - CommandData const & commandData, - size_t returnParamIndex, - size_t templateParamIndex, - std::map const & vectorParamIndices, - std::string const & returnName ) const; - bool appendFunctionHeaderArgumentEnhanced( std::string & str, - ParamData const & param, - size_t paramIndex, - std::map const & vectorParamIndices, - bool skip, - bool argEncountered, - bool isTemplateParam ) const; + void addCommand( std::string const & name, CommandData & commandData ); + void addMissingFlagBits( std::vector & types, std::string const & referencedIn ); + std::string addTitleAndProtection( std::string const & str, std::string const & title ) const; + void appendDispatchLoaderDynamicCommands( std::vector const & commands, + std::set & listedCommands, + std::string const & title, + std::string & commandMembers, + std::string & initialCommandAssignments, + std::string & instanceCommandAssignments, + std::string & deviceCommandAssignments ) const; void appendFunctionHeaderArgumentEnhancedVector( std::string & str, ParamData const & param, std::string const & strippedParameterName, @@ -379,7 +329,9 @@ private: void appendRAIIHandleContext( std::string & str, std::pair const & handle, std::set const & specialFunctions ) const; - void appendStruct( std::string & str, std::pair const & structure ); + void appendStruct( std::string & str, + std::pair const & structure, + std::set & listedStructs ) const; void appendStructAssignmentOperators( std::string & str, std::pair const & structure, std::string const & prefix ) const; @@ -405,7 +357,7 @@ private: std::pair const & structData, std::string const & prefix ) const; void appendStructure( std::string & str, std::pair const & structure ) const; - void appendType( std::string & str, std::string const & typeName ); + void appendType( std::string & str, std::string const & typeName, std::set & listedTypes ) const; void appendUnion( std::string & str, std::pair const & structure ) const; void appendUniqueTypes( std::string & str, std::string const & parentType, @@ -1060,15 +1012,48 @@ private: size_t initialSkipCount, bool definition, std::vector const & returnParamIndices ) const; + std::string generateDestroyCommand( std::string const & name, CommandData const & commandData ) const; std::string generateDispatchLoaderDynamicCommandAssignment( std::string const & commandName, CommandData const & commandData, std::string const & firstArg ) const; std::string generateDispatchLoaderStaticCommands( std::vector const & commands, std::set & listedCommands, std::string const & title ) const; + std::string generateEnum( std::pair const & enumData ) const; + std::string generateEnumInitializer( TypeInfo const & type, + std::vector const & arraySizes, + std::vector const & values, + bool bitmask ) const; std::string generateEnums( std::vector const & enums, std::set & listedEnums, std::string const & title ) const; + std::string generateEnumToString( std::pair const & enumData ) const; + std::string generateFunctionBodyEnhancedLocalReturnVariable( std::string const & indentation, + CommandData const & commandData, + size_t returnParamIndex, + std::string const & enhancedReturnType, + bool withAllocator ) const; + std::string + generateFunctionBodyEnhancedMultiVectorSizeCheck( std::string const & indentation, + std::string const & name, + CommandData const & commandData, + size_t initialSkipCount, + size_t returnParamIndex, + std::map const & vectorParamIndices ) const; + std::string generateFunctionBodyEnhancedReturnResultValue( std::string const & indentation, + std::string const & returnName, + std::string const & name, + CommandData const & commandData, + size_t initialSkipCount, + size_t returnParamIndex, + bool twoStep ) const; + std::string generateFunctionBodyEnhancedTwoStep( std::string const & indentation, + std::string const & name, + CommandData const & commandData, + size_t returnParamIndex, + size_t templateParamIndex, + std::map const & vectorParamIndices, + std::string const & returnName ) const; std::string generateFunctionCall( std::string const & name, CommandData const & commandData, size_t returnParamIndex, @@ -1076,7 +1061,14 @@ private: std::map const & vectorParamIndices, bool twoStep, bool firstCall ) const; - std::string generateHandle( std::pair const & handle ); + std::string generateFunctionHeaderArgumentEnhanced( ParamData const & param, + size_t paramIndex, + std::map const & vectorParamIndices, + bool skip, + bool isTemplateParam ) const; + std::string generateHandle( std::pair const & handle, + std::set & listedHandles ) const; + std::string generateHashStructures( std::vector const & types, std::string const & title ) const; std::string generateLenInitializer( std::vector::const_iterator mit, std::map::const_iterator, @@ -1085,10 +1077,16 @@ private: std::pair generateProtection( std::string const & referencedIn, std::string const & protect ) const; std::pair generateProtection( std::string const & type, bool isAliased ) const; + std::string generateRAIICommandDefinitions( std::vector const & commands, + std::set & listedCommands, + std::string const & title ) const; std::string generateSizeCheck( std::vector::const_iterator> const & arrayIts, std::string const & structName, std::string const & prefix, bool mutualExclusiveLens ) const; + std::string generateStructExtendsStructs( std::vector const & types, + std::set & listedStructs, + std::string const & title ) const; std::string getPlatform( std::string const & extension ) const; std::pair getPoolTypeAndName( std::string const & type ) const; std::string getVectorSize( std::vector const & params, @@ -1206,7 +1204,6 @@ private: std::map m_funcPointers; std::map m_handles; std::set m_includes; - std::set m_listedTypes; std::map m_platforms; std::set m_RAIISpecialFunctions; std::map m_structureAliases; diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 117688d..7c130a6 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -6442,721 +6442,13 @@ namespace VULKAN_HPP_NAMESPACE namespace VULKAN_HPP_NAMESPACE { + //======================= + //=== STRUCTS EXTENDS === + //======================= + + //=== VK_VERSION_1_1 === template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_ANDROID_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_FUCHSIA ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_FUCHSIA*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends + struct StructExtends { enum { @@ -7180,7 +6472,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7188,7 +6480,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7196,7 +6488,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7204,7 +6496,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7212,7 +6504,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7220,7 +6512,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7228,7 +6520,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7236,7 +6528,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7244,7 +6536,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7252,431 +6544,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends + struct StructExtends { enum { @@ -7692,7 +6560,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7700,7 +6568,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7708,7 +6576,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7716,7 +6584,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -7724,351 +6592,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends + struct StructExtends { enum { @@ -8092,14 +6616,6 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> struct StructExtends { enum @@ -8108,7 +6624,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8116,123 +6632,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends + struct StructExtends { enum { @@ -8264,7 +6664,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8272,7 +6672,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8280,7 +6680,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8288,7 +6688,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8296,119 +6696,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends + struct StructExtends { enum { @@ -8432,7 +6720,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8440,7 +6728,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8448,7 +6736,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8456,7 +6744,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8464,7 +6752,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8472,7 +6760,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8480,7 +6768,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8488,7 +6776,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8496,7 +6784,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -8504,39 +6792,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends + struct StructExtends { enum { @@ -8559,398 +6815,8 @@ namespace VULKAN_HPP_NAMESPACE value = true }; }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; + + //=== VK_VERSION_1_2 === template <> struct StructExtends { @@ -9000,6 +6866,206 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> struct StructExtends { enum @@ -9016,7 +7082,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9024,7 +7090,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9032,361 +7098,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_GGP ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_GGP*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends + struct StructExtends { enum { @@ -9402,7 +7114,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9410,7 +7122,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9418,7 +7130,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9426,7 +7138,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9434,7 +7146,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9442,7 +7154,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9450,7 +7162,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9458,7 +7170,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9466,7 +7178,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9474,7 +7186,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9482,7 +7194,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9490,7 +7202,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9498,7 +7210,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9522,116 +7234,6 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#if defined( VK_USE_PLATFORM_WIN32_KHR ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> - struct StructExtends - { - enum - { - value = true - }; - }; - template <> struct StructExtends { enum @@ -9648,7 +7250,7 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { @@ -9656,244 +7258,104 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) + + //=== VK_KHR_swapchain === template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) + + //=== VK_KHR_display_swapchain === template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) + + //=== VK_EXT_debug_report === template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) + + //=== VK_AMD_rasterization_order === template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ + #if defined( VK_ENABLE_BETA_EXTENSIONS ) + //=== VK_KHR_video_queue === template <> - struct StructExtends + struct StructExtends { enum { value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct StructExtends - { - enum - { - value = true - }; - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct StructExtends { @@ -9934,8 +7396,6 @@ namespace VULKAN_HPP_NAMESPACE value = true }; }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct StructExtends { @@ -9969,9 +7429,119 @@ namespace VULKAN_HPP_NAMESPACE }; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_ENABLE_BETA_EXTENSIONS ) + + //=== VK_NV_dedicated_allocation === template <> - struct StructExtends + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_transform_feedback === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_ENABLE_BETA_EXTENSIONS ) + //=== VK_EXT_video_encode_h264 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends { enum { @@ -9979,9 +7549,11 @@ namespace VULKAN_HPP_NAMESPACE }; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ -#if defined( VK_USE_PLATFORM_WIN32_KHR ) + +#if defined( VK_ENABLE_BETA_EXTENSIONS ) + //=== VK_EXT_video_decode_h264 === template <> - struct StructExtends + struct StructExtends { enum { @@ -9989,7 +7561,121 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_ENABLE_BETA_EXTENSIONS*/ + + //=== VK_AMD_texture_gather_bias_lod === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_corner_sampled_image === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_external_memory === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_USE_PLATFORM_WIN32_KHR ) + //=== VK_NV_external_memory_win32 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends { enum { @@ -9997,7 +7683,9 @@ namespace VULKAN_HPP_NAMESPACE }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ + #if defined( VK_USE_PLATFORM_WIN32_KHR ) + //=== VK_NV_win32_keyed_mutex === template <> struct StructExtends { @@ -10015,6 +7703,544 @@ namespace VULKAN_HPP_NAMESPACE }; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ + + //=== VK_EXT_validation_flags === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_texture_compression_astc_hdr === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_astc_decode_mode === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_USE_PLATFORM_WIN32_KHR ) + //=== VK_KHR_external_memory_win32 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + + //=== VK_KHR_external_memory_fd === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_USE_PLATFORM_WIN32_KHR ) + //=== VK_KHR_win32_keyed_mutex === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + +#if defined( VK_USE_PLATFORM_WIN32_KHR ) + //=== VK_KHR_external_semaphore_win32 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + + //=== VK_KHR_push_descriptor === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_conditional_rendering === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_incremental_present === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_clip_space_w_scaling === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_display_control === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_GOOGLE_display_timing === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NVX_multiview_per_view_attributes === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_viewport_swizzle === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_discard_rectangles === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_conservative_rasterization === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_depth_clip_enable === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_shared_presentable_image === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_USE_PLATFORM_WIN32_KHR ) + //=== VK_KHR_external_fence_win32 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + + //=== VK_KHR_performance_query === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_debug_utils === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_USE_PLATFORM_ANDROID_KHR ) + //=== VK_ANDROID_external_memory_android_hardware_buffer === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + + //=== VK_EXT_inline_uniform_block === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_sample_locations === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_blend_operation_advanced === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_fragment_coverage_to_color === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_acceleration_structure === template <> struct StructExtends { @@ -10024,6 +8250,182 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_framebuffer_mixed_samples === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_shader_sm_builtins === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_image_drm_format_modifier === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_validation_cache === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_ENABLE_BETA_EXTENSIONS ) + //=== VK_KHR_portability_subset === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_ENABLE_BETA_EXTENSIONS*/ + + //=== VK_NV_shading_rate_image === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_ray_tracing === + template <> struct StructExtends { enum @@ -10032,7 +8434,1812 @@ namespace VULKAN_HPP_NAMESPACE }; }; template <> - struct StructExtends + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_representative_fragment_test === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_filter_cubic === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_global_priority === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_external_memory_host === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_shader_clock === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_AMD_pipeline_compiler_control === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_AMD_shader_core_properties === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_ENABLE_BETA_EXTENSIONS ) + //=== VK_EXT_video_decode_h265 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_ENABLE_BETA_EXTENSIONS*/ + + //=== VK_AMD_memory_overallocation_behavior === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_vertex_attribute_divisor === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_USE_PLATFORM_GGP ) + //=== VK_GGP_frame_token === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_USE_PLATFORM_GGP*/ + + //=== VK_EXT_pipeline_creation_feedback === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_compute_shader_derivatives === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_mesh_shader === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_fragment_shader_barycentric === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_shader_image_footprint === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_scissor_exclusive === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_device_diagnostic_checkpoints === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_INTEL_shader_integer_functions2 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_INTEL_performance_query === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_pci_bus_info === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_AMD_display_native_hdr === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_shader_terminate_invocation === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_fragment_density_map === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_subgroup_size_control === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_fragment_shading_rate === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_AMD_shader_core_properties2 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_AMD_device_coherent_memory === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_shader_image_atomic_int64 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_memory_budget === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_memory_priority === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_surface_protected_capabilities === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_dedicated_allocation_image_aliasing === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_buffer_device_address === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_validation_features === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_cooperative_matrix === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_coverage_reduction_mode === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_fragment_shader_interlock === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_ycbcr_image_arrays === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_provoking_vertex === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_USE_PLATFORM_WIN32_KHR ) + //=== VK_EXT_full_screen_exclusive === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + + //=== VK_EXT_line_rasterization === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_shader_atomic_float === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_index_type_uint8 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_extended_dynamic_state === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_pipeline_executable_properties === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_shader_demote_to_helper_invocation === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_device_generated_commands === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_inherited_viewport_scissor === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_texel_buffer_alignment === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_QCOM_render_pass_transform === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_device_memory_report === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_robustness2 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_custom_border_color === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_private_data === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_pipeline_creation_cache_control === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_ENABLE_BETA_EXTENSIONS ) + //=== VK_KHR_video_encode_queue === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_ENABLE_BETA_EXTENSIONS*/ + + //=== VK_NV_device_diagnostics_config === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_synchronization2 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_shader_subgroup_uniform_control_flow === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_zero_initialize_workgroup_memory === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_fragment_shading_rate_enums === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_ray_tracing_motion_blur === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_ycbcr_2plane_444_formats === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_fragment_density_map2 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_QCOM_rotated_copy_commands === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_image_robustness === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_workgroup_memory_explicit_layout === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_4444_formats === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_ray_tracing_pipeline === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_KHR_ray_query === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_VALVE_mutable_descriptor_type === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_vertex_input_dynamic_state === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_physical_device_drm === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + +#if defined( VK_USE_PLATFORM_FUCHSIA ) + //=== VK_FUCHSIA_external_memory === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; +#endif /*VK_USE_PLATFORM_FUCHSIA*/ + + //=== VK_HUAWEI_subpass_shading === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_NV_external_memory_rdma === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_extended_dynamic_state2 === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_color_write_enable === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_global_priority_query === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + + //=== VK_EXT_multi_draw === + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends + { + enum + { + value = true + }; + }; + template <> + struct StructExtends { enum { @@ -13052,25 +13259,90 @@ namespace VULKAN_HPP_NAMESPACE namespace std { + //======================= + //=== HASH structures === + //======================= + + //=== VK_VERSION_1_0 === + template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & accelerationStructureKHR ) const - VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( - static_cast( accelerationStructureKHR ) ); + return std::hash{}( static_cast( instance ) ); } }; template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & accelerationStructureNV ) const - VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( - static_cast( accelerationStructureNV ) ); + return std::hash{}( static_cast( physicalDevice ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( device ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( queue ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( deviceMemory ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( fence ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( semaphore ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( event ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( queryPool ) ); } }; @@ -13093,68 +13365,65 @@ namespace std }; template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( commandBuffer ) ); + return std::hash{}( static_cast( image ) ); } }; template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( commandPool ) ); + return std::hash{}( static_cast( imageView ) ); } }; template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionNVX const & cuFunctionNVX ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( cuFunctionNVX ) ); + return std::hash{}( static_cast( shaderModule ) ); } }; template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleNVX const & cuModuleNVX ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( cuModuleNVX ) ); + return std::hash{}( static_cast( pipelineCache ) ); } }; template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const - VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( debugReportCallbackEXT ) ); + return std::hash{}( static_cast( pipeline ) ); } }; template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const - VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( debugUtilsMessengerEXT ) ); + return std::hash{}( static_cast( pipelineLayout ) ); } }; template <> - struct hash + struct hash { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( deferredOperationKHR ) ); + return std::hash{}( static_cast( sampler ) ); } }; @@ -13186,6 +13455,54 @@ namespace std } }; + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::Framebuffer const & framebuffer ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( framebuffer ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( renderPass ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( commandPool ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( commandBuffer ) ); + } + }; + + //=== VK_VERSION_1_1 === + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const + VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( samplerYcbcrConversion ) ); + } + }; + template <> struct hash { @@ -13197,24 +13514,30 @@ namespace std } }; + //=== VK_KHR_surface === + template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( device ) ); + return std::hash{}( static_cast( surfaceKHR ) ); } }; + //=== VK_KHR_swapchain === + template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( deviceMemory ) ); + return std::hash{}( static_cast( swapchainKHR ) ); } }; + //=== VK_KHR_display === + template <> struct hash { @@ -13233,70 +13556,113 @@ namespace std } }; - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( event ) ); - } - }; + //=== VK_EXT_debug_report === template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( fence ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Framebuffer const & framebuffer ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( framebuffer ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( image ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( imageView ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const + std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( - static_cast( indirectCommandsLayoutNV ) ); + return std::hash{}( static_cast( debugReportCallbackEXT ) ); + } + }; + +#if defined( VK_ENABLE_BETA_EXTENSIONS ) + //=== VK_KHR_video_queue === + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionKHR const & videoSessionKHR ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( videoSessionKHR ) ); } }; template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & videoSessionParametersKHR ) const + VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( instance ) ); + return std::hash{}( + static_cast( videoSessionParametersKHR ) ); } }; +#endif /*VK_ENABLE_BETA_EXTENSIONS*/ + + //=== VK_NVX_binary_import === + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleNVX const & cuModuleNVX ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( cuModuleNVX ) ); + } + }; + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionNVX const & cuFunctionNVX ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( cuFunctionNVX ) ); + } + }; + + //=== VK_EXT_debug_utils === + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const + VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( debugUtilsMessengerEXT ) ); + } + }; + + //=== VK_KHR_acceleration_structure === + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & accelerationStructureKHR ) const + VULKAN_HPP_NOEXCEPT + { + return std::hash{}( + static_cast( accelerationStructureKHR ) ); + } + }; + + //=== VK_EXT_validation_cache === + + template <> + struct hash + { + std::size_t + operator()( VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT + { + return std::hash{}( static_cast( validationCacheEXT ) ); + } + }; + + //=== VK_NV_ray_tracing === + + template <> + struct hash + { + std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & accelerationStructureNV ) const + VULKAN_HPP_NOEXCEPT + { + return std::hash{}( + static_cast( accelerationStructureNV ) ); + } + }; + + //=== VK_INTEL_performance_query === template <> struct hash @@ -13309,41 +13675,32 @@ namespace std } }; + //=== VK_KHR_deferred_host_operations === + template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT + std::size_t + operator()( VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( physicalDevice ) ); + return std::hash{}( static_cast( deferredOperationKHR ) ); } }; + //=== VK_NV_device_generated_commands === + template <> - struct hash + struct hash { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT + std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const + VULKAN_HPP_NOEXCEPT { - return std::hash{}( static_cast( pipeline ) ); + return std::hash{}( + static_cast( indirectCommandsLayoutNV ) ); } }; - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( pipelineCache ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( pipelineLayout ) ); - } - }; + //=== VK_EXT_private_data === template <> struct hash @@ -13355,120 +13712,5 @@ namespace std } }; - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( queryPool ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( queue ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( renderPass ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( sampler ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const - VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( samplerYcbcrConversion ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( semaphore ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( shaderModule ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( surfaceKHR ) ); - } - }; - - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( swapchainKHR ) ); - } - }; - - template <> - struct hash - { - std::size_t - operator()( VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( validationCacheEXT ) ); - } - }; - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionKHR const & videoSessionKHR ) const VULKAN_HPP_NOEXCEPT - { - return std::hash{}( static_cast( videoSessionKHR ) ); - } - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ - -#if defined( VK_ENABLE_BETA_EXTENSIONS ) - template <> - struct hash - { - std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & videoSessionParametersKHR ) const - VULKAN_HPP_NOEXCEPT - { - return std::hash{}( - static_cast( videoSessionParametersKHR ) ); - } - }; -#endif /*VK_ENABLE_BETA_EXTENSIONS*/ } // namespace std #endif diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index 2951bf3..be5729a 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -1688,6 +1688,10 @@ namespace VULKAN_HPP_NAMESPACE PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0; }; + //==================== + //=== RAII HANDLES === + //==================== + class Context { public: diff --git a/vulkan/vulkan_structs.hpp b/vulkan/vulkan_structs.hpp index 6428439..1521bf6 100644 --- a/vulkan/vulkan_structs.hpp +++ b/vulkan/vulkan_structs.hpp @@ -10,6 +10,10 @@ namespace VULKAN_HPP_NAMESPACE { + //=============== + //=== STRUCTS === + //=============== + struct AabbPositionsKHR { #if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )