SPIR-V Built-In

PrimitiveCountNV

Number of primitives output by a mesh shader
PrimitiveCountNV

Decorating a variable with the PrimitiveCountNV decoration will make that variable contain the primitive count. The primitive count specifies the number of primitives in the output mesh produced by the mesh shader that will be processed by subsequent pipeline stages.

Valid Usage

VUID-PrimitiveCountNV-PrimitiveCountNV-04327

The PrimitiveCountNV decoration must be used only within the MeshNV Execution Model

VUID-PrimitiveCountNV-PrimitiveCountNV-04328

The variable decorated with PrimitiveCountNV must be declared using the Output Storage Class

VUID-PrimitiveCountNV-PrimitiveCountNV-04329

The variable decorated with PrimitiveCountNV must be declared as a scalar 32-bit integer value