@@ -5882,7 +5882,8 @@ std::string VulkanHppGenerator::generateDispatchLoaderDynamicDeviceCommandAssign
58825882 [&]( NameLine const & command, auto const & commandData )
58835883 {
58845884 // ignore vkGetDeviceProcAddr as it is already part of instance command assignments
5885- if ( !listedCommands.contains( command.name ) && ( command.name != "vkGetDeviceProcAddr" ) && !commandData.second.handle.empty() && isDeviceCommand( commandData.second ) )
5885+ if ( !listedCommands.contains( command.name ) && ( command.name != "vkGetDeviceProcAddr" ) && !commandData.second.handle.empty() &&
5886+ isDeviceCommand( commandData.second ) )
58865887 {
58875888 deviceCommandAssignments += generateDispatchLoaderDynamicCommandAssignment( command.name, commandData.first, "device" );
58885889 }
@@ -13069,6 +13070,30 @@ VulkanHppGenerator::DeprecatedCommandData VulkanHppGenerator::readDeprecatedComm
1306913070 return { name, supersededBy };
1307013071}
1307113072
13073+ VulkanHppGenerator::DeprecatedFeatureData VulkanHppGenerator::readDeprecatedFeature( tinyxml2::XMLElement const * element ) const
13074+ {
13075+ int const line = element->GetLineNum();
13076+ std::map<std::string, std::string> attributes = getAttributes( element );
13077+ checkAttributes( line, attributes, { { "name", {} } }, { { "struct", {} } } );
13078+ checkElements( line, getChildElements( element ), {} );
13079+
13080+ std::string name, structure;
13081+ for ( auto const & attribute : attributes )
13082+ {
13083+ if ( attribute.first == "name" )
13084+ {
13085+ name = attribute.second;
13086+ }
13087+ else
13088+ {
13089+ assert( attribute.first == "struct" );
13090+ structure = attribute.second;
13091+ }
13092+ }
13093+
13094+ return { name, structure };
13095+ }
13096+
1307213097VulkanHppGenerator::DeprecatedTypeData VulkanHppGenerator::readDeprecatedType( tinyxml2::XMLElement const * element ) const
1307313098{
1307413099 int const line = element->GetLineNum();
@@ -13099,7 +13124,7 @@ VulkanHppGenerator::DeprecateData VulkanHppGenerator::readDeprecateData( tinyxml
1309913124 std::map<std::string, std::string> attributes = getAttributes( element );
1310013125 checkAttributes( line, attributes, { { "explanationlink", {} } }, {} );
1310113126 std::vector<tinyxml2::XMLElement const *> children = getChildElements( element );
13102- checkElements( line, children, {}, { { "command", MultipleAllowed::Yes }, { "type", MultipleAllowed::Yes } } );
13127+ checkElements( line, children, {}, { { "command", MultipleAllowed::Yes }, { "feature", MultipleAllowed::Yes }, { " type", MultipleAllowed::Yes } } );
1310313128
1310413129 DeprecateData deprecateData;
1310513130 deprecateData.xmlLine = line;
@@ -13126,6 +13151,19 @@ VulkanHppGenerator::DeprecateData VulkanHppGenerator::readDeprecateData( tinyxml
1312613151 "command <" + deprecateData.commands.back().supersededBy + ">, superseding command <" + deprecateData.commands.back().name +
1312713152 "> is not listed as a command" );
1312813153 }
13154+ else if ( value == "feature" )
13155+ {
13156+ deprecateData.features.push_back( readDeprecatedFeature( child ) );
13157+ auto structIt = m_structs.find( deprecateData.features.back().structure );
13158+ checkForError( structIt != m_structs.end(),
13159+ childLine,
13160+ "deprecated feature <" + deprecateData.features.back().name + "> specifies unknown struct <" + deprecateData.features.back().structure +
13161+ "> is unknown" );
13162+ checkForError( containsByName( structIt->second.members, deprecateData.features.back().name ),
13163+ childLine,
13164+ "deprecated feature <" + deprecateData.features.back().name + "> is not a member of the specified struct <" +
13165+ deprecateData.features.back().structure );
13166+ }
1312913167 else if ( value == "type" )
1313013168 {
1313113169 deprecateData.types.push_back( readDeprecatedType( child ) );
0 commit comments