From 6e663135a6d194f5ed8b41f112c6d5a2c98b080d Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 6 Aug 2020 11:30:15 -0700 Subject: Added few debug checks --- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index 5f26479d..3162e3be 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -911,6 +911,11 @@ void DeviceContextVkImpl::FinishFrame() "All queries must be ended before the frame is finished."); } + if (m_pActiveRenderPass != nullptr) + { + LOG_ERROR_MESSAGE("Finishing frame inside an active render pass."); + } + if (!m_MappedTextures.empty()) LOG_ERROR_MESSAGE("There are mapped textures in the device context when finishing the frame. All dynamic resources must be used in the same frame in which they are mapped."); @@ -1012,7 +1017,9 @@ void DeviceContextVkImpl::Flush() m_State = ContextState{}; m_DescrSetBindInfo.Reset(); m_CommandBuffer.Reset(); - m_pPipelineState = nullptr; + m_pPipelineState = nullptr; + m_pActiveRenderPass = nullptr; + m_pBoundFramebuffer = nullptr; } void DeviceContextVkImpl::SetVertexBuffers(Uint32 StartSlot, -- cgit v1.2.3