-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area: naga front-endlang: WGSLWebGPU Shading LanguageWebGPU Shading LanguagenagaShader TranslatorShader Translator
Description
This naga/wgsl-in test is incorrect. WGSL spec does not allow shadowing the for
initializer in the body. (because both declaration would have the same end-of-scope, the closing }
).
fn forLexicalScope(a: f32) {
for (var a = 0; a < 1; a++) {
let a = true; // <-- this is not allowed by WGSL spec.
} // <-- because this is the end-of-scope of both declarations
let test: f32 = a;
}
Upstream issue for reference: gpuweb/gpuweb#5024
Metadata
Metadata
Assignees
Labels
area: naga front-endlang: WGSLWebGPU Shading LanguageWebGPU Shading LanguagenagaShader TranslatorShader Translator
Type
Projects
Status
Todo