File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
test/ObjectYAML/DXContainer Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,9 @@ DXContainerYAML::RootSignatureYamlDesc::create(
39
39
const object::DirectX::RootSignature &Data) {
40
40
41
41
RootSignatureYamlDesc RootSigDesc;
42
+ uint32_t Version = Data.getVersion ();
42
43
43
- RootSigDesc.Version = Data. getVersion () ;
44
+ RootSigDesc.Version = Version ;
44
45
RootSigDesc.NumStaticSamplers = Data.getNumStaticSamplers ();
45
46
RootSigDesc.StaticSamplersOffset = Data.getStaticSamplersOffset ();
46
47
RootSigDesc.NumRootParameters = Data.getNumRootParameters ();
@@ -82,17 +83,19 @@ DXContainerYAML::RootSignatureYamlDesc::create(
82
83
} else if (auto *RDV =
83
84
dyn_cast<object::DirectX::RootDescriptorView>(&ParamView)) {
84
85
llvm::Expected<dxbc::RST0::v1::RootDescriptor> DescriptorOrErr =
85
- RDV->read (Data. getVersion () );
86
+ RDV->read (Version );
86
87
if (Error E = DescriptorOrErr.takeError ())
87
88
return std::move (E);
88
89
auto Descriptor = *DescriptorOrErr;
89
90
NewP.Descriptor .ShaderRegister = Descriptor.ShaderRegister ;
90
91
NewP.Descriptor .RegisterSpace = Descriptor.RegisterSpace ;
92
+ if (Version > 1 ) {
91
93
#define ROOT_DESCRIPTOR_FLAG (Num, Val ) \
92
94
NewP.Descriptor .Val = \
93
95
(Descriptor.Flags & \
94
96
llvm::to_underlying (dxbc::RootDescriptorFlag::Val)) > 0 ;
95
97
#include " llvm/BinaryFormat/DXContainerConstants.def"
98
+ }
96
99
}
97
100
98
101
RootSigDesc.Parameters .push_back (NewP);
Original file line number Diff line number Diff line change 27
27
AllowInputAssemblerInputLayout : true
28
28
DenyGeometryShaderRootAccess : true
29
29
30
- # CHECK: - Name: RTS0
30
+ # CHECK: - Name: RTS0
31
31
# CHECK-NEXT: Size: 96
32
32
# CHECK-NEXT: RootSignature:
33
33
# CHECK-NEXT: Version: 1
You can’t perform that action at this time.
0 commit comments