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

[high-level] Should we support aliasing predeclared enumerant values? (e.g. user-defined @location(pos) mapping to @location(position)) #4540

Open
kdashg opened this issue Mar 26, 2024 · 2 comments
Labels
wgsl WebGPU Shading Language Issues
Milestone

Comments

@kdashg
Copy link
Contributor

kdashg commented Mar 26, 2024

From #4505, related to #4539.

@kdashg
Copy link
Contributor Author

kdashg commented Apr 9, 2024

WGSL 2024-03-26 Minutes
  • KG: Seems kind of nice we can make an alias for, but M3+. Seems niche.
  • DN: M3+ or later.
  • AB: The discussion isn’t about when, but rather if the design features will fit together well.
  • KG: Think it has limited use.

@jimblandy jimblandy changed the title [high-level] Should be support aliasing predeclared enumerant values? (e.g. user-defined @location(pos) mapping to @location(position)) [high-level] Should we support aliasing predeclared enumerant values? (e.g. user-defined @location(pos) mapping to @location(position)) Apr 16, 2024
@kdashg
Copy link
Contributor Author

kdashg commented Apr 17, 2024

WGSL 2024-04-16 Minutes
  • (AB/DN: This is actually coupled to [high-level] Should predeclared enumerant values (e.g. position) should be shadowable by user variables? (e.g. let position =) #4539: Deciding that those attributes are not shadowable, means we can’t really make aliases for these things. That’s because defining and using an alias requires identifier resolution to be operating, and that means we get back into the world where we’re going to accidentally shadow position again.)
    • DN: In later internal discussion, it was pointed out you could solve this by putting position in its own name resolution space.
  • KG: In M3+, was a concern about it last time. If we wanted to do this, we could, but punt for now, yes?
  • DN: Yes.
  • KG: Resolved, M3+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wgsl WebGPU Shading Language Issues
Projects
None yet
Development

No branches or pull requests

1 participant