-
Notifications
You must be signed in to change notification settings - Fork 61
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
AttachmentDescription.samples should not be a flags type #27
Comments
Yes, the intended way to go about that is to pass a flags structure with a single field set. There are a few other occasions where the raw The problem is that in C, the var my_queue_flags = vk.QueueFlags.init(.{.graphics_bit, .compute_bit});
my_queue_flags.contains(vk.QueueFlags.init(.{.graphics_bit, .compute_bit})); I guess these extra calls could be mitigated by adding extra code that checks the actual passed in type and then allowing |
Is it common to need to turn a flag bit (enum) value into a flags (bitfield) value? I've not seen anywhere it'd be terribly useful, but maybe I'm wrong. It's not a huge deal either way, but it feels odd to use a flags bitfield struct for a value that can only have a single bit set. |
Im not sure about that. I do know that the Flags variants are much more often used than FlagBit variants in general, though. I'm not such a fan of a
I agree that its not terribly useful like this, also from a "self-documenting" perspective. |
According to the Vulkan spec,
VkAttachmentDescription.samples
is of an enum type that happens to contain the bit flags used in a flag type.vulkan-zig incorrectly changes this enum type (
VkSampleCountFlagBits
) to the corresponding flags type (VkSampleCountFlags
) in the generatedAttachmentDescription
struct.The text was updated successfully, but these errors were encountered: