Implement the distance
HLSL Function
#99107
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.
distance
clang builtin,distance
clang builtin withhlsl_intrinsics.h
distance
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
distance
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/distance.hlsl
clang/test/SemaHLSL/BuiltIns/distance-errors.hlsl
int_dx_distance
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_distance
to24
inDXIL.td
distance.ll
anddistance_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_distance
intrinsic inIntrinsicsSPIRV.td
distance
lowering and map it toint_spv_distance
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/distance.ll
DirectX
SPIR-V
Distance:
Description:
Distance
Result is the distance between p0 and p1, i.e., length(p0 -
p1).
The operands must all be a scalar or vector whose component type is
floating-point.
Result Type must be a scalar of the same type as the component type of
the operands.
67
<id>
p0
<id>
p1
Test Case(s)
Example 1
HLSL:
Returns a distance scalar between two vectors.
Parameters
Return Value
A floating-point, scalar value that represents the distance between the x parameter and the y 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: