blob: 5f7a281cfc59f787b7f37b153d64c7d199a7012c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//TEST:SIMPLE(filecheck=MTL): -target metal
//TEST:SIMPLE(filecheck=LIB): -target metallib
//TEST:SIMPLE(filecheck=WGSL): -target wgsl -entry vertMain -stage vertex
// LIB-NOT: error :
// LIB: @vertMain
// 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;
}
|