mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-16 07:23:16 -04:00
Merge pull request #1128 from asuessenbach/version
Check for "VK_API_VERSION_m_n" or "VK_VERSION_m_n" in SPIRVCapabilities and SPIRVExtensions
This commit is contained in:
commit
f352a3efd8
@ -13329,11 +13329,14 @@ void VulkanHppGenerator::readSPIRVCapabilitiesSPIRVCapabilityEnableVersion(
|
|||||||
for ( auto const & attribute : attributes )
|
for ( auto const & attribute : attributes )
|
||||||
{
|
{
|
||||||
assert( attribute.first == "version" );
|
assert( attribute.first == "version" );
|
||||||
check( beginsWith( attribute.second, "VK_API_VERSION_" ),
|
std::string feature = attribute.second;
|
||||||
|
if ( beginsWith( feature, "VK_API_" ) )
|
||||||
|
{
|
||||||
|
feature.erase( 3, 4 ); // remove "API_" from the version -> VK_VERSION_x_y
|
||||||
|
}
|
||||||
|
check( beginsWith( feature, "VK_VERSION_" ),
|
||||||
xmlLine,
|
xmlLine,
|
||||||
"unknown version <" + attribute.second + "> specified for SPIR-V capability" );
|
"unknown version <" + attribute.second + "> specified for SPIR-V capability" );
|
||||||
std::string feature = attribute.second;
|
|
||||||
feature.erase( 3, 4 ); // remove "API_" from the version -> VK_VERSION_x_y
|
|
||||||
check( m_features.find( feature ) != m_features.end(),
|
check( m_features.find( feature ) != m_features.end(),
|
||||||
xmlLine,
|
xmlLine,
|
||||||
"unknown version <" + attribute.second + "> specified for SPIR-V capability" );
|
"unknown version <" + attribute.second + "> specified for SPIR-V capability" );
|
||||||
@ -13389,11 +13392,14 @@ void VulkanHppGenerator::readSPIRVExtensionsExtensionEnable( tinyxml2::XMLElemen
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert( attribute.first == "version" );
|
assert( attribute.first == "version" );
|
||||||
check( beginsWith( attribute.second, "VK_API_VERSION_" ),
|
std::string feature = attribute.second;
|
||||||
|
if ( beginsWith( feature, "VK_API_" ) )
|
||||||
|
{
|
||||||
|
feature.erase( 3, 4 ); // remove "API_" from the version -> VK_VERSION_x_y
|
||||||
|
}
|
||||||
|
check( beginsWith( feature, "VK_VERSION_" ),
|
||||||
line,
|
line,
|
||||||
"unknown version <" + attribute.second + "> specified for SPIR-V extension" );
|
"unknown version <" + attribute.second + "> specified for SPIR-V extension" );
|
||||||
std::string feature = attribute.second;
|
|
||||||
feature.erase( 3, 4 ); // remove "API_" from the version -> VK_VERSION_x_y
|
|
||||||
check( m_features.find( feature ) != m_features.end(),
|
check( m_features.find( feature ) != m_features.end(),
|
||||||
line,
|
line,
|
||||||
"unknown version <" + attribute.second + "> specified for SPIR-V extension" );
|
"unknown version <" + attribute.second + "> specified for SPIR-V extension" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user