ddiv (sm5 - asm)

Computes a component-wise double-precision division.

ddiv[_sat] dest[.mask], [-]src0[_abs][.swizzle], [-]src1[_abs][.swizzle]
Item Description
dest
[in] The result of the operation. The result value must be accurate to 0.5 ULP.
src0
[in] The dividend.
src1
[in] The divisor.

Remarks

The DDIV instruction will be emitted by the HLSL compiler whenever the division operator is used with doubles. The accuracy of this instruction will be required to be 0.5 ULP.

Shaders that use this instruction will be marked with a shader flag that will cause them to fail to bind unless all the following conditions are met.

  • The system supports DirectX 11.1.
  • The system includes a WDDM 1.2 driver.
  • The driver reports support for this instruction via D3D11_FEATURE_DATA_D3D11_OPTIONS.ExtendedDoublesShaderInstructions set to TRUE.

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

In this table F means finite-real number.

src0 src1 -> -inf -F -1.0 -0 +0 +1.0 +F +inf NaN
-inf NaN +inf +inf +inf -inf -inf -inf NaN NaN
-F +0 +F -src0 +inf -inf src0 -F -0 NaN
-0 +0 +0 +0 NaN NaN -0 -0 -0 NaN
+0 -0 -0 -0 NaN NaN +0 +0 +0 NaN
+F -0 -F -src0 -inf +inf src0 +F +0 NaN
+inf NaN -inf -inf -inf +inf +inf +inf NaN NaN
NaN 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)