diff --git a/src/util/vulkan_texture.cpp b/src/util/vulkan_texture.cpp index 77a6e48c5..42eaf9b56 100644 --- a/src/util/vulkan_texture.cpp +++ b/src/util/vulkan_texture.cpp @@ -1158,9 +1158,15 @@ void VulkanDownloadTexture::Flush() // Need to execute command buffer. if (dev.GetCurrentFenceCounter() == m_copy_fence_counter) + { + if (dev.InRenderPass()) + dev.EndRenderPass(); dev.SubmitCommandBuffer(true); + } else + { dev.WaitForFenceCounter(m_copy_fence_counter); + } } void VulkanDownloadTexture::SetDebugName(std::string_view name)