public readonly record struct WorkgroupSizeThe number of invocations in one compute workgroup, from [ComputeShader(x, y, z)].
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Declared rather than defaulted. A compute dispatch is a count of workgroups, so the size is what turns that count into a number of invocations — a shader written for 64 and dispatched as if it were 1 reads out of bounds, and nothing downstream could detect it. Both targets require it: GLSL as layout(local_size_x = …) in;, SPIR-V as the LocalSize execution mode.
Three dimensions always, with the ones not written set to 1, so every consumer sees the same shape and nothing has to decide what an absent dimension means.
Fields and properties (6)
public int XInvocations along x.
public int YInvocations along y.
public int ZInvocations along z.
public static WorkgroupSize InvalidA size that was written but could not be read — a non-literal, a non-positive value, or more than three dimensions.
public bool IsInvalidTrue when this is Invalid.
public int TotalTotal invocations per workgroup.
Methods (2)
public WorkgroupSize(int X, int Y, int Z)The number of invocations in one compute workgroup, from [ComputeShader(x, y, z)].
public override string ToString()
Used by (9)
- ComputeTestsVixen.Raven.Tests
- DeclarationFactsVixen.Raven
- GlslEmitterVixen.Raven
- IrEntryPointVixen.Raven
- IrVerifierVixen.Raven
- MethodSymbolVixen.Raven
- SourceMethodSymbolVixen.Raven
- SourceNamedTypeSymbolVixen.Raven
- SpirvEmitterVixen.Raven