@@ -12531,7 +12531,7 @@ bool VulkanHppGenerator::isStructureChainAnchor( std::string const & type ) cons
12531
12531
auto it = findByNameOrAlias( m_structs, type );
12532
12532
if ( it != m_structs.end() )
12533
12533
{
12534
- return m_extendedStructs.contains( it->first ) ;
12534
+ return it->second.isExtended ;
12535
12535
}
12536
12536
}
12537
12537
return false;
@@ -12605,6 +12605,19 @@ bool VulkanHppGenerator::isTypeUsed( std::string const & type ) const
12605
12605
return false;
12606
12606
}
12607
12607
12608
+ void VulkanHppGenerator::markExtendedStructs()
12609
+ {
12610
+ for (auto const& s : m_structs)
12611
+ {
12612
+ for (auto const& extends : s.second.structExtends)
12613
+ {
12614
+ auto structIt = m_structs.find( extends );
12615
+ checkForError( structIt != m_structs.end(), s.second.xmlLine, "struct <" + s.first + "> extends unknown struct <" + extends + ">" );
12616
+ structIt->second.isExtended = true;
12617
+ }
12618
+ }
12619
+ }
12620
+
12608
12621
bool VulkanHppGenerator::needsStructureChainResize( std::map<size_t, VectorParamData> const & vectorParams,
12609
12622
std::vector<size_t> const & chainedReturnParams ) const
12610
12623
{
@@ -13760,6 +13773,7 @@ void VulkanHppGenerator::readRegistry( tinyxml2::XMLElement const * element )
13760
13773
else if ( value == "types" )
13761
13774
{
13762
13775
readTypes( child );
13776
+ markExtendedStructs();
13763
13777
}
13764
13778
}
13765
13779
}
@@ -14954,7 +14968,6 @@ void VulkanHppGenerator::readTypeStruct( tinyxml2::XMLElement const * element, b
14954
14968
checkForError( m_types.insert( { name, TypeData{ TypeCategory::Struct, {}, line } } ).second, line, "struct <" + name + "> already specified" );
14955
14969
checkForError( m_structsAliases.insert( { name, { alias, line } } ).second, line, "struct alias <" + name + "> already listed" );
14956
14970
}
14957
-
14958
14971
else
14959
14972
{
14960
14973
checkAttributes( line,
@@ -15075,8 +15088,6 @@ void VulkanHppGenerator::readTypeStruct( tinyxml2::XMLElement const * element, b
15075
15088
}
15076
15089
}
15077
15090
}
15078
-
15079
- m_extendedStructs.insert( structureData.structExtends.begin(), structureData.structExtends.end() );
15080
15091
}
15081
15092
}
15082
15093
0 commit comments