drcp (sm5 - asm)

Computes a component-wise double-precision reciprocal.

drcp[_sat] dest[.mask], [-]src0[_abs][.swizzle]
Item Description
dest
[in] The address of the results
dest = 1.0 / src0. The result value must be accurate to 1.0 ULP
src0
[in] The number to take the reciprocal of.

Remarks

The DRCP instruction is emitted by the HLSL compiler only when explicitly called via the rcp() intrinsic, when a double is used as the argument. The accuracy of this instruction is required to be 1.0 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 obtained when executing the instruction with various classes of numbers, assuming that neither overflow or underflow occurs.

In this table F means finite-real number.

src-> -inf -F -0 +0 +F +inf NaN
dest-> -0 -F -inf +inf +F +0 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)