ComputeShaderAttribute

Description

sealed class Tinman.Gpu.Semantic.ComputeShaderAttribute

Derived from

Attribute abstract

The annotated method is the top-level entry point for a Compute Shader (CS), for example:

[ComputeShader(3, 2, 1)]
public static void CS_ComputeShader(
  [System(Value.DispatchId)] int3 groupId,
  [System(Value.ThreadId)] int3 threadId)
{
  ...
}

A Compute Shader may have zero or more parameters, where each one must have one of the following system value semantics:

The return type of a Compute Shader method must be CxTypeSimple.Void.

Public / Constructors

Compute​Shader​Attribute


public constructor ComputeShaderAttribute → (3)

in : int32

The component value for ThreadCount.

in : int32

The component value for ThreadCount.

in : int32

The component value for ThreadCount.

Creates a new instance of ComputeShader.

Public / Attributes

Thread​Count


public attribute ThreadCount → (Vec3I)

The number of threads to spawn for each dispatched compute group.