blob: 1d002c124baf9bc9116f4873aee6039709c86300 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
//TEST:SIMPLE(filecheck=METAL): -target metal -stage fragment -entry fragmentMain
//TEST:SIMPLE(filecheck=METALLIB): -target metallib -stage fragment -entry fragmentMain
//METAL-DAG: color(0)
//METAL-DAG: color(1)
//METAL-DAG: color(2)
//METAL-DAG: color(3)
//METAL-DAG: color(4)
//METAL-DAG: color(5)
//METAL-DAG: color(6)
//METAL-NOT: color(7)
//METALLIB: @fragmentMain
RWStructuredBuffer<float> outputBuffer;
struct BottomFragment1
{
float p1;
};
struct BottomFragment2
{
float p1;
};
struct MiddleFragment1
{
float p1;
BottomFragment1 p2;
BottomFragment2 p3;
};
struct TopFragment
{
float p1;
MiddleFragment1 p2;
MiddleFragment1 p3;
};
struct FragmentStageInput
{
float4 coarseVertex : CoarseVertex;
};
struct FragmentStageOutput
{
TopFragment fragment : SV_Target;
};
FragmentStageOutput fragmentMain(FragmentStageInput input)
{
FragmentStageOutput output;
output.fragment.p1 = 1;
output.fragment.p2.p1 = 3;
output.fragment.p2.p2.p1 = 4;
output.fragment.p2.p3.p1 = 5;
output.fragment.p3.p1 = 8;
output.fragment.p3.p2.p1 = 9;
output.fragment.p3.p3.p1 = 10;
// METAL-DAG: ={{.*}}.p1
// METAL-DAG: ={{.*}}.p2{{.*}}.p1
// METAL-DAG: ={{.*}}.p2{{.*}}.p2{{.*}}.p1
// METAL-DAG: ={{.*}}.p2{{.*}}.p3{{.*}}.p1
// METAL-DAG: ={{.*}}.p3{{.*}}.p1
// METAL-DAG: ={{.*}}.p3{{.*}}.p2{{.*}}.p1
// METAL-DAG: ={{.*}}.p3{{.*}}.p3{{.*}}.p1
outputBuffer[0] = 1;
return output;
}
|