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

wgsl: numeric params of attributes should be creation-time expressions not literals #2890

Closed
dneto0 opened this issue May 16, 2022 · 2 comments
Labels
wgsl WebGPU Shading Language Issues
Projects
Milestone

Comments

@dneto0
Copy link
Contributor

dneto0 commented May 16, 2022

Numeric parameters to attributes are specified as either positive i32 literal or non-negative i32 literal.

Instead of saying i32 literal, they should be i32 creation-time expression.

This would allow things like:

const block_size = 16;
@compute @workgroup_size(block_size)
fn foo(...) { ... }
@dneto0 dneto0 added the wgsl WebGPU Shading Language Issues label May 16, 2022
@dneto0 dneto0 added this to the V1.0 milestone May 16, 2022
@dneto0
Copy link
Contributor Author

dneto0 commented May 16, 2022

I think this was intended but didn't make it into the constant-time expr spec update.

@alan-baker
Copy link
Contributor

Dupe of #2790

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
WGSL
Awaiting triage
Development

No branches or pull requests

2 participants