-
Notifications
You must be signed in to change notification settings - Fork 468
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
Add a "constants" type= attribute to <enums> tags #2366
Conversation
For more consistency with handling other enums type= attributes. This is purely additive to the schema but it is conceivable that downstream scripts would look for this attribute *not* being present to indicate compile-time constants, so this should be checked against CTS / VVL / Vulkan-Hpp binding / Rust binding usage. Closes #2359
@MarijnS95 this changes seems to have triggered something bad in ash-rs - could you take a look at it? This PR is an experiment to see if the request in #2359 can be implemented without annoying downstream consequences. |
@oddhack confirmed that VVL is ok with this |
Thanks! Do you know who I could ask to check CTS? |
|
@oddhack it looks like it is skipping generation of all the constants. Unfortunately I just left the country and will only be back on Monday to investigate and address this, if that's not too long. |
Thanks. That's fine - this is not urgent. |
@rg3igalia would it be possible for you to check this branch to see if the XML change (adding a type="constants" to the API constants <enums> tag) causes any issues for CTS? |
I just checked and CTS code generation continues to work normally. The generated code also compiles fine. |
@oddhack the |
I believe this is ready to merge. VVL and CTS have verified no impact, Vulkan-Hpp is causing no issues, and Ash has a fix queued up. |
@MarijnS95 thanks, re-running CI to see if that will fix the problem. |
@oddhack looks like it did 🎉 In the future there's a "re-run CI" button, with some nice "Run number #x" UX. |
I did initially re-run the failing job, which continued to fail, making me think the dependency had succeeded but generated incorrect code for the build-test job. Could probably have re-ran all jobs with equal effect to pushing the empty commit, true. |
Correct, the generator succeeded but didn't find any constants by looking for |
For more consistency with handling other enums type= attributes.
This is purely additive to the schema but it is conceivable that downstream scripts would look for this attribute not being present to indicate compile-time constants, so this should be checked against CTS / VVL / Vulkan-Hpp binding / Rust binding usage.
Closes #2359