summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
index 6dd304ac..cf4536b5 100644
--- a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
@@ -542,10 +542,13 @@ void SwapChainVkImpl::Present(Uint32 SyncInterval)
auto* pImmediateCtxVk = pDeviceContext.RawPtr<DeviceContextVkImpl>();
auto* pDeviceVk = m_pRenderDevice.RawPtr<RenderDeviceVkImpl>();
+ auto* pBackBuffer = GetCurrentBackBufferRTV()->GetTexture();
+ pImmediateCtxVk->UnbindTextureFromFramebuffer(ValidatedCast<TextureVkImpl>(pBackBuffer), false);
+
if (!m_IsMinimized)
{
// TransitionImageLayout() never triggers flush
- pImmediateCtxVk->TransitionImageLayout(GetCurrentBackBufferRTV()->GetTexture(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR);
+ pImmediateCtxVk->TransitionImageLayout(pBackBuffer, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR);
// The context can be empty if no render commands were issued by the app
//VERIFY(pImmediateCtxVk->GetNumCommandsInCtx() != 0, "The context must not be flushed");
pImmediateCtxVk->AddSignalSemaphore(m_DrawCompleteSemaphores[m_SemaphoreIndex]);