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

Make naga_oil stringify! compatible. #96

Open
mintlu8 opened this issue Jun 28, 2024 · 3 comments
Open

Make naga_oil stringify! compatible. #96

mintlu8 opened this issue Jun 28, 2024 · 3 comments

Comments

@mintlu8
Copy link

mintlu8 commented Jun 28, 2024

naga_oil not being stringify! compatible severely hurts the viability of macro generated shaders.

To make naga_oil compatible we need

  • Treat # import as #import.

  • Ignore line breaks and use expression based parsing

@stefnotch
Copy link
Contributor

What exactly does being stringify! compatible mean? Asking, because I am working on eventual naga-oil/WGSL importing improvements.

@mintlu8
Copy link
Author

mintlu8 commented Aug 3, 2024

What exactly does being stringify! compatible mean? Asking, because I am working on eventual naga-oil/WGSL importing improvements.

Mostly whitespace agnostic like rust and wgsl itself.
I don't think this is a huge issue but naga_oil being whitespace agnostic could probably benefit the spec in the long run.

@stefnotch
Copy link
Contributor

Sounds like a reasonable request. I guess we'll need a different #ifdef syntax as well, because the typical one relies on it being on a separate line.

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

No branches or pull requests

2 participants