WaveGetLaneCount function

Returns the number of lanes in a wave on this architecture.


uint WaveGetLaneCount(void);


This function has no parameters.

Return value

The result will be between 4 and 128, and includes all waves: active, inactive, and/or helper lanes. The result returned from this function may vary significantly depending on the driver implementation.


This function is supported from shader model 6.0 in all shader stages.



 uint laneCount = WaveGetLaneCount();    // number of lanes in wave

See also

Overview of Shader Model 6

Shader Model 6