Class ComputeTask
Executes the compute effect class.
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class ComputeTask : BaseMaterial
Constructors
ComputeTask(Effect)
Initializes a new instance of the ComputeTask class.
Declaration
public ComputeTask(Effect effect)
Parameters
Type | Name | Description |
---|---|---|
Effect | effect | Instance of the effect. |
Fields
ComputeCommandQueue
Compute command queue.
Declaration
protected CommandQueue ComputeCommandQueue
Field Value
Type | Description |
---|---|
CommandQueue |
Methods
Destroy()
Destroys all resources of this instance.
Declaration
protected override void Destroy()
Overrides
PrepareComputeTask(string)
Creates pipeline, resource layout, and resource set.
Declaration
protected void PrepareComputeTask(string passName)
Parameters
Type | Name | Description |
---|---|---|
string | passName | Pass name. |
Run(CommandBuffer, uint, uint, uint, string)
Executes compute effect (dispatch).
Declaration
public void Run(CommandBuffer computeCommandBuffer, uint groupCountX, uint groupCountY, uint groupCountZ, string pass = "Default")
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | computeCommandBuffer | CommandBuffer instance. |
uint | groupCountX | The number of groups dispatched in the x direction. ThreadGroupCountX must be less than or equal to 65535. |
uint | groupCountY | The number of groups dispatched in the y direction. ThreadGroupCountY must be less than or equal to 65535. |
uint | groupCountZ | The number of groups dispatched in the z direction. ThreadGroupCountZ must be less than or equal to 65535. |
string | pass | Pass name. |
Run(uint, uint, uint, string)
Executes compute effect. (dispatch).
Declaration
public void Run(uint groupCountX, uint groupCountY, uint groupCountZ, string pass = "Default")
Parameters
Type | Name | Description |
---|---|---|
uint | groupCountX | The number of groups dispatched in the x direction. ThreadGroupCountX must be less than or equal to 65535. |
uint | groupCountY | The number of groups dispatched in the y direction. ThreadGroupCountY must be less than or equal to 65535. |
uint | groupCountZ | The number of groups dispatched in the z direction. ThreadGroupCountZ must be less than or equal to 65535. |
string | pass | The name of the pass. |
Run1D(CommandBuffer, uint, uint, string)
Executes a 1D compute effect.
Declaration
public void Run1D(CommandBuffer computeCommandBuffer, uint threadCountX, uint groupSizeX = 64, string pass = "Default")
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | computeCommandBuffer | The compute CommandBuffer. |
uint | threadCountX | The size of the problem. |
uint | groupSizeX | The group size, 64 by default. |
string | pass | The pass name. |
Run1D(uint, uint, string)
Executes a 1D compute effect.
Declaration
public void Run1D(uint threadCountX, uint groupSizeX = 64, string pass = "Default")
Parameters
Type | Name | Description |
---|---|---|
uint | threadCountX | The size of the problem. |
uint | groupSizeX | The group size, 64 by default. |
string | pass | The pass name. |
Run2D(CommandBuffer, uint, uint, uint, uint, string)
Executes a 2D compute effect.
Declaration
public void Run2D(CommandBuffer computeCommandBuffer, uint threadCountX, uint threadCountY, uint groupSizeX = 8, uint groupSizeY = 8, string pass = "Default")
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | computeCommandBuffer | The command buffer. |
uint | threadCountX | The size of the problem in the x dimension. |
uint | threadCountY | The size of the problem in the y dimension. |
uint | groupSizeX | The group size in the x dimension, 8 by default. |
uint | groupSizeY | The group size in the y dimension, 8 by default. |
string | pass | The pass name. |
Run2D(uint, uint, uint, uint, string)
Executes a 2D compute effect.
Declaration
public void Run2D(uint threadCountX, uint threadCountY, uint groupSizeX = 8, uint groupSizeY = 8, string pass = "Default")
Parameters
Type | Name | Description |
---|---|---|
uint | threadCountX | The x size of the problem. |
uint | threadCountY | The y size of the problem. |
uint | groupSizeX | The group size in x, 8 by default. |
uint | groupSizeY | The group size in y, 8 by default. |
string | pass | The pass name. |
Run3D(CommandBuffer, uint, uint, uint, uint, uint, uint, string)
Executes a 3D compute effect.
Declaration
public void Run3D(CommandBuffer computeCommandBuffer, uint threadCountX, uint threadCountY, uint threadCountZ, uint groupSizeX, uint groupSizeY, uint groupSizeZ, string pass = "Default")
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | computeCommandBuffer | The command buffer. |
uint | threadCountX | The X size of the problem. |
uint | threadCountY | The Y size of the problem. |
uint | threadCountZ | The Z size of the problem. |
uint | groupSizeX | The group size X. |
uint | groupSizeY | The group size Y. |
uint | groupSizeZ | The group size Z. |
string | pass | The pass name. |
Run3D(uint, uint, uint, uint, uint, uint, string)
Executes a 3D compute effect.
Declaration
public void Run3D(uint threadCountX, uint threadCountY, uint threadCountZ, uint groupSizeX, uint groupSizeY, uint groupSizeZ, string pass = "Default")
Parameters
Type | Name | Description |
---|---|---|
uint | threadCountX | The x size of the problem. |
uint | threadCountY | The y size of the problem. |
uint | threadCountZ | The z size of the problem. |
uint | groupSizeX | The group size in the x dimension. |
uint | groupSizeY | The group size in the y dimension. |
uint | groupSizeZ | The group size in the z dimension. |
string | pass | The pass name. |