The metric CS Invocations represents the number of compute shader invocations. The Compute Shader is invoked once per thread per thread group. The number of threads per thread group is defined by the Compute Shader’s numthreads attribute (numthreads(tX, tY, tZ)). The number of thread groups executed is determined by the parameters to the Dispatch call (Dispatch(gX, gY, gZ)). CS Invocations is equal to (gX*gY*gZ)*(tX*tY*tZ).
- If the numthreads attribute is numthreads(4, 4, 1) and Dispatch is called as Dispatch(16, 16, 16), the CS Invocations value will be equal to (16*16*16)*(4*4*1) = 65536.