Commit Graph

9 Commits

Author SHA1 Message Date
Adam Sawicki
8f02da698d Minor fix: removed HEAP_TYPE_COUNT constant from the public interface 2022-02-24 16:04:58 +01:00
Adam Sawicki
f3af1d9a30 Finished major refactoring of the statistics and budget API. COMPATIBILITY BREAKING!
See structures: Statistics, DetailedStatistics, TotalStatistics, Budget.
Functions: Allocator::GetMemoryCapacity, GetBudget, CalculateStatistics,
Pool::GetStatistics, CalculateStatistics,
VirtualAllocation::GetStatistics, CalculateStatistics.

Updated and rebuilt the docs.
2022-02-24 16:02:04 +01:00
Adam Sawicki
92d23c0cba Refactoring of statistics API. COMPATIBILITY BREAKING!
See structures: Statistics, DetailedStatistics, TotalStatistics, functions: Pool::GetStatistics, Pool::CalculateStatistics, VirtualBlock::GetStatistics, VirtualBlock::CalculateStatistics, Allocator::CalculateStatistics.

Switched to TSLF algorithm as the default. Removed: POOL_FLAG_ALGORITHM_TLSF, VIRTUAL_BLOCK_FLAG_ALGORITHM_TLSF.
2022-02-23 10:30:34 +01:00
Adam Sawicki
3a3b44555a Added possibility to choose different allocation algorithm in custom pools and virtual blocks.
Changed behavior of VirtualBlock::Allocate, FreeAllocation: VirtualAllocation::AllocHandle = 0 (not UINT64_MAX) now means null allocation.
Ported linear allocation algorithm from VMA.
Renamed VIRTUAL_ALLOCATION_INFO members to uppercase Offset, Size.
Fixed D3D12MA_DEBUG_MARGIN not to be applied to virtual allocator.
Added test for D3D12MA_DEBUG_MARGIN (ported from VMA).
Code mostly by @medranSolus
Updated and rebuilt documentation.
2022-02-04 13:22:45 +01:00
Adam Sawicki
e99d1c9687 Added VirtualAllocation for VirtualBlock describing single allocation. COMPATIBILITY BREAKING!
Moved to using AllocHandle as unique identifier for single allocation instead of offset.
Changed D3D12_DEBUG_MARGIN to only be present at the end of each allocation.
Removed unused BlockMetadata::GetUnusedRangeSizeMax().
Added TLSF allocation algorithm - unused for now.

Code by @medranSolus
2022-02-01 12:31:35 +01:00
Adam Sawicki
517601c720 Updated copyright headers to year 2022
Change by @medranSolus
2022-01-21 13:01:05 +01:00
Adam Sawicki
9c97fcaae0 Changed the way ProtectedSession is passed. COMPATIBILITY BREAKING!
Using ProtectedSession now requires using custom pools.
Added POOL_DESC::pProtectedSession. Removed Allocator::CreateResource1, AllocateMemory1. Removed parameter pProtectedSession from Allocator::CreateCommittedResource2.
Code mostly by @medranSolus.
2022-01-13 13:14:49 +01:00
Adam Sawicki
4488fa2a73 Improved and rebuilt documentation 2021-12-03 18:08:24 +01:00
rayferric
69df7fe9d1 Add option to build as shared library 2021-11-24 01:22:58 +01:00