Add support for Vulkan header version 109 (#333)

This commit is contained in:
Markus Tavenrath 2019-05-30 09:18:32 +02:00 committed by GitHub
parent 7900c655f3
commit d2a1056a56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2668 additions and 83 deletions

@ -1 +1 @@
Subproject commit 8cc971fb3e1c25afb949cdc49d6a6de63f19c5c6
Subproject commit 6635a81b5b9dea234faf967d54abf7241db371c9

View File

@ -4016,6 +4016,15 @@ void VulkanHppGenerator::writeUnion(std::ostream & os, std::pair<std::string, St
bool firstTime = true;
for (auto const& member : structure.second.members)
{
// VkBool32 is aliased to uint32_t. Don't create a VkBool32 constructor if the union also contains a uint32_t constructor.
auto compareBool32Alias = [](MemberData const& member) { return member.type.type == std::string("uint32_t"); };
if (member.type.type == "VkBool32") {
if (std::find_if(structure.second.members.begin(), structure.second.members.end(), compareBool32Alias) != structure.second.members.end())
{
continue;
}
}
// one constructor per union element
os << " " << stripPrefix(structure.first, "Vk") << "( " << (member.arraySize.empty() ? (member.type.compose() + " ") : ("const std::array<" + member.type.compose() + "," + member.arraySize + ">& ")) << member.name << "_";

File diff suppressed because it is too large Load Diff