SPIR-V Built-In
SampleId
Sample ID within a fragment
SampleId
Decorating a variable with the SampleId built-in decoration will make
that variable contain the coverage
index for the current fragment shader invocation.
SampleId ranges from zero to the number of samples in the framebuffer
minus one.
If a fragment shader entry point’s interface includes an input variable
decorated with SampleId, Sample Shading is
considered enabled with a minSampleShading value of 1.0.
Valid Usage
VUID-SampleId-SampleId-04354
The SampleId decoration must be used only within the Fragment
Execution Model
VUID-SampleId-SampleId-04355
The variable decorated with SampleId must be declared using the
Input Storage Class
VUID-SampleId-SampleId-04356
The variable decorated with SampleId must be declared as a scalar
32-bit integer value