Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
abs
all
any
cos
ddx
ddy
dot
dst
exp
fma
lit
log
mad
max
min
mul
pow
rcp
sin
tan
Expand Minimize

fma

Returns the double-precision fused multiply-addition of a * b + c.

ret fma(double a, b, c);

 

Parameters

a

[in] The first value in the fused multiply-addition.

b

[in] The second value in the fused multiply-addition.

c

[in] The third value in the fused multiply-addition.

Return Value

The double-precision fused multiply-addition of parameters a * b + c. The returned value must be accurate to 0.5 units of least precision (ULP).

Remarks

The fma intrinsic must support NaNs, INFs, and Denorms.

To use the fma intrinsic in your shader code, call the ID3D11Device::CheckFeatureSupport method with D3D11_FEATURE_D3D11_OPTIONS to verify that the Direct3D device supports the ExtendedDoublesShaderInstructions feature option. The fma intrinsic requires a WDDM 1.2 display driver, and all WDDM 1.2 display drivers must support fma. If your app creates a rendering device with feature level 11.0 or 11.1 and the compilation target is shader model 5 or later, the HLSL source code can use the fma intrinsic.

Type Description

Name Template Type Component Type Size
ascalar, vector, or matrix double any
bsame as input a double same dimensions as input a
csame as input a double same dimensions as input a
retsame as input a double same dimensions as input a

 

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader model 5 or later yes

 

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

 

 

Community Additions

ADD
Show:
© 2015 Microsoft