Skip to content

Commit 6e95a77

Browse files
committed
Improvements in TestSmallTextureAlignment
1 parent 04c0219 commit 6e95a77

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Tests.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,18 +1961,20 @@ static void TestSmallTextureAlignment(const TestContext& ctx)
19611961
CHECK_BOOL(alloc1->GetHeap() != nullptr);
19621962
CHECK_BOOL(alloc0->GetHeap() == alloc1->GetHeap());
19631963

1964+
// Note these asserts may fail if you use D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT=2.
19641965
const UINT64 expectedAlignment = belowThreshold ? smallAlignment : largeAlignment;
19651966
CHECK_BOOL((alloc0->GetOffset() % expectedAlignment) == 0);
19661967
CHECK_BOOL((alloc1->GetOffset() % expectedAlignment) == 0);
19671968
if (belowThreshold)
19681969
{
19691970
const UINT64 nonZeroOffset = alloc0->GetOffset() > 0 ? alloc0->GetOffset() : alloc1->GetOffset();
1970-
wprintf(L" Small alignment case: format=%u msaa=%u size=%llux%u offset=%llu\n",
1971+
wprintf(L" Small alignment case: format=%u msaa=%u size=%llux%u offset=%llu -> small alignment %s\n",
19711972
(UINT)textureCase.Format,
19721973
isMsaa ? 1u : 0u,
19731974
resDesc.Width,
19741975
resDesc.Height,
1975-
nonZeroOffset);
1976+
nonZeroOffset,
1977+
nonZeroOffset < largeAlignment ? L"YES" : L"NO");
19761978
}
19771979

19781980
alloc1.Reset();

0 commit comments

Comments
 (0)