34 lines · plain
1// RUN: %clang_dxc -T cs_6_0 -fcgl %s | FileCheck %s --check-prefixes=CHECK,REG2// RUN: %clang_dxc -T cs_6_0 -fcgl -rootsig-define EmptyRS %s | FileCheck %s --check-prefixes=CHECK,EMPTY3// RUN: %clang_dxc -T cs_6_0 -fcgl -rootsig-define CmdRS -D CmdRS='"SRV(t0)"' %s | FileCheck %s --check-prefixes=CHECK,CMD4 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,REG8 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,EMPTY12 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,CMD16 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)]33void main() {}34