diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/metal/explicit-location.slang | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/metal/explicit-location.slang b/tests/metal/explicit-location.slang new file mode 100644 index 000000000..35930cfce --- /dev/null +++ b/tests/metal/explicit-location.slang @@ -0,0 +1,17 @@ +//TEST:SIMPLE(filecheck=MTL): -target metal +//TEST:SIMPLE(filecheck=WGSL): -target wgsl -entry vertMain -stage vertex + +// MTL: attribute(3) +// WGSL: @location(3) + +struct Vertex +{ + [vk::location(0)] float4 pos; + [vk::location(3)] float2 uv; +} + +[shader("vertex")] +float4 vertMain(Vertex vin) : SV_Position +{ + return vin.pos + vin.uv.x; +}
\ No newline at end of file |
