Implement the fwidth
HLSL Function
#99120
Labels
backend:DirectX
backend:SPIR-V
bot:HLSL
HLSL
HLSL Language Support
metabug
Issue to collect references to a group of similar or related issues.
fwidth
clang builtin,fwidth
clang builtin withhlsl_intrinsics.h
fwidth
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
fwidth
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/fwidth.hlsl
clang/test/SemaHLSL/BuiltIns/fwidth-errors.hlsl
int_dx_fwidth
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_fwidth
to83
inDXIL.td
fwidth.ll
andfwidth_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_fwidth
intrinsic inIntrinsicsSPIRV.td
fwidth
lowering and map it toint_spv_fwidth
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/fwidth.ll
DirectX
SPIR-V
OpFwidth:
Description:
Result is the same as computing the sum of the absolute values of
OpDPdx and OpDPdy on P.
Result Type must be a scalar or vector of floating-point
type using the IEEE 754 encoding. The component width must
be 32 bits.
The type of P must be the same as Result Type. P is the value to
take the derivative of.
This instruction is only valid in the Fragment Execution
Model.
Capability:
Shader
4
209
<id>
Result Type
Result <id>
<id>
P
Test Case(s)
Example 1
HLSL:
Returns the absolute value of the partial derivatives of the specified value.
This function computes the following: abs(ddx(x)) + abs(ddy(x)).
This function is only supported in pixel shaders.
Parameters
Return Value
The absolute value of the partial derivatives of the x parameter.
Type Description
Minimum Shader Model
This function is supported in the following shader models.
See also
Intrinsic Functions (DirectX HLSL)
The text was updated successfully, but these errors were encountered: