Skip to content

Commit

Permalink
HnRenderDelegateMemoryStats: added pending vertex/index data size
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Nov 7, 2024
1 parent f86525a commit 3f38a6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Hydrogent/interface/HnRenderDelegate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ struct HnRenderDelegateMemoryStats

/// The number of allcations.
Uint32 AllocationCount = 0;

/// The amount of index data pending upload, in bytes.
Uint64 PendingDataSize = 0;
};
/// Index pool usage statistics.
IndexPoolUsage IndexPool;
Expand All @@ -96,6 +99,9 @@ struct HnRenderDelegateMemoryStats

/// The number of vertices allocated from the pool.
Uint64 AllocatedVertexCount = 0;

/// The amount vertex data pending upload, in bytes.
Uint64 PendingDataSize = 0;
};
/// Vertex pool usage statistics.
VertexPoolUsage VertexPool;
Expand Down
2 changes: 2 additions & 0 deletions Hydrogent/src/HnRenderDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,11 +825,13 @@ HnRenderDelegateMemoryStats HnRenderDelegate::GetMemoryStats() const
MemoryStats.IndexPool.CommittedSize = IndexUsage.CommittedSize;
MemoryStats.IndexPool.UsedSize = IndexUsage.UsedSize;
MemoryStats.IndexPool.AllocationCount = IndexUsage.AllocationCount;
MemoryStats.IndexPool.PendingDataSize = m_GeometryPool->GetPendingIndexDataSize();

MemoryStats.VertexPool.CommittedSize = VertexUsage.CommittedMemorySize;
MemoryStats.VertexPool.UsedSize = VertexUsage.UsedMemorySize;
MemoryStats.VertexPool.AllocationCount = VertexUsage.AllocationCount;
MemoryStats.VertexPool.AllocatedVertexCount = VertexUsage.AllocatedVertexCount;
MemoryStats.VertexPool.PendingDataSize = m_GeometryPool->GetPendingVertexDataSize();

MemoryStats.Atlas.CommittedSize = AtlasUsage.CommittedSize;
MemoryStats.Atlas.AllocationCount = AtlasUsage.AllocationCount;
Expand Down

0 comments on commit 3f38a6c

Please sign in to comment.