Skip to content

Commit 5be870d

Browse files
committed
I don't need to cull_frees myself, second allocation attempt fires deferred memory free anyway
1 parent 46c78a8 commit 5be870d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/nbl/ext/ImGui/ImGui.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,7 @@ namespace nbl::ext::imgui
794794

795795
if (unallocatedSize != 0u)
796796
{
797-
// retry & cull frees
798-
m_mdi.streamingTDBufferST->cull_frees();
797+
// retry, second attempt cull frees and execute deferred memory deallocation of offsets no longer in use
799798
unallocatedSize = m_mdi.streamingTDBufferST->multi_allocate(timeout, MDI_ALLOCATION_COUNT, multiAllocParams.offsets.data(), multiAllocParams.byteSizes.data(), MDI_ALIGNMENTS.data());
800799

801800
if (unallocatedSize != 0u)
@@ -973,8 +972,6 @@ namespace nbl::ext::imgui
973972
auto waitInfo = info.getFutureScratchSemaphore();
974973
m_mdi.streamingTDBufferST->multi_deallocate(MDI_ALLOCATION_COUNT, multiAllocParams.offsets.data(), multiAllocParams.byteSizes.data(), waitInfo);
975974
}
976-
977-
m_mdi.streamingTDBufferST->cull_frees();
978975

979976
return true;
980977
}

0 commit comments

Comments
 (0)