Ben Clayton c64ca23d94 tint: Deprecated module-scope 'let' for 'const'
Enable the parsing of 'const'.
Warn on use of module-scope 'let', and automatically replace with 'const'.

Fixed: tint:1580
Change-Id: I214aabca80686dc6b60ae21a7a57fbfb4898ea83
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93786
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-29 00:55:36 +00:00

28 lines
549 B
WebGPU Shading Language

type MyArray = array<f32, 10>;
// Global consts
const c1 = 1;
const c2 = 1u;
const c3 = 1.0;
const c4 = vec3<i32>(1, 1, 1);
const c5 = vec3<u32>(1u, 1u, 1u);
const c6 = vec3<f32>(1.0, 1.0, 1.0);
const c7 = mat3x3<f32>(vec3<f32>(1.0, 1.0, 1.0), vec3<f32>(1.0, 1.0, 1.0), vec3<f32>(1.0, 1.0, 1.0));
const c9 = MyArray();
@fragment
fn main() -> @location(0) vec4<f32> {
var v1 = c1;
var v2 = c2;
var v3 = c3;
var v4 = c4;
var v5 = c5;
var v6 = c6;
var v7 = c7;
var v9 = c9;
return vec4<f32>(0.0,0.0,0.0,0.0);
}