From 47e9d6725a650a3fda9b443b5c7ee68163c2c7f5 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Tue, 21 Aug 2018 08:41:50 -0700 Subject: Fixed https://github.com/DiligentGraphics/DiligentCore/issues/21 (Make messages about unmapped dynamic buffers more verbose) --- Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp index 104dc021..ac223012 100644 --- a/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp @@ -500,9 +500,9 @@ void BufferVkImpl::DvpVerifyDynamicAllocation(DeviceContextVkImpl* pCtx)const { auto ContextId = pCtx->GetContextId(); const auto& DynAlloc = m_DynamicAllocations[ContextId]; - DEV_CHECK_ERR(DynAlloc.pDynamicMemMgr != nullptr, "Dynamic buffer '", m_Desc.Name, "' was not mapped before its first use. Context Id: ", ContextId); auto CurrentFrame = pCtx->GetContextFrameNumber(); - DEV_CHECK_ERR(DynAlloc.dvpFrameNumber == CurrentFrame, "Dynamic allocation is out-of-date. Dynamic buffer '", m_Desc.Name, "' must be mapped in the same frame it is used."); + DEV_CHECK_ERR(DynAlloc.pDynamicMemMgr != nullptr, "Dynamic buffer '", m_Desc.Name, "' has not been mapped before its first use. Context Id: ", ContextId, ". Note: memory for dynamic buffers is allocated when a buffer is mapped."); + DEV_CHECK_ERR(DynAlloc.dvpFrameNumber == CurrentFrame, "Dynamic allocation of dynamic buffer '", m_Desc.Name, "' in frame ", CurrentFrame, " is out-of-date. Note: contents of all dynamic resources is discarded at the end of every frame. A buffer must be mapped before its first use in any frame."); } #endif -- cgit v1.2.3