1
1
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s -verify
2
2
// RUN: not %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s 2>&1 | FileCheck %s
3
3
4
- // expected-note @+2 {{overlapping resource range here }}
5
- // expected-error @+1 {{resource ranges b[42;42] and b[42;42] overlap within space = 0 and visibility = All }}
4
+ // expected-error @+2 {{resource ranges b[42;42] and b[42;42] overlap within space = 0 and visibility = All }}
5
+ // expected-note @+1 {{overlapping resource range here }}
6
6
[RootSignature ("CBV(b42), CBV(b42)" )]
7
7
void bad_root_signature_0 () {}
8
8
9
- // expected-note @+2 {{overlapping resource range here }}
10
- // expected-error @+1 {{resource ranges t[0;0] and t[0;0] overlap within space = 3 and visibility = All }}
9
+ // expected-error @+2 {{resource ranges t[0;0] and t[0;0] overlap within space = 3 and visibility = All }}
10
+ // expected-note @+1 {{overlapping resource range here }}
11
11
[RootSignature ("SRV(t0, space = 3), SRV(t0, space = 3)" )]
12
12
void bad_root_signature_1 () {}
13
13
14
- // expected-note @+2 {{overlapping resource range here }}
15
- // expected-error @+1 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel }}
14
+ // expected-error @+2 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel }}
15
+ // expected-note @+1 {{overlapping resource range here }}
16
16
[RootSignature ("UAV(u0, visibility = SHADER_VISIBILITY_PIXEL), UAV(u0, visibility = SHADER_VISIBILITY_PIXEL)" )]
17
17
void bad_root_signature_2 () {}
18
18
19
- // expected-note @+2 {{overlapping resource range here }}
20
- // expected-error @+1 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel }}
19
+ // expected-error @+2 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel }}
20
+ // expected-note @+1 {{overlapping resource range here }}
21
21
[RootSignature ("UAV(u0, visibility = SHADER_VISIBILITY_ALL), UAV(u0, visibility = SHADER_VISIBILITY_PIXEL)" )]
22
22
void bad_root_signature_3 () {}
23
23
24
- // expected-note @+2 {{overlapping resource range here }}
25
- // expected-error @+1 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel }}
24
+ // expected-error @+2 {{resource ranges u[0;0] and u[0;0] overlap within space = 0 and visibility = Pixel }}
25
+ // expected-note @+1 {{overlapping resource range here }}
26
26
[RootSignature ("UAV(u0, visibility = SHADER_VISIBILITY_PIXEL), UAV(u0, visibility = SHADER_VISIBILITY_ALL)" )]
27
27
void bad_root_signature_4 () {}
28
28
29
- // expected-note @+2 {{overlapping resource range here }}
30
- // expected-error @+1 {{resource ranges b[0;0] and b[0;0] overlap within space = 0 and visibility = All }}
29
+ // expected-error @+2 {{resource ranges b[0;0] and b[0;0] overlap within space = 0 and visibility = All }}
30
+ // expected-note @+1 {{overlapping resource range here }}
31
31
[RootSignature ("RootConstants(num32BitConstants=4, b0), RootConstants(num32BitConstants=2, b0)" )]
32
32
void bad_root_signature_5 () {}
33
33
34
- // expected-note @+2 {{overlapping resource range here }}
35
- // expected-error @+1 {{resource ranges s[3;3] and s[3;3] overlap within space = 0 and visibility = All }}
34
+ // expected-error @+2 {{resource ranges s[3;3] and s[3;3] overlap within space = 0 and visibility = All }}
35
+ // expected-note @+1 {{overlapping resource range here }}
36
36
[RootSignature ("StaticSampler(s3), StaticSampler(s3)" )]
37
37
void bad_root_signature_6 () {}
38
38
39
- // expected-note @+2 {{overlapping resource range here }}
40
- // expected-error @+1 {{resource ranges t[2;5] and t[0;3] overlap within space = 0 and visibility = All }}
39
+ // expected-error @+2 {{resource ranges t[2;5] and t[0;3] overlap within space = 0 and visibility = All }}
40
+ // expected-note @+1 {{overlapping resource range here }}
41
41
[RootSignature ("DescriptorTable(SRV(t0, numDescriptors=4), SRV(t2, numDescriptors=4))" )]
42
42
void bad_root_signature_7 () {}
43
43
44
- // expected-note @+2 {{overlapping resource range here }}
45
- // expected-error @+1 {{resource ranges u[2;5] and u[0;unbounded) overlap within space = 0 and visibility = Hull }}
44
+ // expected-error @+2 {{resource ranges u[2;5] and u[0;unbounded) overlap within space = 0 and visibility = Hull }}
45
+ // expected-note @+1 {{overlapping resource range here }}
46
46
[RootSignature ("DescriptorTable(UAV(u0, numDescriptors=unbounded), visibility = SHADER_VISIBILITY_HULL), DescriptorTable(UAV(u2, numDescriptors=4))" )]
47
47
void bad_root_signature_8 () {}
48
48
49
- // expected-note @+2 {{overlapping resource range here }}
50
- // expected-error @+1 {{resource ranges b[0;2] and b[2;2] overlap within space = 0 and visibility = All }}
49
+ // expected-error @+2 {{resource ranges b[0;2] and b[2;2] overlap within space = 0 and visibility = All }}
50
+ // expected-note @+1 {{overlapping resource range here }}
51
51
[RootSignature ("RootConstants(num32BitConstants=4, b2), DescriptorTable(CBV(b0, numDescriptors=3))" )]
52
52
void bad_root_signature_9 () {}
53
53
54
- // expected-note @+2 {{overlapping resource range here }}
55
- // expected-error @+1 {{resource ranges s[4;unbounded) and s[17;17] overlap within space = 0 and visibility = All }}
54
+ // expected-error @+2 {{resource ranges s[4;unbounded) and s[17;17] overlap within space = 0 and visibility = All }}
55
+ // expected-note @+1 {{overlapping resource range here }}
56
56
[RootSignature ("StaticSampler(s17), DescriptorTable(Sampler(s0, numDescriptors=3),Sampler(s4, numDescriptors=unbounded))" )]
57
57
void bad_root_signature_10 () {}
58
58
59
- // expected-note @+2 {{overlapping resource range here }}
60
- // expected-error @+1 {{resource ranges b[45;45] and b[4;unbounded) overlap within space = 0 and visibility = Geometry }}
59
+ // expected-error @+2 {{resource ranges b[45;45] and b[4;unbounded) overlap within space = 0 and visibility = Geometry }}
60
+ // expected-note @+1 {{overlapping resource range here }}
61
61
[RootSignature ("DescriptorTable(CBV(b4, numDescriptors=unbounded)), CBV(b45, visibility = SHADER_VISIBILITY_GEOMETRY)" )]
62
62
void bad_root_signature_11 () {}
63
63
@@ -68,13 +68,13 @@ void bad_root_signature_11() {}
68
68
" CBV(b0, numDescriptors = 8), " \
69
69
")"
70
70
71
- // expected-note @+2 {{overlapping resource range here }}
72
- // expected-error @+1 {{resource ranges b[0;7] and b[1;2] overlap within space = 0 and visibility = All }}
71
+ // expected-error @+2 {{resource ranges b[0;7] and b[1;2] overlap within space = 0 and visibility = All }}
72
+ // expected-note @+1 {{overlapping resource range here }}
73
73
[RootSignature (ReportFirstOverlap)]
74
74
void bad_root_signature_12 () {}
75
75
76
- // expected-note @+2 {{overlapping resource range here }}
77
- // expected-error @+1 {{resource ranges s[2;2] and s[2;2] overlap within space = 0 and visibility = Vertex }}
76
+ // expected-error @+2 {{resource ranges s[2;2] and s[2;2] overlap within space = 0 and visibility = Vertex }}
77
+ // expected-note @+1 {{overlapping resource range here }}
78
78
[RootSignature ("StaticSampler(s2, visibility=SHADER_VISIBILITY_ALL), DescriptorTable(Sampler(s2), visibility=SHADER_VISIBILITY_VERTEX)" )]
79
79
void valid_root_signature_13 () {}
80
80
@@ -99,7 +99,7 @@ void valid_root_signature_13() {}
99
99
// CHECK-NEXT: [[@LINE-15]] | " SRV(t22, numDescriptors = 1), "
100
100
// CHECK-NEXT: | ^
101
101
102
- // expected-note @+2 {{overlapping resource range here }}
103
- // expected-error @+1 {{resource ranges t[17;23] and t[22;22] overlap within space = 0 and visibility = All }}
102
+ // expected-error @+2 {{resource ranges t[17;23] and t[22;22] overlap within space = 0 and visibility = All }}
103
+ // expected-note @+1 {{overlapping resource range here }}
104
104
[RootSignature (DemoNoteSourceLocations)]
105
105
void bad_root_signature_14 () {}
0 commit comments