SPIR-V Built-In

FragInvocationCountEXT

Number of fragment shader invocations for a fragment
FragInvocationCountEXT

Decorating a variable with the FragInvocationCountEXT built-in decoration will make that variable contain the maximum number of fragment shader invocations for the fragment, as determined by minSampleShading.

If Sample Shading is not enabled, FragInvocationCountEXT will be filled with a value of 1.

Valid Usage

VUID-FragInvocationCountEXT-FragInvocationCountEXT-04217

The FragInvocationCountEXT decoration must be used only within the Fragment Execution Model

VUID-FragInvocationCountEXT-FragInvocationCountEXT-04218

The variable decorated with FragInvocationCountEXT must be declared using the Input Storage Class

VUID-FragInvocationCountEXT-FragInvocationCountEXT-04219

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