umad (sm4 - asm)

Unsigned integer multiply and add.

umad dest[.mask], src0[.swizzle], src1[.swizzle], src2[.swizzle]
Item Description
dest
[in] The address of the result of the operation.
src0
[in] The value to multiply with src1.
src1
[in] The value to multiply withsrc1.
src2
[in] The value to add to the product of src0 and src1.

Remarks

Component-wise umul of 32-bit operands src0 and src1 unsigned, keeping the low 32-bits, per component, of the result. This instruction then performs an iadd of src2, producing the correct low 32-bit (per component) result. The 32-bit results are placed in dest.

This instruction applies to the following shader stages:

Vertex Shader Geometry Shader Pixel Shader
x x x

Minimum Shader Model

This function is supported in the following shader models.

Shader Model Supported
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

Shader Model 4 Assembly (DirectX HLSL)