mad (sm4 - asm)

Component-wise multiply & add.

:mad[_sat] dest[.mask], [-]src0[_abs][.swizzle], [-]src1[_abs][.swizzle], [-]src2[_abs][.swizzle]

 

ItemDescription

dest

[in] The result of the operation.

dest = src0 * src1 + src2

src0

[in] The multiplicand.

src1

[in] The multiplier.

src2

[in] The addend.

 

Remarks

This instruction applies to the following shader stages:

Vertex ShaderGeometry ShaderPixel Shader
xxx

 

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)

 

 

Show: