11// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -o - %s | FileCheck %s
22
3- // CHECK-DAG: ![[#EMPTY:]] = !{}
3+ // CHECK: !dx.rootsignatures = !{![[#FIRST_ENTRY:]], ![[#SECOND_ENTRY:]]}
4+
5+ // CHECK: ![[#FIRST_ENTRY]] = !{ptr @FirstEntry, ![[#EMPTY:]]}
6+ // CHECK: ![[#EMPTY]] = !{}
7+
48[shader ("compute" ), RootSignature ("" )]
59[numthreads (1 ,1 ,1 )]
610void FirstEntry () {}
711
8- // CHECK-DAG: ![[#CBV:]] = !{!"CBV", i32 1, i32 0, i32 0, i32 -1, i32 4}
9- // CHECK-DAG: ![[#SRV:]] = !{!"SRV", i32 4, i32 42, i32 3, i32 32, i32 0}
10- // CHECK-DAG: ![[#TABLE:]] = !{!"DescriptorTable", i32 0, ![[#CBV]], ![[#SRV]]}
11- // CHECK-DAG: ![[#SECOND_RS:]] = !{![[#TABLE]]}
12+ // CHECK: ![[#SECOND_ENTRY]] = !{ptr @SecondEntry, ![[#SECOND_RS:]]}
13+ // CHECK: ![[#SECOND_RS]] = !{![[#TABLE:]]}
14+ // CHECK: ![[#TABLE]] = !{!"DescriptorTable", i32 0, ![[#CBV:]], ![[#SRV:]]}
15+ // CHECK: ![[#CBV]] = !{!"CBV", i32 1, i32 0, i32 0, i32 -1, i32 4}
16+ // CHECK: ![[#SRV]] = !{!"SRV", i32 4, i32 42, i32 3, i32 32, i32 0}
1217
1318#define SampleDescriptorTable \
1419 "DescriptorTable( " \
@@ -19,11 +24,8 @@ void FirstEntry() {}
1924[numthreads (1 ,1 ,1 )]
2025void SecondEntry () {}
2126
22- // Sanity test to ensure no root is added for this function
27+ // Sanity test to ensure no root is added for this function as there is only
28+ // two entries in !dx.roosignatures
2329[shader ("compute" )]
2430[numthreads (1 ,1 ,1 )]
2531void ThirdEntry () {}
26-
27- // CHECK-DAG: ![[#FIRST_ENTRY:]] = !{ptr @FirstEntry, ![[#EMPTY]]}
28- // CHECK-DAG: ![[#SECOND_ENTRY:]] = !{ptr @SecondEntry, ![[#SECOND_RS]]}
29- // CHECK-DAG: !dx.rootsignatures = !{![[#FIRST_ENTRY]], ![[#SECOND_ENTRY]]}
0 commit comments