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/GraphicsEngine/include/DeviceObjectBase.h | 3 +++ Graphics/GraphicsEngine/interface/GraphicsTypes.h | 10 ++++++++++ 2 files changed, 13 insertions(+) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/include/DeviceObjectBase.h b/Graphics/GraphicsEngine/include/DeviceObjectBase.h index 09368cf4..37f7124a 100644 --- a/Graphics/GraphicsEngine/include/DeviceObjectBase.h +++ b/Graphics/GraphicsEngine/include/DeviceObjectBase.h @@ -119,6 +119,9 @@ public: } IRenderDevice *GetDevice()const{return m_pDevice;} + + template + Type* GetDevice()const{return ValidatedCast(m_pDevice);} private: /// Strong reference to the device diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index 55699f57..7967a6b8 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1373,6 +1373,16 @@ namespace Diligent /// If the heap size exceeds this value, it will be shrunk when /// resources are no longer required Uint32 DeferredCtxUploadHeapReserveSize = 2 << 20; + + /// Size of the dynamic heap (ring buffer that is used to suballocate + /// memory for dynamic resources) of the immediate context. + /// If ring buffer is not large enough to provide enough space, + /// sever performance penalties occur. + Uint32 ImmediateCtxDynamicHeapSize = 4 << 20; + + /// Size of the dynamic heap (ring buffer that is used to suballocate + /// memory for dynamic resources) of deferred contexts + Uint32 DeferredCtxDynamicHeapSize = 4 << 20; }; /// Box -- cgit v1.2.3