Commit Graph

248 Commits

Author SHA1 Message Date
Adam Sawicki
49fb8acf85 Removed Pool::SetMinBytes, Allocator::SetDefaultHeapMinBytes (compatibility breaking!)
More refactoring. Added private enum ResourceClass.
2021-03-19 13:25:07 +01:00
Adam Sawicki
b2c5183078 More coding... 2021-03-19 12:10:43 +01:00
Adam Sawicki
b78ae97f66 More refactoring - added AllocatorPimpl::AllocateHeap_Impl 2021-03-17 18:01:23 +01:00
Adam Sawicki
9d6ccc289d Refactoring - added class CommittedAllocationList 2021-03-17 17:26:29 +01:00
Adam Sawicki
0a79fdfbd2 Added internal function SaveStatsStringToFile 2021-03-11 14:24:05 +01:00
Adam Sawicki
cf6c586e57 Added documentation chapter "Custom memory pools" 2021-03-11 14:17:56 +01:00
Adam Sawicki
35e67c8562 Added Allocator::IsUMA, IsCacheCoherentUMA
Also fixes in TestDevice4.
2021-03-11 13:40:24 +01:00
Adam Sawicki
45014bd2f3 Added test for a pool created out of CUSTOM heap 2021-03-11 13:23:24 +01:00
Adam Sawicki
2b70645a93 Improvements in the sample app
Now accepting command line parameters. Command line syntax:
-h, --Help   Print this information
-l, --List   Print list of GPUs
-g S, --GPU S   Select GPU with name containing S
-i N, --GPUIndex N   Select GPU index N

