Skip to content

Commit a52dd67

Browse files
committed
fix analysis unit test for cbuffer
1 parent 1c12e65 commit a52dd67

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/unittests/Analysis/DXILResourceTest.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,12 @@ TEST(DXILResource, AnnotationsAndMetadata) {
367367

368368
// cbuffer cb0 { float4 g_X; float4 g_Y; }
369369
{
370-
StructType *CBufType0 =
370+
StructType *CBufStruct =
371371
StructType::create(Context, {Floatx4Ty, Floatx4Ty}, "cb0");
372-
ResourceTypeInfo RTI(llvm::TargetExtType::get(Context, "dx.CBuffer",
373-
CBufType0, {/*Size=*/32}));
372+
TargetExtType *CBufLayoutType =
373+
llvm::TargetExtType::get(Context, "dx.Layout", CBufStruct, {32, 0, 16});
374+
ResourceTypeInfo RTI(
375+
llvm::TargetExtType::get(Context, "dx.CBuffer", CBufLayoutType));
374376
EXPECT_EQ(RTI.getResourceClass(), ResourceClass::CBuffer);
375377
EXPECT_EQ(RTI.getCBufferSize(DL), 32u);
376378
EXPECT_EQ(RTI.getResourceKind(), ResourceKind::CBuffer);

0 commit comments

Comments
 (0)