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

Allow shadowing of predeclared types and built-in functions #4406

Open
teoxoy opened this issue Dec 5, 2022 · 2 comments
Open

Allow shadowing of predeclared types and built-in functions #4406

teoxoy opened this issue Dec 5, 2022 · 2 comments
Labels
area: naga front-end lang: WGSL WebGPU Shading Language naga Shader Translator

Comments

@teoxoy
Copy link
Member

teoxoy commented Dec 5, 2022

see https://gpuweb.github.io/gpuweb/wgsl/#predeclared

@teoxoy teoxoy added lang: WGSL WebGPU Shading Language area: naga front-end labels Dec 5, 2022
@SparkyPotato
Copy link
Contributor

Shadowing built-in functions should work in gfx-rs/naga#2075.
Types however are all reserved keywords.

@teoxoy
Copy link
Member Author

teoxoy commented Dec 6, 2022

Shadowing built-in functions should work in gfx-rs/naga#2075.

I looked at gfx-rs/naga#2075 but it doesn't look to me like user-defined types take priority over predeclared types.

Types however are all reserved keywords.

gfx-rs/naga#2130 will unreserve types

We can resolve this in a separate PR and add tests to make sure we got it working.

@cwfitzgerald cwfitzgerald transferred this issue from gfx-rs/naga Oct 25, 2023
@cwfitzgerald cwfitzgerald added the naga Shader Translator label Oct 25, 2023
@teoxoy teoxoy added this to the WebGPU Specification V1 milestone Nov 3, 2023
@jimblandy jimblandy moved this to Needs more investigation in WebGPU for Firefox Dec 13, 2023
@teoxoy teoxoy removed the status in WebGPU for Firefox Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga front-end lang: WGSL WebGPU Shading Language naga Shader Translator
Projects
Status: No status
Development

No branches or pull requests

3 participants