Closed kvark closed 6 years ago
Hacked this in https://github.com/Osspial/vk-rs/compare/master...kvark:enum-const Please let me know if you'd like this upstreamed, and in what shape.
Having this upstreamed would be great - I'm actually kinda surprised this wasn't implemented already. Most of the code in the hack looks good, but it would need a config flag to switch between the enum and numerical constants version. It might also make sense to make the enum type a wrapper struct to keep type-checking, which in this case would be pub struct SystemAllocationScope(u32);
Getting enum stripping to only strip VK_
should be easy enough, but I'll look into doing that after I get some sleep and can actually think about code.
How easy would this option be to implement? I need:
instead of
One thing is moving from enum variants to constants. Another is - stripping "VK_" prefix only, leaving the other padding (
SYSTEM_ALLOCATION_SCOPE_
). Finally, I suppose the enum type would then turn intopub type SystemAllocationScope = u32
;