Class ResourceGroupAllocator
Allocator for resource groups.
public class ResourceGroupAllocator : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
- Inheritance
-
objectResourceGroupAllocator
- Implements
- Inherited Members
- Extension Methods
Constructors
ResourceGroupAllocator(GraphicsResourceAllocator, CommandList)
public ResourceGroupAllocator(GraphicsResourceAllocator allocator, CommandList commandList)
Parameters
allocatorGraphicsResourceAllocatorcommandListCommandList
Methods
AllocateResourceGroup()
public ResourceGroup AllocateResourceGroup()
Returns
Destroy()
Disposes the object's resources.
protected override void Destroy()
Remarks
Override in a derived class to implement disposal logic specific to it.
This method is automatically called whenever a call to Dispose() (or to Release()) has decreased the internal reference count to zero, meaning no other objects (hopefully) hold a reference to this one and its resources can be safely released.
Flush()
Makes constant buffer writes visible to the GPU.
public void Flush()
Remarks
Pools stay mapped until Reset(CommandList), so resource group data can still be updated during the draw phase. The memory is host coherent, so there is nothing to do here.
PrepareResourceGroup(ResourceGroupLayout, BufferPoolAllocationType, ResourceGroup)
public void PrepareResourceGroup(ResourceGroupLayout resourceGroupLayout, BufferPoolAllocationType constantBufferAllocationType, ResourceGroup resourceGroup)
Parameters
resourceGroupLayoutResourceGroupLayoutconstantBufferAllocationTypeBufferPoolAllocationTyperesourceGroupResourceGroup
Reset(CommandList)
public void Reset(CommandList commandList)
Parameters
commandListCommandList