From 6d46195c99658ce4495b3317329c4bae035ed48d Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Sat, 21 Oct 2023 11:02:48 +0200 Subject: [PATCH] make pointers which do not have an 'optional' attribute optional Closes #109 --- generator/vulkan/parse.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generator/vulkan/parse.zig b/generator/vulkan/parse.zig index 39a2b1c..3f06663 100644 --- a/generator/vulkan/parse.zig +++ b/generator/vulkan/parse.zig @@ -346,7 +346,11 @@ fn parsePointerMeta(fields: Fields, type_info: *registry.TypeInfo, elem: *xml.El } else { // There is no information for this pointer, probably incorrect. - return error.InvalidRegistry; + // Currently there is one definition where this is the case, VkCudaLaunchInfoNV. + // We work around these by assuming that they are optional, so that in the case + // that they are, we can assign null to them. + // See https://github.com/Snektron/vulkan-zig/issues/109 + current_type_info.pointer.is_optional = true; } current_type_info = current_type_info.pointer.child;