diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-12-10 02:06:45 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-12-10 02:06:45 +0000 |
| commit | 1f2359dbf6d2d8068cb4d0f9317e0e6727e2d408 (patch) | |
| tree | 6629c59d168987ef2c730cb1c81ced588859736c /Graphics/GraphicsTools | |
| parent | DynamicAtlasManager: few minor updates; disabled region merging tests (diff) | |
| download | DiligentCore-1f2359dbf6d2d8068cb4d0f9317e0e6727e2d408.tar.gz DiligentCore-1f2359dbf6d2d8068cb4d0f9317e0e6727e2d408.zip | |
Few updated to BufferSuballocator and DynamicTextureAtlas
Diffstat (limited to 'Graphics/GraphicsTools')
4 files changed, 13 insertions, 5 deletions
diff --git a/Graphics/GraphicsTools/interface/BufferSuballocator.h b/Graphics/GraphicsTools/interface/BufferSuballocator.h index 59251962..f9e15244 100644 --- a/Graphics/GraphicsTools/interface/BufferSuballocator.h +++ b/Graphics/GraphicsTools/interface/BufferSuballocator.h @@ -95,7 +95,7 @@ struct IBufferSuballocator : public IObject /// Returns the total remaining free size. - /// \note Due to fragmentation total free size may be split between + /// \note Due to fragmentation, total free size may be split between /// mutliple free chunks. virtual Uint32 GetFreeSize() = 0; @@ -121,6 +121,10 @@ struct BufferSuballocatorCreateInfo /// Allocation granularity for IBufferSuballocator objects. + + /// Buffer suballocator uses FixedBlockMemoryAllocator to allocate instances + /// of IBufferSuballocation implementation class. This memeber defines + /// the number of objects in one page. Uint32 SuballocationObjAllocationGranularity = 64; }; diff --git a/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h b/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h index 35ed4825..5441c715 100644 --- a/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h +++ b/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h @@ -144,6 +144,10 @@ struct DynamicTextureAtlasCreateInfo /// Allocation granularity for ITextureAtlasSuballocation objects. + + /// Texture atlas uses FixedBlockMemoryAllocator to allocate instances + /// of ITextureAtlasSuballocation implementation class. This memeber defines + /// the number of objects in one page. Uint32 SuballocationObjAllocationGranularity = 64; }; diff --git a/Graphics/GraphicsTools/src/BufferSuballocator.cpp b/Graphics/GraphicsTools/src/BufferSuballocator.cpp index d683978d..dcfbcded 100644 --- a/Graphics/GraphicsTools/src/BufferSuballocator.cpp +++ b/Graphics/GraphicsTools/src/BufferSuballocator.cpp @@ -74,8 +74,8 @@ public: return TBase::Release( [&]() // { - // We must keep parent alive while the object is being destroyed because - // it keeps the object allocator. + // We must keep parent alive while this object is being destroyed because + // the parent keeps the memory allocator for the object. pParent = m_pParentAllocator; }); } diff --git a/Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp b/Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp index a5c6b4e5..c0e824ae 100644 --- a/Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp +++ b/Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp @@ -75,8 +75,8 @@ public: return TBase::Release( [&]() // { - // We must keep the atlas alive while the object is being destroyed because - // the atlas keeps the object allocator. + // We must keep parent alive while this object is being destroyed because + // the parent keeps the memory allocator for the object. pAtlas = m_pParentAtlas; }); } |
