|
1 | 1 | // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -ast-dump \
|
2 |
| -// RUN: -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_2 |
| 2 | +// RUN: -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_1 |
3 | 3 | // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -ast-dump \
|
4 | 4 | // RUN: -fdx-rootsignature-version=rootsig_1_0 \
|
5 | 5 | // RUN: -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-V1_0
|
@@ -139,3 +139,23 @@ void same_rs_string_main() {}
|
139 | 139 | // CHECK: -RootSignatureAttr 0x{{.*}} {{.*}} [[DIFF_RS_DECL]]
|
140 | 140 | [RootSignature(SampleDifferentRS)]
|
141 | 141 | void different_rs_string_main() {}
|
| 142 | + |
| 143 | +#define SampleStaticSamplerRS \ |
| 144 | + "StaticSampler(s0, flags = NON_NORMALIZED_COORDINATES)" |
| 145 | + |
| 146 | +// Ensure that static samplers flags are correctly parsed in different versions |
| 147 | + |
| 148 | +// CHECK: -HLSLRootSignatureDecl 0x{{.*}} {{.*}} implicit [[DIFF_RS_DECL:__hlsl_rootsig_decl_\d*]] |
| 149 | +// CHECK-V1_0: version: 1.0, |
| 150 | +// CHECK-V1_1: version: 1.1, |
| 151 | +// CHECK-SAME: RootElements{ |
| 152 | +// CHECK-SAME: StaticSampler( |
| 153 | +// CHECK-SAME: s0, filter = Anisotropic, addressU = Wrap, addressV = Wrap, addressW = Wrap, |
| 154 | +// CHECK-SAME: mipLODBias = 0.000000e+00, maxAnisotropy = 16, comparisonFunc = LessEqual, |
| 155 | +// CHECK-SAME: borderColor = OpaqueWhite, minLOD = 0.000000e+00, maxLOD = 3.402823e+38, space = 0, visibility = All |
| 156 | +// CHECK-SAME: flags = NonNormalizedCoordinates |
| 157 | +// CHECK-SAME: )} |
| 158 | + |
| 159 | +// CHECK: -RootSignatureAttr 0x{{.*}} {{.*}} [[DIFF_RS_DECL]] |
| 160 | +[RootSignature(SampleStaticSamplerRS)] |
| 161 | +void statoc_sampler_v12_main() {} |
0 commit comments