Struct ComputeBufferDesc
Descriptor used to create compute buffer resources
Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
Syntax
public struct ComputeBufferDesc
Constructors
ComputeBufferDesc(Int32, Int32)
ComputeBufferDesc constructor.
Declaration
public ComputeBufferDesc(int count, int stride)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | count | Number of elements in the buffer. |
| Int32 | stride | Size of one element in the buffer. |
ComputeBufferDesc(Int32, Int32, ComputeBufferType)
ComputeBufferDesc constructor.
Declaration
public ComputeBufferDesc(int count, int stride, ComputeBufferType type)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | count | Number of elements in the buffer. |
| Int32 | stride | Size of one element in the buffer. |
| ComputeBufferType | type | Type of the buffer. |
Fields
count
Number of elements in the buffer..
Declaration
public int count
Field Value
| Type | Description |
|---|---|
| Int32 |
name
Compute Buffer name.
Declaration
public string name
Field Value
| Type | Description |
|---|---|
| String |
stride
Size of one element in the buffer. Has to match size of buffer type in the shader.
Declaration
public int stride
Field Value
| Type | Description |
|---|---|
| Int32 |
type
Type of the buffer, default is ComputeBufferType.Default (structured buffer).
Declaration
public ComputeBufferType type
Field Value
| Type | Description |
|---|---|
| ComputeBufferType |
Methods
GetHashCode()
Hash function
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 | The texture descriptor hash. |