std::string VulkanHppGenerator::generateExtensionDependsByVersion( bool definition ) const
{
- if (m_api != "vulkan")
+ if ( m_api != "vulkan" )
{
return "";
}
if ( definition )
{
- const std::string generateExtensionDependsTemplate = R"( VULKAN_HPP_INLINE std::pair<bool, std::vector<std::string> const &> getExtensionDepends( std::string const & version, std::string const & extension )
+ const std::string generateExtensionDependsTemplate =
+ R"( VULKAN_HPP_INLINE std::pair<bool, std::vector<std::string> const &> getExtensionDepends( std::string const & version, std::string const & extension )
{
#if !defined( NDEBUG )
static std::set<std::string> versions = { ${versions} };
)";
std::string versions;
- for (auto const& feature : m_features)
+ for ( auto const & feature : m_features )
{
versions += "\"" + feature.name + "\", ";
}
{ "platform", {} },
{ "promotedto", {} },
{ "provisional", { "true" } },
+ { "ratified", { "vulkan", "vulkansc" } },
{ "sortorder", { "1" } },
{ "specialuse", { "cadsupport", "d3demulation", "debugging", "devtools", "glemulation" } },
{ "type", { "device", "instance" } } } );
checkElements( line, children, { { "require", false } } );
ExtensionData extensionData{ .xmlLine = line };
- std::vector<std::string> supported;
+ std::vector<std::string> ratified, supported;
for ( auto const & attribute : attributes )
{
if ( attribute.first == "depends" )
"while attribute <provisional> is set to \"true\", attribute <platform> is not set to \"provisional\" but to \"" + extensionData.platform +
"\"" );
}
+ else if ( attribute.first == "ratified" )
+ {
+ ratified = tokenize( attribute.second, "," );
+ }
else if ( attribute.first == "supported" )
{
supported = tokenize( attribute.second, "," );
}
}
+ checkForWarning( ( std::find( supported.begin(), supported.end(), "disabled" ) != supported.end() ) || extensionData.isDeprecated || ratified.empty() ||
+ ( supported == ratified ),
+ line,
+ "attribute \"ratified\" differs from attribute \"supported\"" );
bool extensionSupported = supported.empty() || ( std::find( supported.begin(), supported.end(), m_api ) != supported.end() );
checkForError( !extensionSupported || !extensionData.type.empty(), line, "missing attribute \"type\" for supported extension <" + extensionData.name + ">" );
for ( auto child : children )