Correct postfix tag of some enums.

This commit is contained in:
asuessenbach 2021-06-01 19:48:06 +02:00
parent f5307046ae
commit f2d623cb7a
3 changed files with 273 additions and 340 deletions

View File

@ -41,28 +41,27 @@ std::vector<std::string> extractHandleCommands( std::vector<std::string> const &
std::set<std::string> const & handleCommands, std::set<std::string> const & handleCommands,
std::set<std::string> & listedCommands ); std::set<std::string> & listedCommands );
std::string findTag( std::set<std::string> const & tags, std::string const & name, std::string const & postfix = "" ); std::string findTag( std::set<std::string> const & tags, std::string const & name, std::string const & postfix = "" );
std::string generateEnumValueName( std::string const & name, std::string generateEnumValueName( std::string const & enumName,
std::string const & prefix, std::string const & valueName,
std::string const & postfix, bool bitmask,
bool bitmask, std::set<std::string> const & tags );
std::string const & tag );
std::string generateStandardArray( std::string const & type, std::vector<std::string> const & sizes ); std::string generateStandardArray( std::string const & type, std::vector<std::string> const & sizes );
std::map<std::string, std::string> getAttributes( tinyxml2::XMLElement const * element ); std::map<std::string, std::string> getAttributes( tinyxml2::XMLElement const * element );
template <typename ElementContainer> template <typename ElementContainer>
std::vector<tinyxml2::XMLElement const *> getChildElements( ElementContainer const * element ); std::vector<tinyxml2::XMLElement const *> getChildElements( ElementContainer const * element );
std::string getEnumPostfix( std::string const & name, std::set<std::string> const & tags, std::string & prefix ); std::pair<std::string, std::string>
std::string namespacedType( std::string const & type ); getEnumSuffixes( std::string const & name, bool bitmask, std::set<std::string> const & tags );
std::string readTypePostfix( tinyxml2::XMLNode const * node ); std::string readTypePostfix( tinyxml2::XMLNode const * node );
std::string readTypePrefix( tinyxml2::XMLNode const * node ); std::string readTypePrefix( tinyxml2::XMLNode const * node );
void replaceAll( std::string & str, std::string const & from, std::string const & to ); void replaceAll( std::string & str, std::string const & from, std::string const & to );
std::string replaceWithMap( std::string const & input, std::map<std::string, std::string> replacements ); std::string replaceWithMap( std::string const & input, std::map<std::string, std::string> replacements );
std::string startLowerCase( std::string const & input ); std::string startLowerCase( std::string const & input );
std::string startUpperCase( std::string const & input ); std::string startUpperCase( std::string const & input );
std::string stripPostfix( std::string const & value, std::string const & postfix ); std::string stripPostfix( std::string const & value, std::string const & postfix );
std::string stripPluralS( std::string const & name ); std::string stripPluralS( std::string const & name );
std::string stripPrefix( std::string const & value, std::string const & prefix ); std::string stripPrefix( std::string const & value, std::string const & prefix );
std::string toCamelCase( std::string const & value ); std::string toCamelCase( std::string const & value );
std::string toUpperCase( std::string const & name ); std::string toUpperCase( std::string const & name );
std::vector<std::string> tokenize( std::string const & tokenString, std::string const & separator ); std::vector<std::string> tokenize( std::string const & tokenString, std::string const & separator );
std::string trim( std::string const & input ); std::string trim( std::string const & input );
std::string trimEnd( std::string const & input ); std::string trimEnd( std::string const & input );
@ -330,13 +329,20 @@ std::string findTag( std::set<std::string> const & tags, std::string const & nam
return ( tagIt != tags.end() ) ? *tagIt : ""; return ( tagIt != tags.end() ) ? *tagIt : "";
} }
std::string generateEnumValueName( std::string const & name, std::string generateEnumValueName( std::string const & enumName,
std::string const & prefix, std::string const & valueName,
std::string const & postfix, bool bitmask,
bool bitmask, std::set<std::string> const & tags )
std::string const & tag )
{ {
std::string result = "e" + toCamelCase( stripPostfix( stripPrefix( name, prefix ), postfix ) ); std::string prefix, postfix;
std::tie( prefix, postfix ) = getEnumSuffixes( enumName, bitmask, tags );
std::string tag = findTag( tags, valueName, "" );
if ( postfix == "_" + tag )
{
tag = findTag( tags, valueName, postfix );
}
std::string result = "e" + toCamelCase( stripPostfix( stripPrefix( valueName, prefix ), postfix ) );
if ( bitmask ) if ( bitmask )
{ {
size_t pos = result.find( "Bit" ); size_t pos = result.find( "Bit" );
@ -385,11 +391,33 @@ std::vector<tinyxml2::XMLElement const *> getChildElements( ElementContainer con
return childElements; return childElements;
} }
std::string getEnumPostfix( std::string const & name, std::set<std::string> const & tags, std::string & prefix ) std::pair<std::string, std::string>
getEnumSuffixes( std::string const & name, bool bitmask, std::set<std::string> const & tags )
{ {
std::string postfix; std::string prefix, postfix;
if ( name != "VkResult" ) if ( name == "VkResult" )
{ {
prefix = "VK_";
}
else
{
if ( bitmask )
{
// for a bitmask enum, start with "VK", cut off the trailing "FlagBits", and convert that name to upper case
// end that with "Bit"
size_t pos = name.find( "FlagBits" );
assert( pos != std::string::npos );
std::string shortenedName = name;
shortenedName.erase( pos, strlen( "FlagBits" ) );
std::string tag = findTag( tags, shortenedName );
prefix = toUpperCase( stripPostfix( shortenedName, tag ) ) + "_";
}
else
{
// for a non-bitmask enum, convert the name to upper case
prefix = toUpperCase( name ) + "_";
}
// if the enum name contains a tag move it from the prefix to the postfix to generate correct enum value names. // if the enum name contains a tag move it from the prefix to the postfix to generate correct enum value names.
for ( auto const & tag : tags ) for ( auto const & tag : tags )
{ {
@ -406,7 +434,8 @@ std::string getEnumPostfix( std::string const & name, std::set<std::string> cons
} }
} }
} }
return postfix;
return std::make_pair( prefix, postfix );
} }
std::pair<std::vector<std::string>, std::string> readModifiers( tinyxml2::XMLNode const * node ) std::pair<std::vector<std::string>, std::string> readModifiers( tinyxml2::XMLNode const * node )
@ -1004,9 +1033,9 @@ void VulkanHppGenerator::appendBitmask( std::string & str,
{ {
std::string enter, leave; std::string enter, leave;
std::tie( enter, leave ) = generateProtection( value.extension ); std::tie( enter, leave ) = generateProtection( value.extension );
std::string valueName = generateEnumValueName( "Vk" + name, value.name, true, m_tags );
allFlags += ( ( previousEnter != enter ) ? ( "\n" + previousLeave + enter ) : "\n" ) + " " + allFlags += ( ( previousEnter != enter ) ? ( "\n" + previousLeave + enter ) : "\n" ) + " " +
( encounteredFlag ? "| " : " " ) + bitmaskType + "( " + enumName + "::" + value.translatedName + ( encounteredFlag ? "| " : " " ) + bitmaskType + "( " + enumName + "::" + valueName + " )";
" )";
encounteredFlag = true; encounteredFlag = true;
previousEnter = enter; previousEnter = enter;
previousLeave = leave; previousLeave = leave;
@ -1092,8 +1121,9 @@ void VulkanHppGenerator::appendBitmaskToStringFunction( std::string &
{ {
std::string enter, leave; std::string enter, leave;
std::tie( enter, leave ) = generateProtection( evd.extension ); std::tie( enter, leave ) = generateProtection( evd.extension );
str += enter + " if ( value & " + enumName + "::" + evd.translatedName + " ) result += \"" + std::string valueName = generateEnumValueName( "Vk" + enumName, evd.name, true, m_tags );
evd.translatedName.substr( 1 ) + " | \";\n" + leave; str += enter + " if ( value & " + enumName + "::" + valueName + " ) result += \"" + valueName.substr( 1 ) +
" | \";\n" + leave;
} }
} }
str += " return \"{ \" + result.substr(0, result.size() - 3) + \" }\";\n"; str += " return \"{ \" + result.substr(0, result.size() - 3) + \" }\";\n";
@ -2645,7 +2675,8 @@ void VulkanHppGenerator::appendEnum( std::string & str, std::pair<std::string, E
str += " : " + bitmaskIt->first; str += " : " + bitmaskIt->first;
} }
std::string enumList, previousEnter, previousLeave; std::string enumList, previousEnter, previousLeave;
std::set<std::string> valueNames;
for ( auto const & value : enumData.second.values ) for ( auto const & value : enumData.second.values )
{ {
std::string enter, leave; std::string enter, leave;
@ -2654,7 +2685,10 @@ void VulkanHppGenerator::appendEnum( std::string & str, std::pair<std::string, E
{ {
enumList += previousLeave + enter; enumList += previousLeave + enter;
} }
enumList += " " + value.translatedName + " = " + value.name + ",\n"; std::string valueName = generateEnumValueName( enumData.first, value.name, enumData.second.isBitmask, m_tags );
enumList += " " + valueName + " = " + value.name + ",\n";
assert( valueNames.find( valueName ) == valueNames.end() );
valueNames.insert( valueName );
previousEnter = enter; previousEnter = enter;
previousLeave = leave; previousLeave = leave;
@ -2663,11 +2697,16 @@ void VulkanHppGenerator::appendEnum( std::string & str, std::pair<std::string, E
for ( auto const & alias : enumData.second.aliases ) 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 non-alias values // make sure to only list alias values that differ from all non-alias values
if ( std::find_if( enumData.second.values.begin(), if ( std::find_if( valueNames.begin(),
enumData.second.values.end(), valueNames.end(),
[&alias]( EnumValueData const & evd ) [&aliasName]( std::string const & valueName )
{ return alias.second.translatedName == evd.translatedName; } ) == enumData.second.values.end() ) { return aliasName == valueName; } ) == valueNames.end() )
{ {
#if !defined( NDEBUG ) #if !defined( NDEBUG )
auto enumIt = std::find_if( enumData.second.values.begin(), auto enumIt = std::find_if( enumData.second.values.begin(),
@ -2684,7 +2723,7 @@ void VulkanHppGenerator::appendEnum( std::string & str, std::pair<std::string, E
assert( enumIt != enumData.second.values.end() ); assert( enumIt != enumData.second.values.end() );
assert( enumIt->extension.empty() || generateProtection( enumIt->extension ).first.empty() ); assert( enumIt->extension.empty() || generateProtection( enumIt->extension ).first.empty() );
#endif #endif
enumList += " " + alias.second.translatedName + " = " + alias.first + ",\n"; enumList += " " + aliasName + " = " + alias.first + ",\n";
} }
} }
if ( enumList.empty() ) if ( enumList.empty() )
@ -2780,11 +2819,13 @@ void VulkanHppGenerator::appendEnums( std::string & str ) const
void VulkanHppGenerator::appendEnumInitializer( std::string & str, void VulkanHppGenerator::appendEnumInitializer( std::string & str,
TypeInfo const & type, TypeInfo const & type,
std::vector<std::string> const & arraySizes, std::vector<std::string> const & arraySizes,
std::vector<EnumValueData> const & values ) const std::vector<EnumValueData> const & values,
bool bitmask ) const
{ {
// enum arguments might need special initialization // enum arguments might need special initialization
assert( type.prefix.empty() && !values.empty() ); assert( type.prefix.empty() && !values.empty() );
std::string value = "VULKAN_HPP_NAMESPACE::" + stripPrefix( type.type, "Vk" ) + "::" + values.front().translatedName; 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() ) if ( arraySizes.empty() )
{ {
str += value; str += value;
@ -2837,8 +2878,8 @@ void VulkanHppGenerator::appendEnumToString( std::string &
{ {
str += previousLeave + enter; str += previousLeave + enter;
} }
str += " case " + enumName + "::" + value.translatedName + " : return \"" + std::string valueName = generateEnumValueName( enumData.first, value.name, enumData.second.isBitmask, m_tags );
value.translatedName.substr( 1 ) + "\";\n"; str += " case " + enumName + "::" + valueName + " : return \"" + valueName.substr( 1 ) + "\";\n";
previousEnter = enter; previousEnter = enter;
previousLeave = leave; previousLeave = leave;
} }
@ -3317,13 +3358,14 @@ ${CppTypeFromDebugReportObjectTypeEXT}
${usingAlias}${leave})"; ${usingAlias}${leave})";
std::string className = stripPrefix( handleData.first, "Vk" ); std::string className = stripPrefix( handleData.first, "Vk" );
std::string valueName = handleData.second.objTypeEnum;
valueName = valueName.replace( 3, 0, "DEBUG_REPORT_" ) + "_EXT";
auto enumIt = m_enums.find( "VkDebugReportObjectTypeEXT" ); auto enumIt = m_enums.find( "VkDebugReportObjectTypeEXT" );
assert( enumIt != m_enums.end() ); assert( enumIt != m_enums.end() );
auto valueIt = auto valueIt = std::find_if( enumIt->second.values.begin(),
std::find_if( enumIt->second.values.begin(), enumIt->second.values.end(),
enumIt->second.values.end(), [&valueName]( EnumValueData const & evd ) { return valueName == evd.name; } );
[&className]( EnumValueData const & evd ) { return evd.translatedName == "e" + className; } );
static const std::string cppTypeFromDebugReportObjectTypeEXTTemplate = R"( static const std::string cppTypeFromDebugReportObjectTypeEXTTemplate = R"(
template <> template <>
struct CppType<VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::e${className}> struct CppType<VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::e${className}>
@ -3335,8 +3377,9 @@ ${usingAlias}${leave})";
( valueIt != enumIt->second.values.end() ) ( valueIt != enumIt->second.values.end() )
? replaceWithMap( cppTypeFromDebugReportObjectTypeEXTTemplate, { { "className", className } } ) ? replaceWithMap( cppTypeFromDebugReportObjectTypeEXTTemplate, { { "className", className } } )
: ""; : "";
std::string debugReportObjectType = std::string debugReportObjectType = ( valueIt != enumIt->second.values.end() )
( valueIt != enumIt->second.values.end() ) ? valueIt->translatedName : "eUnknown"; ? generateEnumValueName( enumIt->first, valueIt->name, false, m_tags )
: "eUnknown";
std::string enter, leave; std::string enter, leave;
std::tie( enter, leave ) = generateProtection( handleData.first, !handleData.second.alias.empty() ); std::tie( enter, leave ) = generateProtection( handleData.first, !handleData.second.alias.empty() );
@ -3364,7 +3407,7 @@ ${usingAlias}${leave})";
{ "enter", enter }, { "enter", enter },
{ "leave", leave }, { "leave", leave },
{ "memberName", startLowerCase( stripPrefix( handleData.first, "Vk" ) ) }, { "memberName", startLowerCase( stripPrefix( handleData.first, "Vk" ) ) },
{ "objTypeEnum", valueIt->translatedName }, { "objTypeEnum", generateEnumValueName( enumIt->first, valueIt->name, false, m_tags ) },
{ "usingAlias", usingAlias } } ); { "usingAlias", usingAlias } } );
} }
@ -3649,18 +3692,19 @@ ${enter} class ${className} : public SystemError
}; };
${leave})"; ${leave})";
auto enumData = m_enums.find( "VkResult" ); auto enumIt = m_enums.find( "VkResult" );
for ( auto const & value : enumData->second.values ) for ( auto const & value : enumIt->second.values )
{ {
if ( beginsWith( value.translatedName, "eError" ) ) if ( beginsWith( value.name, "VK_ERROR" ) )
{ {
std::string enter, leave; std::string enter, leave;
std::tie( enter, leave ) = generateProtection( value.extension ); std::tie( enter, leave ) = generateProtection( value.extension );
std::string valueName = generateEnumValueName( enumIt->first, value.name, false, m_tags );
str += replaceWithMap( templateString, str += replaceWithMap( templateString,
{ { "className", stripPrefix( value.translatedName, "eError" ) + "Error" }, { { "className", stripPrefix( valueName, "eError" ) + "Error" },
{ "enter", enter }, { "enter", enter },
{ "enumName", stripPrefix( enumData->first, "Vk" ) }, { "enumName", stripPrefix( enumIt->first, "Vk" ) },
{ "enumMemberName", value.translatedName }, { "enumMemberName", valueName },
{ "leave", leave } } ); { "leave", leave } } );
} }
} }
@ -3703,16 +3747,18 @@ void VulkanHppGenerator::appendRAIIHandle( std::string &
enumIt->second.values.end(), enumIt->second.values.end(),
[&handle]( EnumValueData const & evd ) { return evd.name == handle.second.objTypeEnum; } ); [&handle]( EnumValueData const & evd ) { return evd.name == handle.second.objTypeEnum; } );
assert( valueIt != enumIt->second.values.end() ); assert( valueIt != enumIt->second.values.end() );
std::string objTypeEnum = valueIt->translatedName; std::string objTypeEnum = generateEnumValueName( enumIt->first, valueIt->name, false, m_tags );
enumIt = m_enums.find( "VkDebugReportObjectTypeEXT" ); enumIt = m_enums.find( "VkDebugReportObjectTypeEXT" );
assert( enumIt != m_enums.end() ); assert( enumIt != m_enums.end() );
valueIt = std::string valueName = handle.second.objTypeEnum;
std::find_if( enumIt->second.values.begin(), valueName = valueName.replace( 3, 0, "DEBUG_REPORT_" ) + "_EXT";
enumIt->second.values.end(), valueIt = std::find_if( enumIt->second.values.begin(),
[&handleType]( EnumValueData const & evd ) { return evd.translatedName == "e" + handleType; } ); enumIt->second.values.end(),
std::string debugReportObjectType = [&valueName]( EnumValueData const & evd ) { return valueName == evd.name; } );
( valueIt != enumIt->second.values.end() ) ? valueIt->translatedName : "eUnknown"; std::string debugReportObjectType = ( valueIt != enumIt->second.values.end() )
? generateEnumValueName( enumIt->first, valueIt->name, false, m_tags )
: "eUnknown";
std::string dispatcherType = std::string dispatcherType =
( ( handle.first == "VkDevice" ) || ( ( handle.first == "VkDevice" ) ||
@ -10457,7 +10503,8 @@ bool VulkanHppGenerator::appendStructConstructorArgument( std::string & str
auto enumIt = m_enums.find( memberData.type.type ); auto enumIt = m_enums.find( memberData.type.type );
if ( enumIt != m_enums.end() && memberData.type.postfix.empty() ) if ( enumIt != m_enums.end() && memberData.type.postfix.empty() )
{ {
appendEnumInitializer( str, memberData.type, memberData.arraySizes, enumIt->second.values ); appendEnumInitializer(
str, memberData.type, memberData.arraySizes, enumIt->second.values, enumIt->second.isBitmask );
} }
else else
{ {
@ -10502,14 +10549,15 @@ std::string VulkanHppGenerator::appendStructMembers( std::string &
assert( enumIt != m_enums.end() ); assert( enumIt != m_enums.end() );
{ {
std::string enumValue = member.values.front(); std::string enumValue = member.values.front();
auto nameIt = std::find_if( enumIt->second.values.begin(), auto valueIt = std::find_if( enumIt->second.values.begin(),
enumIt->second.values.end(), enumIt->second.values.end(),
[&enumValue]( EnumValueData const & evd ) { return enumValue == evd.name; } ); [&enumValue]( EnumValueData const & evd ) { return enumValue == evd.name; } );
assert( nameIt != enumIt->second.values.end() ); assert( valueIt != enumIt->second.values.end() );
str += " = " + stripPrefix( member.type.type, "Vk" ) + "::" + nameIt->translatedName; std::string valueName = generateEnumValueName( enumIt->first, valueIt->name, enumIt->second.isBitmask, m_tags );
str += " = " + stripPrefix( member.type.type, "Vk" ) + "::" + valueName;
if ( member.name == "sType" ) if ( member.name == "sType" )
{ {
sTypeValue = nameIt->translatedName; sTypeValue = valueName;
} }
} }
} }
@ -10528,7 +10576,7 @@ std::string VulkanHppGenerator::appendStructMembers( std::string &
auto enumIt = m_enums.find( member.type.type ); auto enumIt = m_enums.find( member.type.type );
if ( member.arraySizes.empty() && ( enumIt != m_enums.end() ) && member.type.postfix.empty() ) if ( member.arraySizes.empty() && ( enumIt != m_enums.end() ) && member.type.postfix.empty() )
{ {
appendEnumInitializer( str, member.type, member.arraySizes, enumIt->second.values ); appendEnumInitializer( str, member.type, member.arraySizes, enumIt->second.values, enumIt->second.isBitmask );
} }
else else
{ {
@ -10866,7 +10914,7 @@ void VulkanHppGenerator::appendStructureChainValidation( std::string & str )
void VulkanHppGenerator::appendThrowExceptions( std::string & str ) const void VulkanHppGenerator::appendThrowExceptions( std::string & str ) const
{ {
auto enumData = m_enums.find( "VkResult" ); auto enumIt = m_enums.find( "VkResult" );
str += str +=
"\n" "\n"
@ -10874,14 +10922,15 @@ void VulkanHppGenerator::appendThrowExceptions( std::string & str ) const
" {\n" " {\n"
" switch ( result )\n" " switch ( result )\n"
" {\n"; " {\n";
for ( auto const & value : enumData->second.values ) for ( auto const & value : enumIt->second.values )
{ {
if ( beginsWith( value.translatedName, "eError" ) ) if ( beginsWith( value.name, "VK_ERROR" ) )
{ {
std::string enter, leave; std::string enter, leave;
std::tie( enter, leave ) = generateProtection( value.extension ); std::tie( enter, leave ) = generateProtection( value.extension );
str += enter + " case Result::" + value.translatedName + ": throw " + std::string valueName = generateEnumValueName( enumIt->first, value.name, false, m_tags );
stripPrefix( value.translatedName, "eError" ) + "Error( message );\n" + leave; str += enter + " case Result::" + valueName + ": throw " + stripPrefix( valueName, "eError" ) +
"Error( message );\n" + leave;
} }
} }
str += str +=
@ -11101,49 +11150,25 @@ void VulkanHppGenerator::appendUniqueTypes( std::string & str,
str += "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/\n"; str += "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/\n";
} }
void VulkanHppGenerator::EnumData::addEnumAlias( int line, void VulkanHppGenerator::EnumData::addEnumAlias( int line, std::string const & name, std::string const & aliasName )
std::string const & name,
std::string const & aliasName,
std::string const & vkName )
{ {
auto aliasIt = aliases.find( name ); auto aliasIt = aliases.find( name );
check( ( aliasIt == aliases.end() ) || ( aliasIt->second.name == aliasName ), check( ( aliasIt == aliases.end() ) || ( aliasIt->second.name == aliasName ),
line, line,
"enum alias <" + name + "> already listed for a different enum value" ); "enum alias <" + name + "> already listed for a different enum value" );
aliases.insert( std::make_pair( name, EnumAliasData( aliasName, line ) ) );
// only list aliases that map to different vkNames
aliasIt = std::find_if( aliases.begin(),
aliases.end(),
[&vkName]( std::pair<std::string, EnumAliasData> const & aliasEntry )
{ return vkName == aliasEntry.second.translatedName; } );
if ( aliasIt == aliases.end() )
{
aliases.insert( std::make_pair( name, EnumAliasData( aliasName, vkName, line ) ) );
}
} }
void VulkanHppGenerator::EnumData::addEnumValue( int line, void VulkanHppGenerator::EnumData::addEnumValue( int line,
std::string const & valueName, std::string const & valueName,
bool bitmask,
bool bitpos, bool bitpos,
std::string const & prefix, std::string const & extension )
std::string const & postfix,
std::string const & extension,
std::string const & tag )
{ {
std::string translatedName = generateEnumValueName( valueName, prefix, postfix, bitmask, tag ); auto valueIt = std::find_if(
values.begin(), values.end(), [&valueName]( EnumValueData const & evd ) { return evd.name == valueName; } );
auto it = if ( valueIt == values.end() )
std::find_if( values.begin(),
values.end(),
[&translatedName]( EnumValueData const & evd ) { return evd.translatedName == translatedName; } );
if ( it == values.end() )
{ {
values.emplace_back( line, valueName, extension, bitpos, translatedName ); values.emplace_back( line, valueName, extension, bitpos );
}
else
{
check( it->name == valueName, line, "enum value <" + valueName + "> maps to same C++-name as <" + it->name + ">" );
} }
} }
@ -11304,7 +11329,7 @@ void VulkanHppGenerator::checkCorrectness()
} }
for ( auto const & objectTypeValue : objectTypeIt->second.values ) for ( auto const & objectTypeValue : objectTypeIt->second.values )
{ {
if ( objectTypeValue.translatedName != "eUnknown" ) if ( objectTypeValue.name != "VK_OBJECT_TYPE_UNKNOWN" )
{ {
check( std::find_if( m_handles.begin(), check( std::find_if( m_handles.begin(),
m_handles.end(), m_handles.end(),
@ -11793,26 +11818,27 @@ void VulkanHppGenerator::appendIndexTypeTraits( std::string & str ) const
std::set<std::string> seenCppTypes; std::set<std::string> seenCppTypes;
for ( auto const & value : indexType->second.values ) for ( auto const & value : indexType->second.values )
{ {
std::string valueName = generateEnumValueName( indexType->first, value.name, false, m_tags );
std::string cppType; std::string cppType;
if ( beginsWith( value.translatedName, "eUint8" ) ) if ( beginsWith( valueName, "eUint8" ) )
{ {
cppType = "uint8_t"; cppType = "uint8_t";
} }
else if ( beginsWith( value.translatedName, "eUint16" ) ) else if ( beginsWith( valueName, "eUint16" ) )
{ {
cppType = "uint16_t"; cppType = "uint16_t";
} }
else if ( beginsWith( value.translatedName, "eUint32" ) ) else if ( beginsWith( valueName, "eUint32" ) )
{ {
cppType = "uint32_t"; cppType = "uint32_t";
} }
else if ( beginsWith( value.translatedName, "eUint64" ) ) else if ( beginsWith( valueName, "eUint64" ) )
{ {
cppType = "uint64_t"; // No extension for this currently cppType = "uint64_t"; // No extension for this currently
} }
else else
{ {
assert( beginsWith( value.translatedName, "eNone" ) ); assert( beginsWith( valueName, "eNone" ) );
} }
if ( !cppType.empty() ) if ( !cppType.empty() )
@ -11830,7 +11856,7 @@ void VulkanHppGenerator::appendIndexTypeTraits( std::string & str ) const
">\n" ">\n"
" {\n" " {\n"
" static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::" + " static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::" +
value.translatedName + valueName +
";\n" ";\n"
" };\n"; " };\n";
} }
@ -11839,7 +11865,7 @@ void VulkanHppGenerator::appendIndexTypeTraits( std::string & str ) const
"\n" "\n"
" template <>\n" " template <>\n"
" struct CppType<IndexType, IndexType::" + " struct CppType<IndexType, IndexType::" +
value.translatedName + valueName +
">\n" ">\n"
" {\n" " {\n"
" using Type = " + " using Type = " +
@ -12083,32 +12109,6 @@ std::string
return sizeCheck; return sizeCheck;
} }
std::string VulkanHppGenerator::getEnumPrefix( int line, std::string const & name, bool bitmask ) const
{
std::string prefix;
if ( name == "VkResult" )
{
prefix = "VK_";
}
else if ( bitmask )
{
// for a bitmask enum, start with "VK", cut off the trailing "FlagBits", and convert that name to upper case
// end that with "Bit"
size_t pos = name.find( "FlagBits" );
check( pos != std::string::npos, line, "bitmask <" + name + "> does not contain <FlagBits>" );
std::string shortenedName = name;
shortenedName.erase( pos, strlen( "FlagBits" ) );
std::string tag = findTag( m_tags, shortenedName );
prefix = toUpperCase( stripPostfix( shortenedName, tag ) ) + "_";
}
else
{
// for a non-bitmask enum, convert the name to upper case
prefix = toUpperCase( name ) + "_";
}
return prefix;
}
std::string VulkanHppGenerator::getPlatform( std::string const & extension ) const std::string VulkanHppGenerator::getPlatform( std::string const & extension ) const
{ {
auto extensionIt = m_extensions.find( extension ); auto extensionIt = m_extensions.find( extension );
@ -12713,30 +12713,24 @@ void VulkanHppGenerator::readDefine( tinyxml2::XMLElement const *
check( m_defines.insert( name ).second, line, "define <" + name + "> has already been specified" ); check( m_defines.insert( name ).second, line, "define <" + name + "> has already been specified" );
} }
void VulkanHppGenerator::readEnum( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readEnum( tinyxml2::XMLElement const * element,
EnumData & enumData, std::map<std::string, EnumData>::iterator enumIt )
bool bitmask,
std::string const & prefix,
std::string const & postfix )
{ {
std::map<std::string, std::string> attributes = getAttributes( element ); std::map<std::string, std::string> attributes = getAttributes( element );
auto aliasIt = attributes.find( "alias" ); auto aliasIt = attributes.find( "alias" );
if ( aliasIt != attributes.end() ) if ( aliasIt != attributes.end() )
{ {
readEnumAlias( element, attributes, enumData, bitmask, prefix, postfix ); readEnumAlias( element, attributes, enumIt->second );
} }
else else
{ {
readEnum( element, attributes, enumData, bitmask, prefix, postfix ); readEnum( element, attributes, enumIt );
} }
} }
void VulkanHppGenerator::readEnum( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readEnum( tinyxml2::XMLElement const * element,
std::map<std::string, std::string> const & attributes, std::map<std::string, std::string> const & attributes,
EnumData & enumData, std::map<std::string, EnumData>::iterator enumIt )
bool bitmask,
std::string const & prefix,
std::string const & postfix )
{ {
int line = element->GetLineNum(); int line = element->GetLineNum();
checkAttributes( line, attributes, { { "name", {} } }, { { "bitpos", {} }, { "comment", {} }, { "value", {} } } ); checkAttributes( line, attributes, { { "name", {} } }, { { "bitpos", {} }, { "comment", {} }, { "value", {} } } );
@ -12758,22 +12752,19 @@ void VulkanHppGenerator::readEnum( tinyxml2::XMLElement const * el
value = attribute.second; value = attribute.second;
} }
} }
std::string prefix = getEnumSuffixes( enumIt->first, enumIt->second.isBitmask, m_tags ).first;
warn( beginsWith( name, prefix ), warn( beginsWith( name, prefix ),
line, line,
"encountered enum value <" + name + "> that does not begin with expected prefix <" + prefix + ">" ); "encountered enum value <" + name + "> that does not begin with expected prefix <" + prefix + ">" );
std::string tag = findTag( m_tags, name, postfix );
check( bitpos.empty() ^ value.empty(), line, "invalid set of attributes for enum <" + name + ">" ); check( bitpos.empty() ^ value.empty(), line, "invalid set of attributes for enum <" + name + ">" );
enumData.addEnumValue( line, name, bitmask, !bitpos.empty(), prefix, postfix, "", tag ); enumIt->second.addEnumValue( line, name, !bitpos.empty(), "" );
} }
void VulkanHppGenerator::readEnumAlias( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readEnumAlias( tinyxml2::XMLElement const * element,
std::map<std::string, std::string> const & attributes, std::map<std::string, std::string> const & attributes,
EnumData & enumData, EnumData & enumData )
bool bitmask,
std::string const & prefix,
std::string const & postfix )
{ {
int line = element->GetLineNum(); int line = element->GetLineNum();
checkAttributes( line, attributes, { { "alias", {} }, { "name", {} } }, { { "comment", {} } } ); checkAttributes( line, attributes, { { "alias", {} }, { "name", {} } }, { { "comment", {} } } );
@ -12795,8 +12786,7 @@ void VulkanHppGenerator::readEnumAlias( tinyxml2::XMLElement const *
} }
assert( !name.empty() ); assert( !name.empty() );
std::string tag = findTag( m_tags, name, postfix ); enumData.addEnumAlias( line, name, alias );
enumData.addEnumAlias( line, name, alias, generateEnumValueName( name, prefix, postfix, bitmask, tag ) );
} }
void VulkanHppGenerator::readEnumConstant( tinyxml2::XMLElement const * element ) void VulkanHppGenerator::readEnumConstant( tinyxml2::XMLElement const * element )
@ -12876,14 +12866,15 @@ void VulkanHppGenerator::readEnums( tinyxml2::XMLElement const * element )
check( !type.empty(), line, "enum without type" ); check( !type.empty(), line, "enum without type" );
// get the EnumData entry in enum map // get the EnumData entry in enum map
std::map<std::string, EnumData>::iterator it = m_enums.find( name ); std::map<std::string, EnumData>::iterator enumIt = m_enums.find( name );
check( it != m_enums.end(), line, "enum <" + name + "> is not listed as enum in the types section" ); check( enumIt != m_enums.end(), line, "enum <" + name + "> is not listed as enum in the types section" );
check( it->second.values.empty(), line, "enum <" + name + "> already holds values" ); check( enumIt->second.values.empty(), line, "enum <" + name + "> already holds values" );
// mark it as a bitmask, if it is one // mark it as a bitmask, if it is one
bool bitmask = ( type == "bitmask" ); bool bitmask = ( type == "bitmask" );
if ( bitmask ) if ( bitmask )
{ {
check( name.find( "FlagBits" ) != std::string::npos, line, "bitmask <" + name + "> does not contain <FlagBits>" );
auto bitmaskIt = std::find_if( m_bitmasks.begin(), auto bitmaskIt = std::find_if( m_bitmasks.begin(),
m_bitmasks.end(), m_bitmasks.end(),
[&name]( auto const & bitmask ) { return bitmask.second.requirements == name; } ); [&name]( auto const & bitmask ) { return bitmask.second.requirements == name; } );
@ -12895,10 +12886,8 @@ void VulkanHppGenerator::readEnums( tinyxml2::XMLElement const * element )
"enum <" + name + "> is marked with bitwidth <64> but corresponding bitmask <" + bitmaskIt->first + "enum <" + name + "> is marked with bitwidth <64> but corresponding bitmask <" + bitmaskIt->first +
"> is not of type <VkFlags64>" ); "> is not of type <VkFlags64>" );
} }
it->second.isBitmask = bitmask; enumIt->second.isBitmask = bitmask;
std::string prefix = getEnumPrefix( line, name, bitmask );
std::string postfix = getEnumPostfix( name, m_tags, prefix );
// read the names of the enum values // read the names of the enum values
for ( auto child : children ) for ( auto child : children )
{ {
@ -12909,7 +12898,7 @@ void VulkanHppGenerator::readEnums( tinyxml2::XMLElement const * element )
} }
else if ( value == "enum" ) else if ( value == "enum" )
{ {
readEnum( child, it->second, bitmask, prefix, postfix ); readEnum( child, enumIt );
} }
} }
} }
@ -13031,7 +13020,7 @@ void VulkanHppGenerator::readExtension( tinyxml2::XMLElement const * element )
for ( auto child : children ) for ( auto child : children )
{ {
readExtensionRequire( child, pitb.first, tag ); readExtensionRequire( child, pitb.first );
} }
} }
} }
@ -13144,8 +13133,7 @@ void VulkanHppGenerator::readExtensionDisabledType( tinyxml2::XMLElement const *
} }
void VulkanHppGenerator::readExtensionRequire( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readExtensionRequire( tinyxml2::XMLElement const * element,
std::map<std::string, ExtensionData>::iterator extensionIt, std::map<std::string, ExtensionData>::iterator extensionIt )
std::string const & tag )
{ {
int line = element->GetLineNum(); int line = element->GetLineNum();
std::map<std::string, std::string> attributes = getAttributes( element ); std::map<std::string, std::string> attributes = getAttributes( element );
@ -13182,7 +13170,7 @@ void VulkanHppGenerator::readExtensionRequire( tinyxml2::XMLElement const *
} }
else if ( value == "enum" ) else if ( value == "enum" )
{ {
readRequireEnum( child, extensionIt->first, tag ); readRequireEnum( child, extensionIt->first );
} }
else if ( value == "type" ) else if ( value == "type" )
{ {
@ -13340,7 +13328,7 @@ void VulkanHppGenerator::readFeatureRequire( tinyxml2::XMLElement const *
} }
else if ( value == "enum" ) else if ( value == "enum" )
{ {
readRequireEnum( child, "", "" ); readRequireEnum( child, "" );
} }
else if ( value == "type" ) else if ( value == "type" )
{ {
@ -13697,25 +13685,22 @@ void VulkanHppGenerator::readRegistry( tinyxml2::XMLElement const * element )
} }
} }
void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element, std::string const & extension )
std::string const & extension,
std::string const & tag )
{ {
std::map<std::string, std::string> attributes = getAttributes( element ); std::map<std::string, std::string> attributes = getAttributes( element );
if ( attributes.find( "alias" ) != attributes.end() ) if ( attributes.find( "alias" ) != attributes.end() )
{ {
readRequireEnumAlias( element, attributes, tag ); readRequireEnumAlias( element, attributes );
} }
else else
{ {
readRequireEnum( element, attributes, extension, tag ); readRequireEnum( element, attributes, extension );
} }
} }
void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const * element,
std::map<std::string, std::string> const & attributes, std::map<std::string, std::string> const & attributes,
std::string const & extension, std::string const & extension )
std::string const & tag )
{ {
int line = element->GetLineNum(); int line = element->GetLineNum();
checkAttributes( line, checkAttributes( line,
@ -13773,16 +13758,12 @@ void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const *
auto enumIt = m_enums.find( extends ); auto enumIt = m_enums.find( extends );
check( enumIt != m_enums.end(), line, "feature extends unknown enum <" + extends + ">" ); check( enumIt != m_enums.end(), line, "feature extends unknown enum <" + extends + ">" );
std::string prefix = getEnumPrefix( element->GetLineNum(), enumIt->first, enumIt->second.isBitmask );
std::string postfix = getEnumPostfix( enumIt->first, m_tags, prefix );
// add this enum name to the list of values // add this enum name to the list of values
check( bitpos.empty() + offset.empty() + value.empty() == 2, check( bitpos.empty() + offset.empty() + value.empty() == 2,
line, line,
"exactly one out of bitpos = <" + bitpos + ">, offset = <" + offset + ">, and value = <" + value + "exactly one out of bitpos = <" + bitpos + ">, offset = <" + offset + ">, and value = <" + value +
"> are supposed to be empty" ); "> are supposed to be empty" );
enumIt->second.addEnumValue( enumIt->second.addEnumValue( element->GetLineNum(), name, !bitpos.empty(), extension );
element->GetLineNum(), name, enumIt->second.isBitmask, !bitpos.empty(), prefix, postfix, extension, tag );
} }
else if ( value.empty() ) else if ( value.empty() )
{ {
@ -13791,8 +13772,7 @@ void VulkanHppGenerator::readRequireEnum( tinyxml2::XMLElement const *
} }
void VulkanHppGenerator::readRequireEnumAlias( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readRequireEnumAlias( tinyxml2::XMLElement const * element,
std::map<std::string, std::string> const & attributes, std::map<std::string, std::string> const & attributes )
std::string const & tag )
{ {
int line = element->GetLineNum(); int line = element->GetLineNum();
checkAttributes( line, attributes, { { "alias", {} }, { "extends", {} }, { "name", {} } }, { { "comment", {} } } ); checkAttributes( line, attributes, { { "alias", {} }, { "extends", {} }, { "name", {} } }, { { "comment", {} } } );
@ -13818,22 +13798,8 @@ void VulkanHppGenerator::readRequireEnumAlias( tinyxml2::XMLElement const *
auto enumIt = m_enums.find( extends ); auto enumIt = m_enums.find( extends );
check( enumIt != m_enums.end(), line, "feature extends unknown enum <" + extends + ">" ); check( enumIt != m_enums.end(), line, "feature extends unknown enum <" + extends + ">" );
std::string prefix = getEnumPrefix( element->GetLineNum(), enumIt->first, enumIt->second.isBitmask );
std::string postfix = getEnumPostfix( enumIt->first, m_tags, prefix );
// add this enum name to the list of aliases // add this enum name to the list of aliases
std::string valueName = generateEnumValueName( name, prefix, postfix, enumIt->second.isBitmask, tag ); enumIt->second.addEnumAlias( line, name, alias );
if ( !enumIt->second.alias.empty() )
{
prefix = getEnumPrefix( element->GetLineNum(), enumIt->second.alias, enumIt->second.isBitmask );
postfix = getEnumPostfix( enumIt->second.alias, m_tags, prefix );
if ( endsWith( name, postfix ) )
{
valueName = generateEnumValueName( name, prefix, postfix, enumIt->second.isBitmask, tag );
}
}
enumIt->second.addEnumAlias( line, name, alias, valueName );
} }
void VulkanHppGenerator::readRequires( tinyxml2::XMLElement const * element, void VulkanHppGenerator::readRequires( tinyxml2::XMLElement const * element,

View File

@ -132,48 +132,29 @@ private:
struct EnumAliasData struct EnumAliasData
{ {
EnumAliasData( std::string const & name_, std::string const & translatedName_, int line ) EnumAliasData( std::string const & name_, int line ) : name( name_ ), xmlLine( line ) {}
: name( name_ ), translatedName( translatedName_ ), xmlLine( line )
{}
std::string name; // the original name std::string name;
std::string translatedName; // the name translated into vk-namespace
int xmlLine; int xmlLine;
}; };
struct EnumValueData struct EnumValueData
{ {
EnumValueData( int line, EnumValueData( int line, std::string const & name_, std::string const & extension_, bool singleBit_ )
std::string const & name_, : name( name_ ), extension( extension_ ), singleBit( singleBit_ ), xmlLine( line )
std::string const & extension_,
bool singleBit_,
std::string const & translatedName_ )
: name( name_ )
, extension( extension_ )
, singleBit( singleBit_ )
, translatedName( translatedName_ )
, xmlLine( line )
{} {}
std::string name; // the original name std::string name;
std::string extension; std::string extension;
bool singleBit; bool singleBit;
std::string translatedName; // the name translated into vk-namespace
int xmlLine; int xmlLine;
}; };
struct EnumData struct EnumData
{ {
EnumData( int line ) : xmlLine( line ) {} EnumData( int line ) : xmlLine( line ) {}
void addEnumAlias( int line, std::string const & name, std::string const & alias, std::string const & vkName ); void addEnumAlias( int line, std::string const & name, std::string const & alias );
void addEnumValue( int line, void addEnumValue( int line, std::string const & valueName, bool bitpos, std::string const & extension );
std::string const & valueName,
bool bitmask,
bool bitpos,
std::string const & prefix,
std::string const & postfix,
std::string const & extension,
std::string const & tag );
std::string alias; // alias for this enum std::string alias; // alias for this enum
std::map<std::string, EnumAliasData> aliases; std::map<std::string, EnumAliasData> aliases;
@ -519,7 +500,8 @@ private:
void appendEnumInitializer( std::string & str, void appendEnumInitializer( std::string & str,
TypeInfo const & type, TypeInfo const & type,
std::vector<std::string> const & arraySizes, std::vector<std::string> const & arraySizes,
std::vector<EnumValueData> const & values ) const; std::vector<EnumValueData> const & values,
bool bitmask ) const;
void appendEnumToString( std::string & str, std::pair<std::string, EnumData> const & enumData ) const; void appendEnumToString( std::string & str, std::pair<std::string, EnumData> const & enumData ) const;
std::string appendFunctionBodyEnhancedLocalReturnVariable( std::string & str, std::string appendFunctionBodyEnhancedLocalReturnVariable( std::string & str,
std::string const & indentation, std::string const & indentation,
@ -1123,7 +1105,6 @@ private:
std::string const & structName, std::string const & structName,
std::string const & prefix, std::string const & prefix,
bool mutualExclusiveLens ) const; bool mutualExclusiveLens ) const;
std::string getEnumPrefix( int line, std::string const & name, bool bitmask ) const;
std::string getPlatform( std::string const & extension ) const; std::string getPlatform( std::string const & extension ) const;
std::pair<std::string, std::string> getPoolTypeAndName( std::string const & type ) const; std::pair<std::string, std::string> getPoolTypeAndName( std::string const & type ) const;
std::string getVectorSize( std::vector<ParamData> const & params, std::string getVectorSize( std::vector<ParamData> const & params,
@ -1150,23 +1131,13 @@ private:
void readCommands( tinyxml2::XMLElement const * element ); void readCommands( tinyxml2::XMLElement const * element );
std::string readComment( tinyxml2::XMLElement const * element ); std::string readComment( tinyxml2::XMLElement const * element );
void readDefine( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes ); void readDefine( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
void readEnum( tinyxml2::XMLElement const * element, void readEnum( tinyxml2::XMLElement const * element, std::map<std::string, EnumData>::iterator enumIt );
EnumData & enumData,
bool bitmask,
std::string const & prefix,
std::string const & postfix );
void readEnum( tinyxml2::XMLElement const * element, void readEnum( tinyxml2::XMLElement const * element,
std::map<std::string, std::string> const & attributes, std::map<std::string, std::string> const & attributes,
EnumData & enumData, std::map<std::string, EnumData>::iterator enumIt );
bool bitmask,
std::string const & prefix,
std::string const & postfix );
void readEnumAlias( tinyxml2::XMLElement const * element, void readEnumAlias( tinyxml2::XMLElement const * element,
std::map<std::string, std::string> const & attributes, std::map<std::string, std::string> const & attributes,
EnumData & enumData, EnumData & enumData );
bool bitmask,
std::string const & prefix,
std::string const & postfix );
void readEnumConstant( tinyxml2::XMLElement const * element ); void readEnumConstant( tinyxml2::XMLElement const * element );
void readEnums( tinyxml2::XMLElement const * element ); void readEnums( tinyxml2::XMLElement const * element );
void readExtension( tinyxml2::XMLElement const * element ); void readExtension( tinyxml2::XMLElement const * element );
@ -1174,8 +1145,7 @@ private:
void readExtensionDisabledRequire( tinyxml2::XMLElement const * element ); void readExtensionDisabledRequire( tinyxml2::XMLElement const * element );
void readExtensionDisabledType( tinyxml2::XMLElement const * element ); void readExtensionDisabledType( tinyxml2::XMLElement const * element );
void readExtensionRequire( tinyxml2::XMLElement const * element, void readExtensionRequire( tinyxml2::XMLElement const * element,
std::map<std::string, ExtensionData>::iterator extensionIt, std::map<std::string, ExtensionData>::iterator extensionIt );
std::string const & tag );
void readExtensionRequireCommand( tinyxml2::XMLElement const * element, void readExtensionRequireCommand( tinyxml2::XMLElement const * element,
std::map<std::string, ExtensionData>::iterator extensionIt ); std::map<std::string, ExtensionData>::iterator extensionIt );
void readExtensionRequireType( tinyxml2::XMLElement const * element, void readExtensionRequireType( tinyxml2::XMLElement const * element,
@ -1194,14 +1164,12 @@ private:
void readPlatform( tinyxml2::XMLElement const * element ); void readPlatform( tinyxml2::XMLElement const * element );
void readPlatforms( tinyxml2::XMLElement const * element ); void readPlatforms( tinyxml2::XMLElement const * element );
void readRegistry( tinyxml2::XMLElement const * element ); void readRegistry( tinyxml2::XMLElement const * element );
void readRequireEnum( tinyxml2::XMLElement const * element, std::string const & extension, std::string const & tag ); void readRequireEnum( tinyxml2::XMLElement const * element, std::string const & extension );
void readRequireEnum( tinyxml2::XMLElement const * element, void readRequireEnum( tinyxml2::XMLElement const * element,
std::map<std::string, std::string> const & attributes, std::map<std::string, std::string> const & attributes,
std::string const & extension, std::string const & extension );
std::string const & tag ); void readRequireEnumAlias( tinyxml2::XMLElement const * element,
void readRequireEnumAlias( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
std::map<std::string, std::string> const & attributes,
std::string const & tag );
void readRequires( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes ); void readRequires( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
void readSPIRVCapability( tinyxml2::XMLElement const * element ); void readSPIRVCapability( tinyxml2::XMLElement const * element );
void readSPIRVCapabilityEnable( tinyxml2::XMLElement const * element ); void readSPIRVCapabilityEnable( tinyxml2::XMLElement const * element );

View File

@ -6394,8 +6394,8 @@ namespace VULKAN_HPP_NAMESPACE
eSemaphoreSubmitInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR, eSemaphoreSubmitInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR,
eCommandBufferSubmitInfoKHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR, eCommandBufferSubmitInfoKHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR,
ePhysicalDeviceSynchronization2FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR, ePhysicalDeviceSynchronization2FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR,
eQueueFamilyCheckpointProperties2Nv = VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV, eQueueFamilyCheckpointProperties2NV = VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV,
eCheckpointData2Nv = VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV, eCheckpointData2NV = VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV,
ePhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = ePhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR,
ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV = ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV =
@ -7269,8 +7269,8 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eCommandBufferSubmitInfoKHR: return "CommandBufferSubmitInfoKHR"; case StructureType::eCommandBufferSubmitInfoKHR: return "CommandBufferSubmitInfoKHR";
case StructureType::ePhysicalDeviceSynchronization2FeaturesKHR: case StructureType::ePhysicalDeviceSynchronization2FeaturesKHR:
return "PhysicalDeviceSynchronization2FeaturesKHR"; return "PhysicalDeviceSynchronization2FeaturesKHR";
case StructureType::eQueueFamilyCheckpointProperties2Nv: return "QueueFamilyCheckpointProperties2Nv"; case StructureType::eQueueFamilyCheckpointProperties2NV: return "QueueFamilyCheckpointProperties2NV";
case StructureType::eCheckpointData2Nv: return "CheckpointData2Nv"; case StructureType::eCheckpointData2NV: return "CheckpointData2NV";
case StructureType::ePhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR: case StructureType::ePhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR:
return "PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR"; return "PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR";
case StructureType::ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV: case StructureType::ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV:
@ -10521,8 +10521,7 @@ namespace VULKAN_HPP_NAMESPACE
eMesaLlvmpipe = VK_DRIVER_ID_MESA_LLVMPIPE, eMesaLlvmpipe = VK_DRIVER_ID_MESA_LLVMPIPE,
eMoltenvk = VK_DRIVER_ID_MOLTENVK, eMoltenvk = VK_DRIVER_ID_MOLTENVK,
eCoreaviProprietary = VK_DRIVER_ID_COREAVI_PROPRIETARY, eCoreaviProprietary = VK_DRIVER_ID_COREAVI_PROPRIETARY,
eJuiceProprietary = VK_DRIVER_ID_JUICE_PROPRIETARY, eJuiceProprietary = VK_DRIVER_ID_JUICE_PROPRIETARY
eIntelOpenSourceMesa = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR
}; };
using DriverIdKHR = DriverId; using DriverIdKHR = DriverId;
@ -12641,18 +12640,18 @@ namespace VULKAN_HPP_NAMESPACE
eVideoDecode = VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR, eVideoDecode = VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR,
eVideoEncode = VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR, eVideoEncode = VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR,
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
eTransformFeedbackExt = VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, eTransformFeedbackEXT = VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT,
eConditionalRenderingExt = VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, eConditionalRenderingEXT = VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT,
eCommandPreprocessNv = VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV, eCommandPreprocessNV = VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV,
eFragmentShadingRateAttachment = VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eFragmentShadingRateAttachment = VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
eAccelerationStructureBuild = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, eAccelerationStructureBuild = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR,
eRayTracingShader = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, eRayTracingShader = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR,
eFragmentDensityProcessExt = VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, eFragmentDensityProcessEXT = VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT,
eTaskShaderNv = VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV, eTaskShaderNV = VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV,
eMeshShaderNv = VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV, eMeshShaderNV = VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV,
eAccelerationStructureBuildNv = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV, eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV,
eRayTracingShaderNv = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV, eRayTracingShaderNV = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV,
eShadingRateImageNv = VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, eShadingRateImageNV = VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV,
eTransfer = VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR eTransfer = VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR
}; };
@ -12689,15 +12688,15 @@ namespace VULKAN_HPP_NAMESPACE
case PipelineStageFlagBits2KHR::eVideoDecode: return "VideoDecode"; case PipelineStageFlagBits2KHR::eVideoDecode: return "VideoDecode";
case PipelineStageFlagBits2KHR::eVideoEncode: return "VideoEncode"; case PipelineStageFlagBits2KHR::eVideoEncode: return "VideoEncode";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
case PipelineStageFlagBits2KHR::eTransformFeedbackExt: return "TransformFeedbackExt"; case PipelineStageFlagBits2KHR::eTransformFeedbackEXT: return "TransformFeedbackEXT";
case PipelineStageFlagBits2KHR::eConditionalRenderingExt: return "ConditionalRenderingExt"; case PipelineStageFlagBits2KHR::eConditionalRenderingEXT: return "ConditionalRenderingEXT";
case PipelineStageFlagBits2KHR::eCommandPreprocessNv: return "CommandPreprocessNv"; case PipelineStageFlagBits2KHR::eCommandPreprocessNV: return "CommandPreprocessNV";
case PipelineStageFlagBits2KHR::eFragmentShadingRateAttachment: return "FragmentShadingRateAttachment"; case PipelineStageFlagBits2KHR::eFragmentShadingRateAttachment: return "FragmentShadingRateAttachment";
case PipelineStageFlagBits2KHR::eAccelerationStructureBuild: return "AccelerationStructureBuild"; case PipelineStageFlagBits2KHR::eAccelerationStructureBuild: return "AccelerationStructureBuild";
case PipelineStageFlagBits2KHR::eRayTracingShader: return "RayTracingShader"; case PipelineStageFlagBits2KHR::eRayTracingShader: return "RayTracingShader";
case PipelineStageFlagBits2KHR::eFragmentDensityProcessExt: return "FragmentDensityProcessExt"; case PipelineStageFlagBits2KHR::eFragmentDensityProcessEXT: return "FragmentDensityProcessEXT";
case PipelineStageFlagBits2KHR::eTaskShaderNv: return "TaskShaderNv"; case PipelineStageFlagBits2KHR::eTaskShaderNV: return "TaskShaderNV";
case PipelineStageFlagBits2KHR::eMeshShaderNv: return "MeshShaderNv"; case PipelineStageFlagBits2KHR::eMeshShaderNV: return "MeshShaderNV";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
} }
} }
@ -12731,20 +12730,20 @@ namespace VULKAN_HPP_NAMESPACE
eVideoEncodeRead = VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, eVideoEncodeRead = VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR,
eVideoEncodeWrite = VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, eVideoEncodeWrite = VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR,
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
eTransformFeedbackWriteExt = VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, eTransformFeedbackWriteEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT,
eTransformFeedbackCounterReadExt = VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, eTransformFeedbackCounterReadEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT,
eTransformFeedbackCounterWriteExt = VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, eTransformFeedbackCounterWriteEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT,
eConditionalRenderingReadExt = VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, eConditionalRenderingReadEXT = VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT,
eCommandPreprocessReadNv = VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, eCommandPreprocessReadNV = VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV,
eCommandPreprocessWriteNv = VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, eCommandPreprocessWriteNV = VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV,
eFragmentShadingRateAttachmentRead = VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, eFragmentShadingRateAttachmentRead = VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR,
eAccelerationStructureRead = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, eAccelerationStructureRead = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR,
eAccelerationStructureWrite = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, eAccelerationStructureWrite = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR,
eFragmentDensityMapReadExt = VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, eFragmentDensityMapReadEXT = VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT,
eColorAttachmentReadNoncoherentExt = VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, eColorAttachmentReadNoncoherentEXT = VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT,
eAccelerationStructureReadNv = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV, eAccelerationStructureReadNV = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV,
eAccelerationStructureWriteNv = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV, eAccelerationStructureWriteNV = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV,
eShadingRateImageReadNv = VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV eShadingRateImageReadNV = VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV
}; };
VULKAN_HPP_INLINE std::string to_string( AccessFlagBits2KHR value ) VULKAN_HPP_INLINE std::string to_string( AccessFlagBits2KHR value )
@ -12778,17 +12777,17 @@ namespace VULKAN_HPP_NAMESPACE
case AccessFlagBits2KHR::eVideoEncodeRead: return "VideoEncodeRead"; case AccessFlagBits2KHR::eVideoEncodeRead: return "VideoEncodeRead";
case AccessFlagBits2KHR::eVideoEncodeWrite: return "VideoEncodeWrite"; case AccessFlagBits2KHR::eVideoEncodeWrite: return "VideoEncodeWrite";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
case AccessFlagBits2KHR::eTransformFeedbackWriteExt: return "TransformFeedbackWriteExt"; case AccessFlagBits2KHR::eTransformFeedbackWriteEXT: return "TransformFeedbackWriteEXT";
case AccessFlagBits2KHR::eTransformFeedbackCounterReadExt: return "TransformFeedbackCounterReadExt"; case AccessFlagBits2KHR::eTransformFeedbackCounterReadEXT: return "TransformFeedbackCounterReadEXT";
case AccessFlagBits2KHR::eTransformFeedbackCounterWriteExt: return "TransformFeedbackCounterWriteExt"; case AccessFlagBits2KHR::eTransformFeedbackCounterWriteEXT: return "TransformFeedbackCounterWriteEXT";
case AccessFlagBits2KHR::eConditionalRenderingReadExt: return "ConditionalRenderingReadExt"; case AccessFlagBits2KHR::eConditionalRenderingReadEXT: return "ConditionalRenderingReadEXT";
case AccessFlagBits2KHR::eCommandPreprocessReadNv: return "CommandPreprocessReadNv"; case AccessFlagBits2KHR::eCommandPreprocessReadNV: return "CommandPreprocessReadNV";
case AccessFlagBits2KHR::eCommandPreprocessWriteNv: return "CommandPreprocessWriteNv"; case AccessFlagBits2KHR::eCommandPreprocessWriteNV: return "CommandPreprocessWriteNV";
case AccessFlagBits2KHR::eFragmentShadingRateAttachmentRead: return "FragmentShadingRateAttachmentRead"; case AccessFlagBits2KHR::eFragmentShadingRateAttachmentRead: return "FragmentShadingRateAttachmentRead";
case AccessFlagBits2KHR::eAccelerationStructureRead: return "AccelerationStructureRead"; case AccessFlagBits2KHR::eAccelerationStructureRead: return "AccelerationStructureRead";
case AccessFlagBits2KHR::eAccelerationStructureWrite: return "AccelerationStructureWrite"; case AccessFlagBits2KHR::eAccelerationStructureWrite: return "AccelerationStructureWrite";
case AccessFlagBits2KHR::eFragmentDensityMapReadExt: return "FragmentDensityMapReadExt"; case AccessFlagBits2KHR::eFragmentDensityMapReadEXT: return "FragmentDensityMapReadEXT";
case AccessFlagBits2KHR::eColorAttachmentReadNoncoherentExt: return "ColorAttachmentReadNoncoherentExt"; case AccessFlagBits2KHR::eColorAttachmentReadNoncoherentEXT: return "ColorAttachmentReadNoncoherentEXT";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
} }
} }
@ -19193,14 +19192,14 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS ) #if defined( VK_ENABLE_BETA_EXTENSIONS )
| VkFlags64( PipelineStageFlagBits2KHR::eVideoDecode ) | VkFlags64( PipelineStageFlagBits2KHR::eVideoEncode ) | VkFlags64( PipelineStageFlagBits2KHR::eVideoDecode ) | VkFlags64( PipelineStageFlagBits2KHR::eVideoEncode )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags64( PipelineStageFlagBits2KHR::eTransformFeedbackExt ) | | VkFlags64( PipelineStageFlagBits2KHR::eTransformFeedbackEXT ) |
VkFlags64( PipelineStageFlagBits2KHR::eConditionalRenderingExt ) | VkFlags64( PipelineStageFlagBits2KHR::eConditionalRenderingEXT ) |
VkFlags64( PipelineStageFlagBits2KHR::eCommandPreprocessNv ) | VkFlags64( PipelineStageFlagBits2KHR::eCommandPreprocessNV ) |
VkFlags64( PipelineStageFlagBits2KHR::eFragmentShadingRateAttachment ) | VkFlags64( PipelineStageFlagBits2KHR::eFragmentShadingRateAttachment ) |
VkFlags64( PipelineStageFlagBits2KHR::eAccelerationStructureBuild ) | VkFlags64( PipelineStageFlagBits2KHR::eAccelerationStructureBuild ) |
VkFlags64( PipelineStageFlagBits2KHR::eRayTracingShader ) | VkFlags64( PipelineStageFlagBits2KHR::eRayTracingShader ) |
VkFlags64( PipelineStageFlagBits2KHR::eFragmentDensityProcessExt ) | VkFlags64( PipelineStageFlagBits2KHR::eFragmentDensityProcessEXT ) |
VkFlags64( PipelineStageFlagBits2KHR::eTaskShaderNv ) | VkFlags64( PipelineStageFlagBits2KHR::eMeshShaderNv ) VkFlags64( PipelineStageFlagBits2KHR::eTaskShaderNV ) | VkFlags64( PipelineStageFlagBits2KHR::eMeshShaderNV )
}; };
}; };
@ -19290,24 +19289,24 @@ namespace VULKAN_HPP_NAMESPACE
if ( value & PipelineStageFlagBits2KHR::eVideoEncode ) if ( value & PipelineStageFlagBits2KHR::eVideoEncode )
result += "VideoEncode | "; result += "VideoEncode | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
if ( value & PipelineStageFlagBits2KHR::eTransformFeedbackExt ) if ( value & PipelineStageFlagBits2KHR::eTransformFeedbackEXT )
result += "TransformFeedbackExt | "; result += "TransformFeedbackEXT | ";
if ( value & PipelineStageFlagBits2KHR::eConditionalRenderingExt ) if ( value & PipelineStageFlagBits2KHR::eConditionalRenderingEXT )
result += "ConditionalRenderingExt | "; result += "ConditionalRenderingEXT | ";
if ( value & PipelineStageFlagBits2KHR::eCommandPreprocessNv ) if ( value & PipelineStageFlagBits2KHR::eCommandPreprocessNV )
result += "CommandPreprocessNv | "; result += "CommandPreprocessNV | ";
if ( value & PipelineStageFlagBits2KHR::eFragmentShadingRateAttachment ) if ( value & PipelineStageFlagBits2KHR::eFragmentShadingRateAttachment )
result += "FragmentShadingRateAttachment | "; result += "FragmentShadingRateAttachment | ";
if ( value & PipelineStageFlagBits2KHR::eAccelerationStructureBuild ) if ( value & PipelineStageFlagBits2KHR::eAccelerationStructureBuild )
result += "AccelerationStructureBuild | "; result += "AccelerationStructureBuild | ";
if ( value & PipelineStageFlagBits2KHR::eRayTracingShader ) if ( value & PipelineStageFlagBits2KHR::eRayTracingShader )
result += "RayTracingShader | "; result += "RayTracingShader | ";
if ( value & PipelineStageFlagBits2KHR::eFragmentDensityProcessExt ) if ( value & PipelineStageFlagBits2KHR::eFragmentDensityProcessEXT )
result += "FragmentDensityProcessExt | "; result += "FragmentDensityProcessEXT | ";
if ( value & PipelineStageFlagBits2KHR::eTaskShaderNv ) if ( value & PipelineStageFlagBits2KHR::eTaskShaderNV )
result += "TaskShaderNv | "; result += "TaskShaderNV | ";
if ( value & PipelineStageFlagBits2KHR::eMeshShaderNv ) if ( value & PipelineStageFlagBits2KHR::eMeshShaderNV )
result += "MeshShaderNv | "; result += "MeshShaderNV | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }"; return "{ " + result.substr( 0, result.size() - 3 ) + " }";
} }
@ -19334,17 +19333,17 @@ namespace VULKAN_HPP_NAMESPACE
| VkFlags64( AccessFlagBits2KHR::eVideoDecodeRead ) | VkFlags64( AccessFlagBits2KHR::eVideoDecodeWrite ) | | VkFlags64( AccessFlagBits2KHR::eVideoDecodeRead ) | VkFlags64( AccessFlagBits2KHR::eVideoDecodeWrite ) |
VkFlags64( AccessFlagBits2KHR::eVideoEncodeRead ) | VkFlags64( AccessFlagBits2KHR::eVideoEncodeWrite ) VkFlags64( AccessFlagBits2KHR::eVideoEncodeRead ) | VkFlags64( AccessFlagBits2KHR::eVideoEncodeWrite )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
| VkFlags64( AccessFlagBits2KHR::eTransformFeedbackWriteExt ) | | VkFlags64( AccessFlagBits2KHR::eTransformFeedbackWriteEXT ) |
VkFlags64( AccessFlagBits2KHR::eTransformFeedbackCounterReadExt ) | VkFlags64( AccessFlagBits2KHR::eTransformFeedbackCounterReadEXT ) |
VkFlags64( AccessFlagBits2KHR::eTransformFeedbackCounterWriteExt ) | VkFlags64( AccessFlagBits2KHR::eTransformFeedbackCounterWriteEXT ) |
VkFlags64( AccessFlagBits2KHR::eConditionalRenderingReadExt ) | VkFlags64( AccessFlagBits2KHR::eConditionalRenderingReadEXT ) |
VkFlags64( AccessFlagBits2KHR::eCommandPreprocessReadNv ) | VkFlags64( AccessFlagBits2KHR::eCommandPreprocessReadNV ) |
VkFlags64( AccessFlagBits2KHR::eCommandPreprocessWriteNv ) | VkFlags64( AccessFlagBits2KHR::eCommandPreprocessWriteNV ) |
VkFlags64( AccessFlagBits2KHR::eFragmentShadingRateAttachmentRead ) | VkFlags64( AccessFlagBits2KHR::eFragmentShadingRateAttachmentRead ) |
VkFlags64( AccessFlagBits2KHR::eAccelerationStructureRead ) | VkFlags64( AccessFlagBits2KHR::eAccelerationStructureRead ) |
VkFlags64( AccessFlagBits2KHR::eAccelerationStructureWrite ) | VkFlags64( AccessFlagBits2KHR::eAccelerationStructureWrite ) |
VkFlags64( AccessFlagBits2KHR::eFragmentDensityMapReadExt ) | VkFlags64( AccessFlagBits2KHR::eFragmentDensityMapReadEXT ) |
VkFlags64( AccessFlagBits2KHR::eColorAttachmentReadNoncoherentExt ) VkFlags64( AccessFlagBits2KHR::eColorAttachmentReadNoncoherentEXT )
}; };
}; };
@ -19433,28 +19432,28 @@ namespace VULKAN_HPP_NAMESPACE
if ( value & AccessFlagBits2KHR::eVideoEncodeWrite ) if ( value & AccessFlagBits2KHR::eVideoEncodeWrite )
result += "VideoEncodeWrite | "; result += "VideoEncodeWrite | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/ #endif /*VK_ENABLE_BETA_EXTENSIONS*/
if ( value & AccessFlagBits2KHR::eTransformFeedbackWriteExt ) if ( value & AccessFlagBits2KHR::eTransformFeedbackWriteEXT )
result += "TransformFeedbackWriteExt | "; result += "TransformFeedbackWriteEXT | ";
if ( value & AccessFlagBits2KHR::eTransformFeedbackCounterReadExt ) if ( value & AccessFlagBits2KHR::eTransformFeedbackCounterReadEXT )
result += "TransformFeedbackCounterReadExt | "; result += "TransformFeedbackCounterReadEXT | ";
if ( value & AccessFlagBits2KHR::eTransformFeedbackCounterWriteExt ) if ( value & AccessFlagBits2KHR::eTransformFeedbackCounterWriteEXT )
result += "TransformFeedbackCounterWriteExt | "; result += "TransformFeedbackCounterWriteEXT | ";
if ( value & AccessFlagBits2KHR::eConditionalRenderingReadExt ) if ( value & AccessFlagBits2KHR::eConditionalRenderingReadEXT )
result += "ConditionalRenderingReadExt | "; result += "ConditionalRenderingReadEXT | ";
if ( value & AccessFlagBits2KHR::eCommandPreprocessReadNv ) if ( value & AccessFlagBits2KHR::eCommandPreprocessReadNV )
result += "CommandPreprocessReadNv | "; result += "CommandPreprocessReadNV | ";
if ( value & AccessFlagBits2KHR::eCommandPreprocessWriteNv ) if ( value & AccessFlagBits2KHR::eCommandPreprocessWriteNV )
result += "CommandPreprocessWriteNv | "; result += "CommandPreprocessWriteNV | ";
if ( value & AccessFlagBits2KHR::eFragmentShadingRateAttachmentRead ) if ( value & AccessFlagBits2KHR::eFragmentShadingRateAttachmentRead )
result += "FragmentShadingRateAttachmentRead | "; result += "FragmentShadingRateAttachmentRead | ";
if ( value & AccessFlagBits2KHR::eAccelerationStructureRead ) if ( value & AccessFlagBits2KHR::eAccelerationStructureRead )
result += "AccelerationStructureRead | "; result += "AccelerationStructureRead | ";
if ( value & AccessFlagBits2KHR::eAccelerationStructureWrite ) if ( value & AccessFlagBits2KHR::eAccelerationStructureWrite )
result += "AccelerationStructureWrite | "; result += "AccelerationStructureWrite | ";
if ( value & AccessFlagBits2KHR::eFragmentDensityMapReadExt ) if ( value & AccessFlagBits2KHR::eFragmentDensityMapReadEXT )
result += "FragmentDensityMapReadExt | "; result += "FragmentDensityMapReadEXT | ";
if ( value & AccessFlagBits2KHR::eColorAttachmentReadNoncoherentExt ) if ( value & AccessFlagBits2KHR::eColorAttachmentReadNoncoherentEXT )
result += "ColorAttachmentReadNoncoherentExt | "; result += "ColorAttachmentReadNoncoherentEXT | ";
return "{ " + result.substr( 0, result.size() - 3 ) + " }"; return "{ " + result.substr( 0, result.size() - 3 ) + " }";
} }
@ -29108,7 +29107,7 @@ namespace VULKAN_HPP_NAMESPACE
struct CheckpointData2NV struct CheckpointData2NV
{ {
static const bool allowDuplicate = false; static const bool allowDuplicate = false;
static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCheckpointData2Nv; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCheckpointData2NV;
#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) #if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
VULKAN_HPP_CONSTEXPR CheckpointData2NV( VULKAN_HPP_NAMESPACE::PipelineStageFlags2KHR stage_ = {}, VULKAN_HPP_CONSTEXPR CheckpointData2NV( VULKAN_HPP_NAMESPACE::PipelineStageFlags2KHR stage_ = {},
@ -29159,7 +29158,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif #endif
public: public:
VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCheckpointData2Nv; VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCheckpointData2NV;
void * pNext = {}; void * pNext = {};
VULKAN_HPP_NAMESPACE::PipelineStageFlags2KHR stage = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2KHR stage = {};
void * pCheckpointMarker = {}; void * pCheckpointMarker = {};
@ -29169,7 +29168,7 @@ namespace VULKAN_HPP_NAMESPACE
static_assert( std::is_standard_layout<CheckpointData2NV>::value, "struct wrapper is not a standard layout!" ); static_assert( std::is_standard_layout<CheckpointData2NV>::value, "struct wrapper is not a standard layout!" );
template <> template <>
struct CppType<StructureType, StructureType::eCheckpointData2Nv> struct CppType<StructureType, StructureType::eCheckpointData2NV>
{ {
using Type = CheckpointData2NV; using Type = CheckpointData2NV;
}; };
@ -93488,7 +93487,7 @@ namespace VULKAN_HPP_NAMESPACE
{ {
static const bool allowDuplicate = false; static const bool allowDuplicate = false;
static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
StructureType::eQueueFamilyCheckpointProperties2Nv; StructureType::eQueueFamilyCheckpointProperties2NV;
#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) #if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointProperties2NV( VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointProperties2NV(
@ -93540,7 +93539,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif #endif
public: public:
VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyCheckpointProperties2Nv; VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyCheckpointProperties2NV;
void * pNext = {}; void * pNext = {};
VULKAN_HPP_NAMESPACE::PipelineStageFlags2KHR checkpointExecutionStageMask = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2KHR checkpointExecutionStageMask = {};
}; };
@ -93550,7 +93549,7 @@ namespace VULKAN_HPP_NAMESPACE
"struct wrapper is not a standard layout!" ); "struct wrapper is not a standard layout!" );
template <> template <>
struct CppType<StructureType, StructureType::eQueueFamilyCheckpointProperties2Nv> struct CppType<StructureType, StructureType::eQueueFamilyCheckpointProperties2NV>
{ {
using Type = QueueFamilyCheckpointProperties2NV; using Type = QueueFamilyCheckpointProperties2NV;
}; };