Permalink
Browse files

Merge pull request #10057 from unknownbrackets/vulkan-minor

Fix framebuffer leak in Vulkan
  • Loading branch information...
hrydgard committed Nov 5, 2017
2 parents 3c591ad + b2039bd commit 0b68130968aedeed170b95fc6fdad3ad690c1bd2
Showing with 22 additions and 3 deletions.
  1. +1 −1 ext/native/thin3d/VulkanQueueRunner.cpp
  2. +21 −2 ext/native/thin3d/VulkanRenderManager.cpp
@@ -326,8 +326,8 @@ void VulkanQueueRunner::PerformRenderPass(const VKRStep &step, VkCommandBuffer c
vkCmdPipelineBarrier(cmd, srcStage, dstStage, 0, 0, nullptr, 0, nullptr, 1, &barrier);
iter.fb->color.layout = barrier.newLayout;
iter.fb->Release();
}
iter.fb->Release();
}
// This is supposed to bind a vulkan render pass to the command buffer.
@@ -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();
}

3 comments on commit 0b68130

@Sunil2735

This comment has been minimized.

Show comment
Hide comment
@Sunil2735

Sunil2735 Nov 6, 2017

I really appreciate your work. I have been using it on my laptop and on my android Lenovo p2. From last few releases while installing it on Android device it's giving an error saying.. This package seems to be corrupted. Can you please fix this :)

Sunil2735 replied Nov 6, 2017

I really appreciate your work. I have been using it on my laptop and on my android Lenovo p2. From last few releases while installing it on Android device it's giving an error saying.. This package seems to be corrupted. Can you please fix this :)

@Sunil2735

This comment has been minimized.

Show comment
Hide comment
@Sunil2735

Sunil2735 Nov 6, 2017

I was able to sign the app with third party app worked for me.

Sunil2735 replied Nov 6, 2017

I was able to sign the app with third party app worked for me.

@Sunil2735

This comment has been minimized.

Show comment
Hide comment
@Sunil2735

Sunil2735 replied Nov 6, 2017

:)

Please sign in to comment.