Permalink
Browse files

Vulkan: Fix leak in WipeQueue().

  • Loading branch information...
unknownbrackets committed Nov 5, 2017
1 parent 63e78ef commit b2039bd14fdd0aef755beb2689d3aae6e271ddf6
Showing with 21 additions and 2 deletions.
  1. +21 −2 ext/native/thin3d/VulkanRenderManager.cpp
@@ -616,8 +616,27 @@ void VulkanRenderManager::Finish() {
void VulkanRenderManager::Wipe() {
int curFrame = vulkan_->GetCurFrame();
for (auto iter : steps_) {
delete iter;
for (auto step : steps_) {
// Need to release held framebuffers.
switch (step->stepType) {
case VKRStepType::RENDER:
for (const auto &iter : step->preTransitions) {
iter.fb->Release();
}
break;
case VKRStepType::COPY:
step->copy.src->Release();
step->copy.dst->Release();
break;
case VKRStepType::BLIT:
step->blit.src->Release();
step->blit.dst->Release();
break;
case VKRStepType::READBACK:
step->readback.src->Release();
break;
}
delete step;
}
steps_.clear();
}

0 comments on commit b2039bd

Please sign in to comment.