Skip to content

Commit 79ea587

Browse files
committed
adding new test
1 parent e530bcc commit 79ea587

File tree

2 files changed

+65
-2
lines changed

2 files changed

+65
-2
lines changed

llvm/lib/ObjectYAML/DXContainerYAML.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,10 @@ DXContainerYAML::RootSignatureYamlDesc::create(
211211
NewS.ShaderVisibility = dxbc::ShaderVisibility(S.ShaderVisibility);
212212

213213
if (Version > 2) {
214-
if (Version > 1) {
215214
#define STATIC_SAMPLER_FLAG(Num, Enum, Flag) \
216215
NewS.Enum = \
217216
(S.Flags & llvm::to_underlying(dxbc::StaticSamplerFlags::Enum)) > 0;
218217
#include "llvm/BinaryFormat/DXContainerConstants.def"
219-
}
220218
}
221219
RootSigDesc.StaticSamplers.push_back(NewS);
222220
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
2+
3+
--- !dxcontainer
4+
Header:
5+
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
6+
0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
7+
Version:
8+
Major: 1
9+
Minor: 0
10+
PartCount: 1
11+
PartOffsets: [ 60 ]
12+
Parts:
13+
- Name: RTS0
14+
Size: 80
15+
RootSignature:
16+
Version: 3
17+
NumRootParameters: 0
18+
RootParametersOffset: 24
19+
NumStaticSamplers: 1
20+
StaticSamplersOffset: 24
21+
Parameters: []
22+
Samplers:
23+
- Filter: MinLinearMagMipPoint
24+
AddressU: Wrap
25+
AddressV: Mirror
26+
AddressW: MirrorOnce
27+
MipLODBias: 1.23
28+
MaxAnisotropy: 20
29+
ComparisonFunc: LessEqual
30+
BorderColor: TransparentBlack
31+
MinLOD: 4.56
32+
MaxLOD: 8.90
33+
ShaderRegister: 31
34+
RegisterSpace: 32
35+
ShaderVisibility: Mesh
36+
SAMPLER_FLAG_UINT_BORDER_COLOR: true
37+
AllowInputAssemblerInputLayout: true
38+
DenyGeometryShaderRootAccess: true
39+
40+
#CHECK: - Name: RTS0
41+
#CHECK-NEXT: Size: 80
42+
#CHECK-NEXT: RootSignature:
43+
#CHECK-NEXT: Version: 3
44+
#CHECK-NEXT: NumRootParameters: 0
45+
#CHECK-NEXT: RootParametersOffset: 24
46+
#CHECK-NEXT: NumStaticSamplers: 1
47+
#CHECK-NEXT: StaticSamplersOffset: 24
48+
#CHECK-NEXT: Parameters: []
49+
#CHECK-NEXT: Samplers:
50+
#CHECK-NEXT: - Filter: MinLinearMagMipPoint
51+
#CHECK-NEXT: AddressU: Wrap
52+
#CHECK-NEXT: AddressV: Mirror
53+
#CHECK-NEXT: AddressW: MirrorOnce
54+
#CHECK-NEXT: MipLODBias: 1.23
55+
#CHECK-NEXT: MaxAnisotropy: 20
56+
#CHECK-NEXT: ComparisonFunc: LessEqual
57+
#CHECK-NEXT: BorderColor: TransparentBlack
58+
#CHECK-NEXT: MinLOD: 4.56
59+
#CHECK-NEXT: MaxLOD: 8.9
60+
#CHECK-NEXT: ShaderRegister: 31
61+
#CHECK-NEXT: RegisterSpace: 32
62+
#CHECK-NEXT: ShaderVisibility: Mesh
63+
#CHECK-NEXT: SAMPLER_FLAG_UINT_BORDER_COLOR: true
64+
#CHECK-NEXT: AllowInputAssemblerInputLayout: true
65+
#CHECK-NEXT: DenyGeometryShaderRootAccess: true

0 commit comments

Comments
 (0)