mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-29 18:23:36 +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>
25 lines
387 B
Plaintext
25 lines
387 B
Plaintext
// language: metal1.0
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using metal::uint;
|
|
|
|
|
|
int five(
|
|
) {
|
|
return 5;
|
|
}
|
|
|
|
struct main_Input {
|
|
};
|
|
kernel void main_(
|
|
metal::uint3 id [[thread_position_in_grid]]
|
|
, constant float& binding [[user(fake0)]]
|
|
) {
|
|
float phony = binding;
|
|
float phony_1 = binding;
|
|
int _e6 = five();
|
|
int _e7 = five();
|
|
float phony_2 = binding;
|
|
}
|