Implement the normalize
HLSL Function
#99139
Labels
backend:DirectX
backend:SPIR-V
bot:HLSL
clang:codegen
IR generation bugs: mangling, exceptions, etc.
HLSL
HLSL Language Support
metabug
Issue to collect references to a group of similar or related issues.
normalize
clang builtin,normalize
clang builtin withhlsl_intrinsics.h
normalize
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
normalize
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/normalize.hlsl
clang/test/SemaHLSL/BuiltIns/normalize-errors.hlsl
int_dx_normalize
intrinsic inIntrinsicsDirectX.td
int_dx_normalize
inllvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp
normalize.ll
andnormalize_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_normalize
intrinsic inIntrinsicsSPIRV.td
normalize
lowering and map it toint_spv_normalize
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/normalize.ll
DirectX
SPIR-V
Normalize:
Description:
Normalize
Result is the vector in the same direction as x but with a length of
1.
The operand x must be a scalar or vector whose component type is
floating-point.
Result Type and the type of x must be the same type.
69
<id>
x
Test Case(s)
Example 1
HLSL:
Normalizes the specified floating-point vector according to x / length(x).
Parameters
Return Value
The normalized x parameter. If the length of the x parameter is 0, the result is indefinite.
Remarks
The normalize HLSL intrinsic function uses the following formula: x / length(x).
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: