Skip to content

Commit

Permalink
make pointers which do not have an 'optional' attribute optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Snektron committed Oct 21, 2023
1 parent 1e4e90f commit 6d46195
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generator/vulkan/parse.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6d46195

Please sign in to comment.