eq (sm4 - asm)

Component-wise vector floating point equality comparison.

eq dest[.mask], [-]src0[_abs][.swizzle], [-]src1[_abs][.swizzle]




[in] The address of the result of the operation.


[in] The component to comapre to src1.


[in] The component to comapre to src0.



Performs the float comparison (src0 == src1) for each component, and writes the result to dest.

If the comparison is true, 0xFFFFFFFF is returned for that component. Otherwise 0x0000000 is returned.

Denorms are flushed before comparison (original source registers untouched). +0 equals -0. Comparison with NaN returns false.

This instruction applies to the following shader stages:

Vertex ShaderGeometry ShaderPixel Shader


Minimum Shader Model

This function is supported in the following shader models.

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


Related topics

Shader Model 4 Assembly (DirectX HLSL)