mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-09 14:10:07 +00:00
Add support for multiply aliased structs in <require>-<feature> tags. (#1958)
This commit is contained in:
parent
6abd3f42a8
commit
4e6e8d3fda
@ -580,8 +580,8 @@ ${macros}
|
|||||||
|
|
||||||
#endif)";
|
#endif)";
|
||||||
|
|
||||||
std::string str = replaceWithMap(
|
std::string str =
|
||||||
macrosTemplate,
|
replaceWithMap( macrosTemplate,
|
||||||
{ { "licenseHeader", m_vulkanLicenseHeader },
|
{ { "licenseHeader", m_vulkanLicenseHeader },
|
||||||
{ "macros",
|
{ "macros",
|
||||||
replaceWithMap( readSnippet( "macros.hpp" ),
|
replaceWithMap( readSnippet( "macros.hpp" ),
|
||||||
@ -1437,7 +1437,7 @@ void VulkanHppGenerator::checkFeatureCorrectness() const
|
|||||||
{
|
{
|
||||||
// check that each require depends actually is an extension
|
// check that each require depends actually is an extension
|
||||||
// remove this check temporarily !
|
// remove this check temporarily !
|
||||||
//for ( auto const & feature : m_features )
|
// for ( auto const & feature : m_features )
|
||||||
//{
|
//{
|
||||||
// for ( auto const & require : feature.requireData )
|
// for ( auto const & require : feature.requireData )
|
||||||
// {
|
// {
|
||||||
@ -14539,6 +14539,17 @@ VulkanHppGenerator::RequireFeature VulkanHppGenerator::readRequireFeature( tinyx
|
|||||||
auto aliasIt = std::find_if(
|
auto aliasIt = std::find_if(
|
||||||
m_structsAliases.begin(), m_structsAliases.end(), [&structure]( std::pair<std::string, AliasData> const & ad ) { return ad.first == structure; } );
|
m_structsAliases.begin(), m_structsAliases.end(), [&structure]( std::pair<std::string, AliasData> const & ad ) { return ad.first == structure; } );
|
||||||
checkForError( aliasIt != m_structsAliases.end(), line, "encountered unknown required feature struct <" + structure + ">" );
|
checkForError( aliasIt != m_structsAliases.end(), line, "encountered unknown required feature struct <" + structure + ">" );
|
||||||
|
auto nextAliasIt = aliasIt;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
nextAliasIt = std::find_if( m_structsAliases.begin(),
|
||||||
|
m_structsAliases.end(),
|
||||||
|
[&structure = aliasIt->second.name]( std::pair<std::string, AliasData> const & ad ) { return ad.first == structure; } );
|
||||||
|
if ( nextAliasIt != m_structsAliases.end() )
|
||||||
|
{
|
||||||
|
aliasIt = nextAliasIt;
|
||||||
|
}
|
||||||
|
} while ( nextAliasIt != m_structsAliases.end() );
|
||||||
structIt = m_structs.find( aliasIt->second.name );
|
structIt = m_structs.find( aliasIt->second.name );
|
||||||
assert( structIt != m_structs.end() );
|
assert( structIt != m_structs.end() );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user