-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine fields sharing the same length-field into a single builder function #445
Comments
To be clear I'm willing to address this. Just let me know what course of action I should take. Thanks! |
Arrays are an often returning and discussed subject, because of their issues with optionality (or rather, lack of such annotations in the bindings), ambiguity for zero-length slices (such pointers should not be dereferenced) and the issue here: length fields shared between multiple pointers. For these cases I've been thinking about generating single functions that accept all involved slices at once, and asserts they're either identical in size or "null" (modeled as
Concrete answer: let's use this issue to discuss the appropriate way forward. I think single function for all slices could work, but others may have different solutions or find the drawbacks too severe. |
I like this idea a lot, personally! |
@Ralith @MaikKlein Shall we rename this issue to something like "Combine fields sharing the same length-field into a single builder function" (or something more generic yet irrespective of |
So right now
resolve_attachments
takes in a slice ofAttachmentReference
, and then setscolor_attachment_count
to the len of the input slice. However according to the specification for VkSubpassDescription it states:This seems to imply that the behavior of the builder function is incorrect in overwriting
color_attachment_count
. At the very least we should probably change it so that it doesn't do that. However I believe in the long run the correct behavior would be to verify that the len of the input slice matchescolor_attachment_count
and produce a result of some kind.The text was updated successfully, but these errors were encountered: