From 01a4d50c9bc2dbdf906542cf08f7a887352f4a1e Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 14 Jun 2018 08:18:35 -0700 Subject: Reworked dynamic buffer mapping using ring buffers --- Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h | 2 +- Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h index f69fad39..5a0be377 100644 --- a/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h +++ b/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h @@ -63,7 +63,7 @@ public: virtual void Unmap( IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags )override; #ifdef _DEBUG - void DbgVerifyDynamicAllocation(Uint32 ContextId); + void DbgVerifyDynamicAllocation(Uint32 ContextId)const; #endif virtual ID3D12Resource *GetD3D12Buffer(size_t &DataStartByteOffset, Uint32 ContextId)override final diff --git a/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp index ac05ccab..b2077fe0 100644 --- a/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp @@ -459,7 +459,7 @@ void BufferD3D12Impl::CreateCBV(D3D12_CPU_DESCRIPTOR_HANDLE CBVDescriptor) } #ifdef _DEBUG -void BufferD3D12Impl::DbgVerifyDynamicAllocation(Uint32 ContextId) +void BufferD3D12Impl::DbgVerifyDynamicAllocation(Uint32 ContextId)const { VERIFY(m_DynamicData[ContextId].GPUAddress != 0, "Dynamic buffer must be mapped before the first use"); auto CurrentFrame = ValidatedCast(GetDevice())->GetCurrentFrameNumber(); -- cgit v1.2.3