PS Invocations
Description
The metric PS Invocations represents the number of pixel shader invocations. The pixel shader is invoked once per pixel.
However, on Intel® HD Graphics 2500/4000 if a significant number of pixels were discarded by the early depth and stencil tests, then the actual number of PS invocations will be lower than the value of this metric (check the Note below). The reason for the discrepancy is that PS Invocations is one of the standard Direct3D Pipeline Statistics counters, and as such it must conform to the standard notion of the Direct3D pipeline, in which depth testing always follows the pixel shader.
Examples
- If you render a quad with 8×8 pixels size that is located entirely within the viewing frustum, with depth and stencil tests disabled, the PS Invocations is 64.
- If you render a triangle that is located entirely within the viewing frustum, with depth and stencil tests disabled, the PS Invocations value is somewhat larger than the area of the triangle (check the Note below).
Improving performance
Generally, pixel shader workloads are one of the most expensive in the rendering pipeline due to the processing time required within the pixel shader. Therefore, keeping the number of pixel shader invocations as low as possible will likely improve your rendering performance.
NOTE
As with Intel® HD Graphics 3000/2000, the PS Invocations metric includes pixels rejected by the Early-Depth and stencil tests, even though the pixel shader was not actually invoked for these pixels. However, on Intel® HD Graphics 2500/4000, this metric also includes unlit pixels that were used to complete subsamples (a subsample is a 2×2 group of pixels that is the smallest unit processed in pixel shaders in Intel® HD Graphics 2500/4000). Therefore, even if the depth and stencil tests are disabled, this metric is likely higher than the value of the Pixels Rendered metric. For thin triangles this difference is significant.
See Also