blob: 15a75f6161cd5b7d141ef08f6887af83508f0b50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
//TEST:SIMPLE(filecheck=METAL): -target metal
//TEST:SIMPLE(filecheck=METALLIB): -target metallib
//TEST:SIMPLE(filecheck=WGSL): -target wgsl
//TEST:SIMPLE(filecheck=WGSLSPIRV): -target wgsl-spirv-asm
struct NestedReturn
{
float4 debug;
};
struct NestedReturn2
{
float4 debugAux1;
float4 debugAux2;
};
// Semantics are supposed to ignore uppercase/lowercase differences
struct Output
{
float4 Diffuse : SV_TarGet0;
NestedReturn debug1 : SV_Target1;
float4 Material : SV_TArgeT2;
NestedReturn2 debug2 : SV_TaRget3;
}
// METALLIB: define {{.*}} @fragmentMain
// METAL: color(0)
// METAL-DAG: color(1)
// METAL-DAG: color(2)
// METAL-DAG: color(3)
// METAL-DAG: color(4)
// WGSLSPIRV: %fragmentMain = OpFunction
// WGSL: @location(0) Diffuse
// WGSL: @location(1) debug
// WGSL: @location(2) Material
// WGSL: @location(3) debugAux1
// WGSL: @location(4) debugAux2
[shader("fragment")]
Output fragmentMain()
{
return { float4(1), {float4(2)}, float4(3) };
}
|