summaryrefslogtreecommitdiff
path: root/tests/metal/sv_target.slang
blob: 4c7c6e8da5a44f4edc2c3955b44be310781656b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//TEST:SIMPLE(filecheck=CHECK): -target metal
//TEST:SIMPLE(filecheck=CHECK-ASM): -target metallib

struct Output
{
  float4 Diffuse  : SV_Target0;
  float4 Normal   : SV_Target1;
  float4 Material : SV_Target2;
}

// CHECK-ASM: define {{.*}} @fragMain
// CHECK: color(0)
// CHECK: color(1)
// CHECK: color(2)

[shader("fragment")]
Output fragMain()
{
    return { float4(1), float4(2), float4(3) };
}