-
Notifications
You must be signed in to change notification settings - Fork 48
Test extension header generation #462
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
Conversation
so that extensions can have their own.
To better align with webgpu-native#212
It's nice to test a real case but it would be very useful to have a test file that has just one or two of every possible type of extension in it, as that would make it easy to review that the generator is producing the right thing.
|
Sure! Sorry for throwing all that here, I'll strip it down to a more strategic test prior to marking as non-draft! |
No problem, just pre-review thoughts (about how I'm going to review it) :) |
Fixes: #212 Previous work was done in #462, but this change improves on the prototype. - Updates generator and template to use prefixes for extensions instead of suffixes. - Adds new `Base` embedded struct in the Go representation of the YAML to facilitate name generation. - Adds a series of new helpers in `gen.go` to use the new `Base` struct to generate names properly. - Adds minimal extension YAML along to showcase generator results and updates Makefile for testing. - Some minor formatting changes to the templates so that newlines are more consistent. This was much easier to verify in the smaller extension header. - Fixes schema.json for maximum `enum_prefix` so that the sign bit cannot be accidentally set.
Superseded by #523 |
This is a WIP of a test dedicated to the generation of extension header. The sample yaml file is mainly based on wgpu-native's
wgpu.h
file (from this branch) as I was thinking of handling two birds with one PR.Hick-ups I could notice:
my-extension.yml
) would lead to hyphens in include guards (fixed in this PR)