Implement the f32tof16
HLSL Function
#99113
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.
f32tof16
clang builtin,f32tof16
clang builtin withhlsl_intrinsics.h
f32tof16
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
f32tof16
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/f32tof16.hlsl
clang/test/SemaHLSL/BuiltIns/f32tof16-errors.hlsl
int_dx_f32tof16
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_f32tof16
to130
inDXIL.td
f32tof16.ll
andf32tof16_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_f32tof16
intrinsic inIntrinsicsSPIRV.td
f32tof16
lowering and map it toint_spv_f32tof16
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/f32tof16.ll
DirectX
SPIR-V
PackHalf2x16:
Description:
PackHalf2x16
Result is the unsigned integer obtained by converting the components of
a two-component floating-point vector to the 16-bit OpTypeFloat, and
then packing these two 16-bit integers into a 32-bit unsigned integer.
The first vector component specifies the 16 least-significant bits of
the result; the second component specifies the 16 most-significant
bits.
The v operand must be a vector of 2 components whose type is a 32-bit
floating-point.
Result Type must be a 32-bit integer type.
58
<id>
v
Test Case(s)
Example 1
HLSL:
Converts an input into a float16 type.
Syntax
Parameters
value [in]
Type: float
The input value.
Return value
Type: uint
The converted value, stored in the low-half of the uint.
Remarks
The following overloaded versions are also available:
Minimum Shader Model
This function is supported in the following shader models.
Although this function is available in Shader Model 4 and higher shader models, because it is emulated in 4.0 and 4.1, it is less perfomant on these shader models than it is on Shader Model 5.
This function is supported in the following types of shaders:
See also
Intrinsic Functions
Shader Model 5
The text was updated successfully, but these errors were encountered: