dadd (sm5 - asm)

Component-wise double-precision add.

dadd[_sat] dest[.mask], [-]src0[_abs][.swizzle], [-]src1[_abs][.swizzle]
Item Description
dest
[in] The address of the result of the operation.
src0
[in] The components to add with src1.
src1
[in] The components to add with src0

Remarks

The valid swizzles for the source parameters are .xyzw, .xyxy, .zwxy, .zwzw. The valid dest masks are .xy, .zw, and .xyzw. The following mappings are post-swizzle:

  • dest is a double vec2 across (x 32LSB, y 32MSB) and (z 32LSB, w 32MSB).
  • src0 is a double vec2 across (x 32LSB, y 32MSB) and (z 32LSB, w 32MSB).
  • src1 is a double vec2 across (x 32LSB, y 32MSB) and (z 32LSB, w 32MSB).

The following table shows the results obtained when executing the instruction with various classes of numbers, assuming that neither overflow or underflow occurs.

F means finite-real number.

src0
src1->
-inf -F -0 +0 +F +inf NaN
-inf -inf -inf -inf -inf -inf NaN NaN
-F -inf -F src0 src0 +-F or +-0 +inf NaN
-0 -inf src1 -0 +0 src1 +inf NaN
+0 -inf src1 +0 +0 src1 +inf NaN
+F -inf +-F or +-0 src0 src0 +F +inf NaN
+inf NaN +inf +inf +inf +inf +inf NaN
NaN NaN NaN NaN NaN NaN NaN NaN

This instruction applies to the following shader stages:

Vertex Hull Domain Geometry Pixel Compute
X X X X X X

Minimum Shader Model

This instruction is supported in the following shader models:

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

Shader Model 5 Assembly (DirectX HLSL)