Files
wgpu/tests/out/wgsl/module-scope.wgsl
T
teoxoy a730236b68 [wgsl-in] eagerly evaluate const-expressions
[wgsl-in] support const-expressions in attributes

allow `Splat` as an evaluated const-expression type
2023-10-12 13:13:26 +02:00

26 lines
337 B
WebGPU Shading Language

struct S {
x: i32,
}
const Value: i32 = 1;
@group(0) @binding(0)
var Texture: texture_2d<f32>;
@group(0) @binding(1)
var Sampler: sampler;
fn statement() {
return;
}
fn returns() -> S {
return S(Value);
}
fn call() {
statement();
let _e0 = returns();
let s = textureSample(Texture, Sampler, vec2(1.0));
}