Skip to content

Commit efe76aa

Browse files
author
joaosaffran
committed
try fix test
1 parent c105458 commit efe76aa

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

llvm/lib/ObjectYAML/DXContainerYAML.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

llvm/test/ObjectYAML/DXContainer/RootSignature-Descriptor1.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Parts:
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

0 commit comments

Comments
 (0)