diff --git a/Graphics/GraphicsTools/src/VertexPool.cpp b/Graphics/GraphicsTools/src/VertexPool.cpp index c77a25d5b..36489a8b1 100644 --- a/Graphics/GraphicsTools/src/VertexPool.cpp +++ b/Graphics/GraphicsTools/src/VertexPool.cpp @@ -216,6 +216,8 @@ class VertexPoolImpl final : public ObjectBase // We must use atomic because this value is read in another thread, // while m_Buffer internally does not use mutex or other synchronization. BufferSize.store(Buffer.GetDesc().Size); + + UpdateCommittedMemorySize(); } return Buffer.Update(pDevice, pContext); } @@ -353,6 +355,10 @@ class VertexPoolImpl final : public ObjectBase { m_AllocatedVertexCount.store(m_Mgr.GetUsedSize()); m_TotalVertexCount.store(m_Mgr.GetMaxSize()); + UpdateCommittedMemorySize(); + } + void UpdateCommittedMemorySize() + { Uint64 CommittedMemorySize = 0; for (const auto& BuffSize : m_BufferSizes) CommittedMemorySize += BuffSize.load();