summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-06-14 15:18:35 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-06-14 15:18:35 +0000
commit01a4d50c9bc2dbdf906542cf08f7a887352f4a1e (patch)
treefa72c3a34b909d3a323d10ec272aba8865b4402b /Graphics/GraphicsEngine
parentImproved setting dynamic buffer offsets (diff)
downloadDiligentCore-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.h3
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h10
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