Added printing of adapter and device capabilities related to memory at startup.
Added struct GPUSelection, class DXGIUsage, struct CommandLineParameters.
Fixed macros CHECK_BOOL,. CHECK_HR.
Improved error handling.
2021-03-11 12:26:59 +01:00
Adam Sawicki
8f26fbb39e Started coding parsing command line parameters 2021-03-10 15:05:56 +01:00
Adam Sawicki
ac9ad24090 More coding, finished the feature
Added (restored) function IsHeapTypeStandard.
2021-03-10 14:50:10 +01:00
Adam Sawicki
18b8827ef9 Merge branch 'master' into feature-custom-heap-type
# Conflicts:
#	src/D3D12MemAlloc.h
2021-03-10 14:23:30 +01:00
Adam Sawicki
ff55a25199 Fixed #include of DXGI header
Fixes #13
2021-03-10 14:15:25 +01:00
Adam Sawicki
ae6c3ab6c4 Added support for D3D12_HEAP_TYPE_CUSTOM to custom pools. Unfinished.
Replaced member POOL_DESC::HeapType with HeapProperties. Compatibility breaking!
Incrased constant HEAP_TYPE_COUNT to 4.
2021-03-10 14:12:23 +01:00
Adam Sawicki
e7e5c2a4fe Optimization: custom pools are on an intrusive double linked list not sorted vector
Added struct PoolListItemTraits.
2021-03-03 17:03:53 +01:00
Adam Sawicki
3a335d55c9 Optimization: committed allocations are on an intrusive double linked list not sorted vector
Added class IntrusiveLinkedList, struct CommittedAllocationListItemTraits.
2021-03-03 16:34:58 +01:00
Adam Sawicki
5457bcdaee Minor fix in documentation 2021-02-16 17:44:14 +01:00
Adam Sawicki
2898fadfb4 Changed default heap size to 64 MB 2021-02-16 17:37:09 +01:00
Adam Sawicki
322bba84d9 Updated copyright headers to year 2021 2021-02-16 17:32:24 +01:00
Adam Sawicki
ba435fdbf1 Rebuilt binary using Visual Studio 2019 2021-02-16 17:16:10 +01:00
Adam Sawicki
8f51856d69 Fixed bug in AllocatorPimpl::CalculateStats
Also added debug macro D3D12MA_FORCE_RESOURCE_HEAP_TIER.
Fixes #10
2021-02-16 16:17:42 +01:00
Adam Sawicki
a618364260 Comment out part of TestDevice4 as it causes unexpected BSOD
See #10
2021-02-12 15:54:06 +01:00
Adam Sawicki
e56c26d810 Some refactoring. 2020-11-04 15:42:35 +01:00
Adam Sawicki
6a963fbdbb Added Allocator::CreateResource2 2020-11-04 15:23:30 +01:00
Adam Sawicki
ebf4f8de09 Improvement in predefined value of D3D12MA_DXGI_1_4 macro 2020-11-04 14:21:40 +01:00
Adam Sawicki
3fe3ee520d Added Allocator::CreateResource1, AllocateMemory1 2020-11-04 14:16:44 +01:00
Adam Sawicki
a322398f6c Optimization in AllocatorPimpl::GetResourceAllocationInfo 2020-11-04 13:12:36 +01:00
Adam Sawicki
3bd061da36 More imrovements and additions in documentation. 2020-11-03 16:55:25 +01:00
Adam Sawicki
06619626d0 Improved documentation. 2020-11-03 15:38:08 +01:00
Adam Sawicki
169895d529 Change logic of Allocator::CreateResource so that an interface other than ID3D12Resource can be requested
Wrote test for it.
2020-08-18 17:44:10 +02:00
Adam Sawicki
8d07472608 Add documentation chapter "Resource aliasing (overlap)" 2020-08-18 17:14:45 +02:00
Adam Sawicki
290272a156 Add documentation chapter "Virtual allocator" 2020-07-16 17:59:18 +02:00
Adam Sawicki
c93b6767cb Fix typo in README.md 2020-07-16 16:37:44 +02:00
Adam Sawicki
158f78588d Minor fixes in documentation. 2020-07-15 14:02:15 +02:00
Adam Sawicki
0af956a556 Merge branch 'feature-virtual-allocator' 2020-07-15 13:54:39 +02:00
Adam Sawicki
c6bb710c48 Improvement in AlignUp, AlignDown 2020-07-06 17:42:51 +02:00
Adam Sawicki
87fd45b038 Fixed coding style 2020-06-15 17:58:54 +02:00
Adam Sawicki
8dfdc0e7cd Add virtual allocator - struct VIRTUAL_BLOCK_DESC, VIRTUAL_ALLOCATION_DESC, VIRTUAL_ALLOCATION_INFO, class VirtualBlock, function CreateVirtualBlock.
Also updated Doxyfile to Doxygen 1.8.18.
2020-06-15 17:43:54 +02:00
Adam Sawicki
2eb11e7ef8 Fixes in usage of Map/Unmap to fix D3D Debug Layer EXECUTION WARNING #930: MAP_INVALID_NULLRANGE 2020-06-04 16:42:12 +02:00
Adam Sawicki
0478883903 Fixes in usage of Map/Unmap to fix D3D Debug Layer EXECUTION WARNING #930: MAP_INVALID_NULLRANGE 2020-06-04 16:39:44 +02:00
Adam Sawicki
4c905740fe Update date in license 2020-06-04 12:51:29 +02:00
Adam Sawicki
4fec3e1627 Set higher warning level, check successful CPU allocation with an assert
Also fixes in documentation and other minor
2020-05-25 17:52:53 +02:00
Adam Sawicki
bf36fb708e Some fixes for compiler warnings
Closes #6
2020-05-25 17:27:38 +02:00
Adam Sawicki
aff54a5d8a Remove configuration macro D3D12MA_ALLOW_SHADER_ATOMICS and automatic usage of D3D12_HEAP_FLAG_ALLOW_SHADER_ATOMICS 2020-05-05 12:12:20 +02:00
Adam Sawicki
d8b6c230e7 Remove unnecessary assert in AllocatorPimpl::BuildStatsString 2020-05-04 15:19:47 +02:00
Adam Sawicki
51ab1e3711
Merge pull request #5 from debaetsd/master
fixed invalid bitsPerPixel compare in CanUseSmallAlignment
2020-05-04 11:38:16 +02:00
Adam Sawicki
397a9b3973 Fixes for some platforms 2020-04-30 14:44:11 +02:00
debaetsd
9d42a6341e
whitespace 2020-04-17 20:27:56 +02:00
Dieter De Baets
1ea4b4de27 fixed invalid bitsPerPixel compare in CanUseSmallAlignment 2020-04-17 20:26:35 +02:00
Adam Sawicki
79db457378 Add memory reservation feature - functions Allocator::SetDefaultHeapMinBytes, Pool::SetMinBytes 2020-04-07 20:35:26 +02:00