mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
34 lines
437 B
WebGPU Shading Language
34 lines
437 B
WebGPU Shading Language
struct S {
|
|
x: i32,
|
|
}
|
|
|
|
const Value: i32 = 1i;
|
|
|
|
@group(0) @binding(0)
|
|
var Texture: texture_2d<f32>;
|
|
@group(0) @binding(1)
|
|
var Sampler: sampler;
|
|
|
|
fn statement() {
|
|
return;
|
|
}
|
|
|
|
fn returns() -> S {
|
|
return S(1i);
|
|
}
|
|
|
|
fn call() {
|
|
statement();
|
|
let _e0 = returns();
|
|
let s = textureSample(Texture, Sampler, vec2(1f));
|
|
return;
|
|
}
|
|
|
|
@fragment
|
|
fn main() {
|
|
call();
|
|
statement();
|
|
let _e0 = returns();
|
|
return;
|
|
}
|