mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 06:25:37 +00:00
VulkanDevice: Fix crash on SW renderer switch
This commit is contained in:
parent
d068799515
commit
1f4a37f8eb
|
@ -221,10 +221,12 @@ VkImageLayout VulkanTexture::GetVkLayout() const
|
|||
VkCommandBuffer VulkanTexture::GetCommandBufferForUpdate()
|
||||
{
|
||||
VulkanDevice& dev = VulkanDevice::GetInstance();
|
||||
if (m_type != Type::Texture || m_use_fence_counter == dev.GetCurrentFenceCounter())
|
||||
if ((m_type != Type::Texture && m_type != Type::DynamicTexture) ||
|
||||
m_use_fence_counter == dev.GetCurrentFenceCounter())
|
||||
{
|
||||
// Console.WriteLn("Texture update within frame, can't use do beforehand");
|
||||
dev.EndRenderPass();
|
||||
if (dev.InRenderPass())
|
||||
dev.EndRenderPass();
|
||||
return dev.GetCurrentCommandBuffer();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue