diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-06-14 15:18:35 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-06-14 15:18:35 +0000 |
| commit | 01a4d50c9bc2dbdf906542cf08f7a887352f4a1e (patch) | |
| tree | fa72c3a34b909d3a323d10ec272aba8865b4402b /Graphics/GraphicsEngine | |
| parent | Improved setting dynamic buffer offsets (diff) | |
| download | DiligentCore-01a4d50c9bc2dbdf906542cf08f7a887352f4a1e.tar.gz DiligentCore-01a4d50c9bc2dbdf906542cf08f7a887352f4a1e.zip | |
Reworked dynamic buffer mapping using ring buffers
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/DeviceObjectBase.h | 3 | ||||
| -rw-r--r-- | Graphics/GraphicsEngine/interface/GraphicsTypes.h | 10 |
2 files changed, 13 insertions, 0 deletions
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<typename Type> + Type* GetDevice()const{return ValidatedCast<Type>(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 |
