Skip to content
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

convert: Parse bitfield size in struct members #36

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarijnS95
Copy link
Contributor

Vulkan has always had a bunch of <member>s which are bit fields with a defined size after a colon, C/C++ syntax. The conversion to vkxml never handled these, resulting in the parser to treat this final numeric token as the field name.

In some ways that's desired, as vkxml does not have a field to represent bitfield sizes and the crate cannot be updated (we should really stop using it in ash...). Having a "broken" numeric in the field name like this at least communicates that this data cannot be trusted/used, and on the ash side we've always manually redefined structs with bitfields.

Vulkan has always had a bunch of `<member>`s which are bit fields with a
defined size after a colon, C/C++ syntax.  The conversion to `vkxml`
never handled these, resulting in the parser to treat this final numeric
token as the field name.

In some ways that's desired, as `vkxml` does not have a field to
represent bitfield sizes and the crate cannot be updated (we should
really stop using it in `ash`...).  Having a "broken" numeric in the
field name like this at least communicates that this data cannot be
trusted/used, and on the `ash` side we've always manually redefined
structs with bitfields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant