Upgraded check on required feature name being member of the required struct from warning to error. (#1966)

This commit is contained in:
Andreas Süßenbach 2024-10-07 17:57:38 +02:00 committed by GitHub
parent 26cf5590cb
commit 3b9d6cced3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14732,9 +14732,9 @@ VulkanHppGenerator::RequireFeature VulkanHppGenerator::readRequireFeature( tinyx
} }
auto memberIt = auto memberIt =
std::find_if( structIt->second.members.begin(), structIt->second.members.end(), [&name]( MemberData const & md ) { return md.name == name; } ); std::find_if( structIt->second.members.begin(), structIt->second.members.end(), [&name]( MemberData const & md ) { return md.name == name; } );
checkForWarning( checkForError(
memberIt != structIt->second.members.end(), line, "required feature name <" + name + "> not part of the required feature struct <" + structure + ">" ); memberIt != structIt->second.members.end(), line, "required feature name <" + name + "> not part of the required feature struct <" + structure + ">" );
checkForError( ( memberIt == structIt->second.members.end() ) || ( memberIt->type.isValue() && ( memberIt->type.type == "VkBool32" ) ), checkForError( ( memberIt->type.isValue() && ( memberIt->type.type == "VkBool32" ) ),
line, line,
"required feature name <" + name + "> is not a VkBool32 member of the required feature struct <" + structure + ">" ); "required feature name <" + name + "> is not a VkBool32 member of the required feature struct <" + structure + ">" );
@ -15809,6 +15809,7 @@ void VulkanHppGenerator::readTypeStruct( tinyxml2::XMLElement const * element, b
static std::set<std::string> multipleLenStructs = { "VkAccelerationStructureTrianglesDisplacementMicromapNV", static std::set<std::string> multipleLenStructs = { "VkAccelerationStructureTrianglesDisplacementMicromapNV",
"VkImageConstraintsInfoFUCHSIA", "VkImageConstraintsInfoFUCHSIA",
"VkIndirectCommandsLayoutTokenNV", "VkIndirectCommandsLayoutTokenNV",
"VkIndirectExecutionSetShaderInfoEXT",
"VkPipelineBinaryKeysAndDataKHR", "VkPipelineBinaryKeysAndDataKHR",
"VkPresentInfoKHR", "VkPresentInfoKHR",
"VkSemaphoreWaitInfo", "VkSemaphoreWaitInfo",