VulkanDevice: Fix crash on SW renderer switch
This commit is contained in:
parent
d068799515
commit
1f4a37f8eb
|
@ -221,9 +221,11 @@ VkImageLayout VulkanTexture::GetVkLayout() const
|
||||||
VkCommandBuffer VulkanTexture::GetCommandBufferForUpdate()
|
VkCommandBuffer VulkanTexture::GetCommandBufferForUpdate()
|
||||||
{
|
{
|
||||||
VulkanDevice& dev = VulkanDevice::GetInstance();
|
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");
|
// Console.WriteLn("Texture update within frame, can't use do beforehand");
|
||||||
|
if (dev.InRenderPass())
|
||||||
dev.EndRenderPass();
|
dev.EndRenderPass();
|
||||||
return dev.GetCurrentCommandBuffer();
|
return dev.GetCurrentCommandBuffer();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue