-
Notifications
You must be signed in to change notification settings - Fork 329
Closed
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specificationResolved - waiting for a change to the WGSL specification
Milestone
Description
We want to do shader translation at createShaderModule
time, so we need to ensure that the WGSL module is valid to start with. So the first question is whether we are going to have the formal validation rules for WGSL modules.
The second question, derived from the first, is whether we allow binding collisions in this validation:
[[set = 0, binding = 1]] Texture1D<f32> MyTexture1;
[[set = 0, binding = 1]] Texture2D<u32> MyTexture2;
[[set = 0, binding = 1]] Texture3D<i32> MyTexture3;
Background: this question stems from #573 and the fact SPIR-V doesn't separate between comparison and regular samplers at the declaration level. If we want to be able to translate the whole SPIR-V module into WGSL, we'll need to allow binding collisions for WGSL module validation.
Alternatives considered: don't validate WGSL module as a whole, only validate specific entry points at pipeline creation time.
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specificationResolved - waiting for a change to the WGSL specification