Class StagingDescriptorAllocator
StagingDescriptorAllocator allocates a fixed-size block of descriptors from a CPU descriptor heap pool.
Namespace: Evergine.DirectX12
Assembly: Evergine.DirectX12.dll
Syntax
public class StagingDescriptorAllocator
Constructors
StagingDescriptorAllocator(ID3D12Device, uint, uint, DescriptorHeapType)
Initializes a new instance of the StagingDescriptorAllocator class.
Declaration
public StagingDescriptorAllocator(ID3D12Device device, uint descriptorCount, uint heapSize, DescriptorHeapType heapType)
Parameters
| Type | Name | Description |
|---|---|---|
| ID3D12Device | device | The Direct3D12 device. |
| uint | descriptorCount | The number of descriptors per block. |
| uint | heapSize | The size of the heap. |
| DescriptorHeapType | heapType | The type of the descriptor heap. |
Properties
SizeIncrement
Gets the size increment for descriptors in this heap.
Declaration
public uint SizeIncrement { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
AllocateCPUDescriptors(out CPUDescriptorHeapAllocation)
Allocates CPU descriptors from the staging heap.
Declaration
public void AllocateCPUDescriptors(out CPUDescriptorHeapAllocation allocation)
Parameters
| Type | Name | Description |
|---|---|---|
| CPUDescriptorHeapAllocation | allocation | The allocated CPU descriptor heap allocation. |
Deallocate(ref CPUDescriptorHeapAllocation)
Deallocates a CPU descriptor allocation.
Declaration
public void Deallocate(ref CPUDescriptorHeapAllocation allocation)
Parameters
| Type | Name | Description |
|---|---|---|
| CPUDescriptorHeapAllocation | allocation | The CPU descriptor heap allocation to deallocate. |
Dispose()
Disposes the staging descriptor allocator and all its resources.
Declaration
public void Dispose()
Dispose(bool)
Disposes the staging descriptor allocator and all its resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Indicates whether the method is called from Dispose. |
~StagingDescriptorAllocator()
Finalizes an instance of the StagingDescriptorAllocator class.
Declaration
protected ~StagingDescriptorAllocator()