Struct ComputePipelineDescription
Describes a compute Pipeline, for creation using a ResourceFactory.
Implements
Inherited Members
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct ComputePipelineDescription : IEquatable<ComputePipelineDescription>
Constructors
ComputePipelineDescription(Shader, ResourceLayout, UInt32, UInt32, UInt32)
Constructs a new ComputePipelineDescription.
Declaration
public ComputePipelineDescription(Shader shaderStage, ResourceLayout resourceLayout, uint threadGroupSizeX, uint threadGroupSizeY, uint threadGroupSizeZ)
Parameters
| Type | Name | Description |
|---|---|---|
| Shader | shaderStage | The compute Shader to be used in the Pipeline. This must be a Shader with Compute. |
| ResourceLayout | resourceLayout | The resource layout available to the Pipeline. |
| System.UInt32 | threadGroupSizeX | The X dimension of the thread group size. |
| System.UInt32 | threadGroupSizeY | The Y dimension of the thread group size. |
| System.UInt32 | threadGroupSizeZ | The Z dimension of the thread group size. |
ComputePipelineDescription(Shader, ResourceLayout, UInt32, UInt32, UInt32, SpecializationConstant[])
Constructs a new ComputePipelineDescription.
Declaration
public ComputePipelineDescription(Shader shaderStage, ResourceLayout resourceLayout, uint threadGroupSizeX, uint threadGroupSizeY, uint threadGroupSizeZ, SpecializationConstant[] specializations)
Parameters
| Type | Name | Description |
|---|---|---|
| Shader | shaderStage | The compute Shader to be used in the Pipeline. This must be a Shader with Compute. |
| ResourceLayout | resourceLayout | The resource layout available to the Pipeline. |
| System.UInt32 | threadGroupSizeX | The X dimension of the thread group size. |
| System.UInt32 | threadGroupSizeY | The Y dimension of the thread group size. |
| System.UInt32 | threadGroupSizeZ | The Z dimension of the thread group size. |
| SpecializationConstant[] | specializations | An array of SpecializationConstant used to override specialization constants in the created Pipeline. Each element in this array describes a single ID-value pair, which will be matched with the constants specified in the Shader. |
ComputePipelineDescription(Shader, ResourceLayout[], UInt32, UInt32, UInt32)
Constructs a new ComputePipelineDescription.
Declaration
public ComputePipelineDescription(Shader computeShader, ResourceLayout[] resourceLayouts, uint threadGroupSizeX, uint threadGroupSizeY, uint threadGroupSizeZ)
Parameters
| Type | Name | Description |
|---|---|---|
| Shader | computeShader | The compute Shader to be used in the Pipeline. This must be a Shader with Compute. |
| ResourceLayout[] | resourceLayouts | The set of resource layouts available to the Pipeline. |
| System.UInt32 | threadGroupSizeX | The X dimension of the thread group size. |
| System.UInt32 | threadGroupSizeY | The Y dimension of the thread group size. |
| System.UInt32 | threadGroupSizeZ | The Z dimension of the thread group size. |
Fields
ComputeShader
Declaration
public Shader ComputeShader
Field Value
| Type | Description |
|---|---|
| Shader |
ResourceLayouts
An array of ResourceLayout, which controls the layout of shader resoruces in the Pipeline.
Declaration
public ResourceLayout[] ResourceLayouts
Field Value
| Type | Description |
|---|---|
| ResourceLayout[] |
Specializations
An array of SpecializationConstant used to override specialization constants in the created Pipeline. Each element in this array describes a single ID-value pair, which will be matched with the constants specified in the Shader.
Declaration
public SpecializationConstant[] Specializations
Field Value
| Type | Description |
|---|---|
| SpecializationConstant[] |
ThreadGroupSizeX
The X dimension of the thread group size.
Declaration
public uint ThreadGroupSizeX
Field Value
| Type | Description |
|---|---|
| System.UInt32 |
ThreadGroupSizeY
The Y dimension of the thread group size.
Declaration
public uint ThreadGroupSizeY
Field Value
| Type | Description |
|---|---|
| System.UInt32 |
ThreadGroupSizeZ
The Z dimension of the thread group size.
Declaration
public uint ThreadGroupSizeZ
Field Value
| Type | Description |
|---|---|
| System.UInt32 |
Methods
Equals(ComputePipelineDescription)
Element-wise equality.
Declaration
public bool Equals(ComputePipelineDescription other)
Parameters
| Type | Name | Description |
|---|---|---|
| ComputePipelineDescription | other | The instance to compare to. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if all elements and all array elements are equal; false otherswise. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A 32-bit signed integer that is the hash code for this instance. |