Skip to content

Commit 9821885

Browse files
New JSON dump format
Unified across VMA and D3D12MA. Updated Python script for visualization - now called GpuMemDumpVis.py. Code by @medranSolus
1 parent 583aee7 commit 9821885

26 files changed

Lines changed: 1333 additions & 470 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Additional features:
4141
- Statistics: Obtain brief or detailed statistics about the amount of memory used, unused, number of allocated heaps, number of allocations etc. - globally and per memory heap type. Current memory usage and budget as reported by the system can also be queried.
4242
- Debug annotations: Associate custom `void* pPrivateData` and debug `LPCWSTR pName` with each allocation.
4343
- JSON dump: Obtain a string in JSON format with detailed map of internal state, including list of allocations, their string names, and gaps between them.
44-
- Convert this JSON dump into a picture to visualize your memory using attached Python script.
44+
- Convert this JSON dump into a picture to visualize your memory. See [tools/GpuMemDumpVis](tools/GpuMemDumpVis/README.md).
4545
- Virtual allocator - an API that exposes the core allocation algorithm to be used without allocating real GPU memory, to allocate your own stuff, e.g. sub-allocate pieces of one large buffer.
4646

4747
# Prerequisites

include/D3D12MemAlloc.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ enum ALLOCATION_FLAGS
237237
*/
238238
ALLOCATION_FLAG_UPPER_ADDRESS = 0x8,
239239

240-
241240
/** Set this flag if the allocated memory will have aliasing resources.
242241
243242
Use this when calling D3D12MA::Allocator::CreateResource() and similar to
@@ -570,7 +569,6 @@ class D3D12MA_API Allocation : public IUnknownImpl
570569
UINT64 m_Size;
571570
UINT64 m_Alignment;
572571
ID3D12Resource* m_Resource;
573-
UINT m_CreationFrameIndex;
574572
void* m_pPrivateData;
575573
wchar_t* m_Name;
576574

@@ -1246,8 +1244,9 @@ class D3D12MA_API Allocator : public IUnknownImpl
12461244
*/
12471245
void CalculateStatistics(TotalStatistics* pStats);
12481246

1249-
/// Builds and returns statistics as a string in JSON format.
1250-
/** @param[out] ppStatsString Must be freed using Allocator::FreeStatsString.
1247+
/** \brief Builds and returns statistics as a string in JSON format.
1248+
*
1249+
@param[out] ppStatsString Must be freed using Allocator::FreeStatsString.
12511250
@param DetailedMap `TRUE` to include full list of allocations (can make the string quite long), `FALSE` to only return statistics.
12521251
*/
12531252
void BuildStatsString(WCHAR** ppStatsString, BOOL DetailedMap) const;

0 commit comments

Comments
 (0)