File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments