From 609a63ef71c504981e38d115dafc9cbf52dfa640 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 16 Sep 2018 11:49:54 -0700 Subject: Reworked dynamic memory allocation in D3D12 backend to not rely on ring buffer (fixed https://github.com/DiligentGraphics/DiligentCore/issues/23) --- Graphics/GraphicsEngine/interface/GraphicsTypes.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index 641e3272..7dc55c20 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1269,6 +1269,18 @@ namespace Diligent /// towards the limit. Command lists are only flushed when pipeline state is changed /// or when backbuffer is presented. Uint32 NumCommandsToFlushCmdList = 256; + + /// A device context uses dynamic heap when it needs to allocate temporary + /// CPU-accessible memory to update a resource via IBufer::UpdateData() or + /// ITexture::UpdateData(), or to map dynamic resources. + /// Device contexts first request a chunk of memory from global dynamic + /// resource manager and then suballocate from this chunk in a lock-free + /// fashion. DynamicHeapPageSize defines the size of this chunk. + Uint32 DynamicHeapPageSize = 1 << 20; + + /// Number of dynamic heap pages that will be reserved by the + /// global dynamic heap manager to avoid page creation at run time. + Uint32 NumDynamicHeapPagesToReserve = 1; }; /// Attributes specific to Vulkan engine -- cgit v1.2.3