D3D12 Memory Allocator
The D3D12 Memory Allocator (D3D12MA) is a C++ library that provides a simple and easy-to-integrate API to help you allocate memory for DirectX®12 buffers and textures.
Today, we are excited to announce that we are releasing an update for ShadowFX that adds support for DirectX® 12.
As with the DirectX 11 version, integrating ShadowFX into an existing DirectX 12 renderer is simple. The usage of the library changed very little in comparison to DirectX 11.
The user has to be aware that the library binds its own Pipeline State Object (PSO) and Shader Resources Descriptor Heap (SRD Heap). The library does not save and restore states as in DirectX 11. After calling the library the PSO and SRD heap need to be explicitly reset.
For maximum efficiency the library does not automatically rename constant buffers. At initialization, the user has to provide the maximum number of instances that can potentially execute in parallel. The library uses this information to determine the amount of memory that needs to be allocated for constant buffers. Every time the library gets called the user provides an instance ID and the library uses this ID to read from the right constant buffer.
The ShadowFX12 sample on GitHub demonstrates how to use this new version of ShadowFX. Additional information can be found in the ShadowFX page.