| 1 |
// RUN: %clang_dxc -T cs_6_0 -fcgl %s | FileCheck %s --check-prefixes=CHECK,REG |
| 2 |
// RUN: %clang_dxc -T cs_6_0 -fcgl -rootsig-define EmptyRS %s | FileCheck %s --check-prefixes=CHECK,EMPTY |
| 3 |
// RUN: %clang_dxc -T cs_6_0 -fcgl -rootsig-define CmdRS -D CmdRS='"SRV(t0)"' %s | FileCheck %s --check-prefixes=CHECK,CMD |
| 4 |
|
| 5 |
// Equivalent clang checks: |
| 6 |
// RUN: %clang -target dxil-unknown-shadermodel6.0-compute -S -emit-llvm -o - %s \ |
| 7 |
// RUN: | FileCheck %s --check-prefixes=CHECK,REG |
| 8 |
|
| 9 |
// RUN: %clang -target dxil-unknown-shadermodel6.0-compute -S -emit-llvm -o - %s \ |
| 10 |
// RUN: -fdx-rootsignature-define=EmptyRS \ |
| 11 |
// RUN: | FileCheck %s --check-prefixes=CHECK,EMPTY |
| 12 |
|
| 13 |
// RUN: %clang -target dxil-unknown-shadermodel6.0-compute -S -emit-llvm -o - %s \ |
| 14 |
// RUN: -fdx-rootsignature-define=CmdRS -D CmdRS='"SRV(t0)"' \ |
| 15 |
// RUN: | FileCheck %s --check-prefixes=CHECK,CMD |
| 16 |
|
| 17 |
#define EmptyRS "" |
| 18 |
#define NotEmptyRS "CBV(b0)" |
| 19 |
|
| 20 |
// CHECK: !dx.rootsignatures = !{![[#ENTRY:]]} |
| 21 |
// CHECK: ![[#ENTRY]] = !{ptr @main, ![[#RS:]], i32 2} |
| 22 |
|
| 23 |
// REG: ![[#RS]] = !{![[#CBV:]]} |
| 24 |
// REG: ![[#CBV]] = !{!"RootCBV" |
| 25 |
|
| 26 |
// EMPTY: ![[#RS]] = !{} |
| 27 |
|
| 28 |
// CMD: ![[#RS]] = !{![[#SRV:]]} |
| 29 |
// CMD: ![[#SRV]] = !{!"RootSRV" |
| 30 |
|
| 31 |
[shader("compute"), RootSignature(NotEmptyRS)] |
| 32 |
[numthreads(1,1,1)] |
| 33 |
void main() {} |