Struct GPUPrefixSum
Utility class for computing inclusive or exclusive prefix sums, directly or indirectly dispatched on the GPU.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public struct GPUPrefixSum
Constructors
GPUPrefixSum(SystemResources)
Initializes a re-usable GPU prefix sum instance.
Declaration
public GPUPrefixSum(GPUPrefixSum.SystemResources resources)
Parameters
Type | Name | Description |
---|---|---|
GPUPrefixSum.SystemResources | resources | The required system resources. |
Methods
DispatchDirect(CommandBuffer, in DirectArgs)
Prefix sum a list of data from a CPU-defined count.
Declaration
public void DispatchDirect(CommandBuffer cmdBuffer, in GPUPrefixSum.DirectArgs arguments)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmdBuffer | Command Buffer for recording the prefix sum commands. |
GPUPrefixSum.DirectArgs | arguments | Runtime arguments for the prefix sum. |
Exceptions
Type | Condition |
---|---|
Exception | When the input data is invalid. |
DispatchIndirect(CommandBuffer, in IndirectDirectArgs)
Prefix sum a list of data from a GPU-defined count.
Declaration
public void DispatchIndirect(CommandBuffer cmdBuffer, in GPUPrefixSum.IndirectDirectArgs arguments)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmdBuffer | Command Buffer for recording the prefix sum commands. |
GPUPrefixSum.IndirectDirectArgs | arguments | Runtime arguments for the prefix sum. |
Exceptions
Type | Condition |
---|---|
Exception | When the input data is invalid. |