Skip to content

Commit

Permalink
Vulkan: Wait for queue idle in DestroyBackbuffers.
Browse files Browse the repository at this point in the history
Otherwise it's only done after destroying Draw, so no need to mutex.
  • Loading branch information
unknownbrackets committed Nov 5, 2017
1 parent efbba31 commit ebe9dca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion Windows/GPU/WindowsVulkanContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ void WindowsVulkanContext::SwapBuffers() {
}

void WindowsVulkanContext::Resize() {
g_Vulkan->WaitUntilQueueIdle();
draw_->HandleEvent(Draw::Event::LOST_BACKBUFFER, g_Vulkan->GetBackbufferWidth(), g_Vulkan->GetBackbufferHeight());
g_Vulkan->DestroyObjects();

Expand Down
1 change: 0 additions & 1 deletion android/jni/app-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ void AndroidVulkanContext::SwapBuffers() {
}

void AndroidVulkanContext::Resize() {
g_Vulkan->WaitUntilQueueIdle();
draw_->HandleEvent(Draw::Event::LOST_BACKBUFFER, g_Vulkan->GetBackbufferWidth(), g_Vulkan->GetBackbufferHeight());
g_Vulkan->DestroyObjects();

Expand Down
2 changes: 2 additions & 0 deletions ext/native/thin3d/VulkanRenderManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ void VulkanRenderManager::DestroyBackbuffers() {
}
thread_.join();
}
vulkan_->WaitUntilQueueIdle();

VkDevice device = vulkan_->GetDevice();
for (uint32_t i = 0; i < swapchainImageCount_; i++) {
vulkan_->Delete().QueueDeleteImageView(swapchainImages_[i].view);
Expand Down

0 comments on commit ebe9dca

Please sign in to comment.