зеркало из https://github.com/AvaloniaUI/angle.git
Vulkan: Move pruneOrphanedBufferBlocks to last
RendererVk::cleanupGarbage() should call pruneOrphanedBufferBlocks() after clean up mSuballocationGarbage, so that we will be able to find the orphaned buffer block being empty if mSuballocationGarbage actually made it empty. Bug: chromium:1318110 Change-Id: I0cc6e45c192f406e7bbb15c7427d30e06208dd06 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3611648 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
This commit is contained in:
Родитель
266111a55d
Коммит
2a6e123b16
|
@ -3831,11 +3831,6 @@ angle::Result RendererVk::cleanupGarbage(Serial lastCompletedQueueSerial)
|
|||
{
|
||||
std::lock_guard<std::mutex> lock(mGarbageMutex);
|
||||
|
||||
if (!mOrphanedBufferBlocks.empty())
|
||||
{
|
||||
pruneOrphanedBufferBlocks();
|
||||
}
|
||||
|
||||
// Clean up general garbages
|
||||
while (!mSharedGarbage.empty())
|
||||
{
|
||||
|
@ -3858,6 +3853,13 @@ angle::Result RendererVk::cleanupGarbage(Serial lastCompletedQueueSerial)
|
|||
mSuballocationGarbage.pop();
|
||||
}
|
||||
|
||||
// Note: do this after clean up mSuballocationGarbage so that we will have more chances to find
|
||||
// orphaned blocks being empty.
|
||||
if (!mOrphanedBufferBlocks.empty())
|
||||
{
|
||||
pruneOrphanedBufferBlocks();
|
||||
}
|
||||
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче