dawn-cmake/test/ptr_ref/load/param/ptr.wgsl

10 lines
189 B
WebGPU Shading Language
Raw Normal View History

fn func(value : i32, pointer : ptr<function, i32>) -> i32 {
return value + *pointer;
}
@stage(compute) @workgroup_size(1)
fn main() {
var i : i32 = 123;
let r : i32 = func(i, &i);
}