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(
3939 const object::DirectX::RootSignature &Data) {
4040
4141 RootSignatureYamlDesc RootSigDesc;
42+ uint32_t Version = Data.getVersion ();
4243
43- RootSigDesc.Version = Data. getVersion () ;
44+ RootSigDesc.Version = Version ;
4445 RootSigDesc.NumStaticSamplers = Data.getNumStaticSamplers ();
4546 RootSigDesc.StaticSamplersOffset = Data.getStaticSamplersOffset ();
4647 RootSigDesc.NumRootParameters = Data.getNumRootParameters ();
@@ -82,17 +83,19 @@ DXContainerYAML::RootSignatureYamlDesc::create(
8283 } else if (auto *RDV =
8384 dyn_cast<object::DirectX::RootDescriptorView>(&ParamView)) {
8485 llvm::Expected<dxbc::RST0::v1::RootDescriptor> DescriptorOrErr =
85- RDV->read (Data. getVersion () );
86+ RDV->read (Version );
8687 if (Error E = DescriptorOrErr.takeError ())
8788 return std::move (E);
8889 auto Descriptor = *DescriptorOrErr;
8990 NewP.Descriptor .ShaderRegister = Descriptor.ShaderRegister ;
9091 NewP.Descriptor .RegisterSpace = Descriptor.RegisterSpace ;
92+ if (Version > 1 ) {
9193#define ROOT_DESCRIPTOR_FLAG (Num, Val ) \
9294 NewP.Descriptor .Val = \
9395 (Descriptor.Flags & \
9496 llvm::to_underlying (dxbc::RootDescriptorFlag::Val)) > 0 ;
9597#include " llvm/BinaryFormat/DXContainerConstants.def"
98+ }
9699 }
97100
98101 RootSigDesc.Parameters .push_back (NewP);
Original file line number Diff line number Diff line change 2727 AllowInputAssemblerInputLayout : true
2828 DenyGeometryShaderRootAccess : true
2929
30- # CHECK: - Name: RTS0
30+ # CHECK: - Name: RTS0
3131# CHECK-NEXT: Size: 96
3232# CHECK-NEXT: RootSignature:
3333# CHECK-NEXT: Version: 1
You can’t perform that action at this time.
0 commit comments