Skip to content

Commit 159cd57

Browse files
committed
addressing inbelic comments
1 parent b73bf24 commit 159cd57

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llvm/lib/ObjectYAML/DXContainerYAML.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ DXContainerYAML::RootSignatureYamlDesc::create(
212212
if (Version > 2) {
213213
#define STATIC_SAMPLER_FLAG(Num, Enum, Flag) \
214214
NewS.Enum = \
215-
(S.Flags & llvm::to_underlying(dxbc::StaticSamplerFlags::Enum)) > 0;
215+
(S.Flags & llvm::to_underlying(dxbc::StaticSamplerFlags::Enum));
216216
#include "llvm/BinaryFormat/DXContainerConstants.def"
217217
}
218218
RootSigDesc.StaticSamplers.push_back(NewS);

llvm/unittests/Object/DXContainerTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,9 @@ TEST(RootSignature, ParseStaticSamplers) {
12011201
ASSERT_EQ(Sampler.ShaderVisibility, 7u);
12021202
}
12031203
{
1204+
// this is testing static sampler parsing for root signature version 1.2,
1205+
// it changes: the version number, the size of root signature being emitted
1206+
// and the values for flag fields.
12041207
uint8_t Buffer[] = {
12051208
0x44, 0x58, 0x42, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
12061209
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,

0 commit comments

Comments
 (0)