mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 08:44:08 +00:00
866be693d6
* [naga wgsl-in] phony assignments add named expressions Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * [naga wgsl-out] write out _naga_phony as phony Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add test Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * use statement span Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * every phony has same name Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
18 lines
326 B
WebGPU Shading Language
18 lines
326 B
WebGPU Shading Language
@group(0) @binding(0) var<uniform> binding: f32;
|
|
|
|
fn five() -> i32 {
|
|
return 5;
|
|
}
|
|
|
|
@compute @workgroup_size(1) fn main(
|
|
@builtin(global_invocation_id) id: vec3<u32>
|
|
) {
|
|
_ = binding;
|
|
_ = binding;
|
|
let a = 5;
|
|
_ = a;
|
|
_ = five();
|
|
let b = five();
|
|
// check for name collision
|
|
let phony = binding;
|
|
} |