|
1 | 1 | // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s -verify
|
| 2 | +// RUN: not %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s 2>&1 | FileCheck %s |
2 | 3 |
|
3 | 4 | // expected-note@+2 {{overlapping resource range here}}
|
4 | 5 | // expected-error@+1 {{resource ranges b[42;42] and b[42;42] overlap within space = 0 and visibility = All}}
|
@@ -76,3 +77,29 @@ void bad_root_signature_12() {}
|
76 | 77 | // expected-error@+1 {{resource ranges s[2;2] and s[2;2] overlap within space = 0 and visibility = Vertex}}
|
77 | 78 | [RootSignature("StaticSampler(s2, visibility=SHADER_VISIBILITY_ALL), DescriptorTable(Sampler(s2), visibility=SHADER_VISIBILITY_VERTEX)")]
|
78 | 79 | void valid_root_signature_13() {}
|
| 80 | + |
| 81 | +#define DemoNoteSourceLocations \ |
| 82 | + "DescriptorTable( " \ |
| 83 | + " CBV(b4, numDescriptors = 4), " \ |
| 84 | + " SRV(t22, numDescriptors = 1), " \ |
| 85 | + " UAV(u42, numDescriptors = 2), " \ |
| 86 | + " CBV(b9, numDescriptors = 8), " \ |
| 87 | + " SRV(t12, numDescriptors = 3), " \ |
| 88 | + " UAV(u3, numDescriptors = 16), " \ |
| 89 | + " SRV(t9, numDescriptors = 1), " \ |
| 90 | + " CBV(b1, numDescriptors = 2), " \ |
| 91 | + " SRV(t17, numDescriptors = 7), " \ |
| 92 | + " UAV(u0, numDescriptors = 3), " \ |
| 93 | + ")" |
| 94 | + |
| 95 | +// CHECK: note: expanded from macro 'DemoNoteSourceLocations' |
| 96 | +// CHECK-NEXT: [[@LINE-5]] | " SRV(t17, numDescriptors = 7), " \ |
| 97 | +// CHECK-NEXT: | ^ |
| 98 | +// CHECK: note: expanded from macro 'DemoNoteSourceLocations' |
| 99 | +// CHECK-NEXT: [[@LINE-15]] | " SRV(t22, numDescriptors = 1), " |
| 100 | +// CHECK-NEXT: | ^ |
| 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}} |
| 104 | +[RootSignature(DemoNoteSourceLocations)] |
| 105 | +void bad_root_signature_14() {} |
0 commit comments