summaryrefslogtreecommitdiffstats
path: root/tests/metal/simple-vertex-position-out-struct.slang
blob: 87b618560a5dcfe4d0b95a792f8a275b9c41e288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//TEST:SIMPLE(filecheck=METAL): -target metal -stage vertex -entry vertexMain
//TEST:SIMPLE(filecheck=METALLIB): -target metallib -stage vertex -entry vertexMain

//METAL: [position]]
//METALLIB: @vertexMain
struct VertexOut
{
    float4 position : SV_Position; 
}
// Vertex Shader which writes to position in a returned struct (as metal expects)
void vertexMain(out VertexOut o)
{
    o.position = float4(1,2,3,4);
}