ddiv (sm5 - asm)

Computes a component-wise double-precision division.

ddiv[_sat] dest[.mask], [-]src0[_abs][.swizzle] [-]src1[_abs][.swizzle]

 

ItemDescription

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+infNaN
-infNaN+inf+inf+inf-inf-inf-infNaNNaN
-F+0+F-src0+inf-infsrc0-F -0NaN
-0+0+0+0NaNNaN-0-0-0NaN
+0-0-0-0NaNNaN+0+0+0NaN
+F-0-F-src0-inf+infsrc0+F+0NaN
+infNaN-inf-inf-inf+inf+inf+infNaNNaN
NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN

 

This instruction applies to the following shader stages:

VertexHullDomainGeometryPixelCompute
XX XXXX

 

Minimum Shader Model

This instruction is supported in the following shader models:

Shader ModelSupported
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

 

Related topics

Shader Model 5 Assembly (DirectX HLSL)

 

 

Show: