countbits (sm5 - asm)

Counts the number of bits set in a number.

countbits dest[.mask], src0[.swizzle]

 

ItemDescription

dest

[in] The address of the results.

src0

[in] The input 32-bit number.

 

Remarks

This instruction can be used to compute shader input coverage percentage.

This instruction applies to the following shader stages:

VertexHullDomainGeometryPixelCompute
XX X XXX

 

Minimum Shader Model

This instruction is supported in the following shader models:

Shader ModelSupported
Shader Model 5 yes
Shader Model 4.1 no
Shader Model 4 no
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no

 

Related topics

Shader Model 5 Assembly (DirectX HLSL)

 

 

Show: