mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-24 21:10:11 +00:00
Update documentation with a warning about memory containing garbage data not zeros
This commit is contained in:
parent
9586dbdced
commit
87528d084a
@ -116,7 +116,7 @@ including choice of `D3D12_HEAP_TYPE`.
|
||||
|
||||
The function also returns a new object of type D3D12MA::Allocation, created along
|
||||
with usual `ID3D12Resource`. It represents allocated memory and can be queried
|
||||
for size, offset, and `ID3D12Heap` if needed.
|
||||
for size, offset, `ID3D12Resource`, and `ID3D12Heap` if needed.
|
||||
|
||||
\code
|
||||
D3D12_RESOURCE_DESC resourceDesc = {};
|
||||
@ -161,6 +161,11 @@ it, at different offsets, using `ID3D12Device::CreatePlacedResource`. The librar
|
||||
manages its own collection of allocated memory blocks (heaps) and remembers which
|
||||
parts of them are occupied and which parts are free to be used for new resources.
|
||||
|
||||
It is important to remember that resources created as placed don't have their memory
|
||||
initialized to zeros, but may contain garbage data, so they need to be fully initialized
|
||||
before usage, e.g. using Clear (`ClearRenderTargetView`), Discard (`DiscardResource`),
|
||||
or copy (`CopyResource`).
|
||||
|
||||
The library also automatically handles resource heap tier.
|
||||
When `D3D12_FEATURE_DATA_D3D12_OPTIONS::ResourceHeapTier` equals `D3D12_RESOURCE_HEAP_TIER_1`,
|
||||
resources of 3 types: buffers, textures that are render targets or depth-stencil,
|
||||
|
Loading…
Reference in New Issue
Block a user