We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asfloat
clang/test/CodeGenHLSL/builtins/asfloat.hlsl
clang/test/SemaHLSL/BuiltIns/asfloat-errors.hlsl
There were no DXIL opcodes found for asfloat.
//dxc asfloat_test.hlsl -T lib_6_8 -enable-16bit-types -spirv -fspv-target-env=universal1.5 -fcgl -O0 export float4 fn(float p1) { return asfloat(p1); }
//dxc asfloat_1_test.hlsl -T lib_6_8 -enable-16bit-types -O0 export float4 fn(uint p1) { return asfloat(p1); }
//dxc asfloat_2_test.hlsl -T lib_6_8 -enable-16bit-types -O0 export float4 fn(int p1) { return asfloat(p1); }
Interprets the bit pattern of x as a floating-point number.
The input interpreted as a floating-point number.
This function is supported in the following shader models.
Older compilers incorrectly allowed asfloat(bool), but note that bool inputs are not supported.
asfloat(bool)
Intrinsic Functions (DirectX HLSL)
The text was updated successfully, but these errors were encountered:
@damyanp This one is already refined, but we should prioritize getting it assigned out. This is used in DirectML shader PixelPacking_Velocity.hlsli:28 and PixelPacking_Velocity.hlsli:41
Sorry, something went wrong.
I can work on this
This is currently awaiting changes on #107292 to be merged, such is introducing bit_cast implementation for HLSL, which is required for this changes.
bit_cast
1bfc3d0
joaosaffran
Successfully merging a pull request may close this issue.
asfloat
clang builtin (__builtin_bit_cast) with `hlsl_intrinsics.h``clang/test/CodeGenHLSL/builtins/asfloat.hlsl
clang/test/SemaHLSL/BuiltIns/asfloat-errors.hlsl
DirectX
There were no DXIL opcodes found for
asfloat
.SPIR-V
Description:
Test Case(s)
Example 1
Example 2
Example 3
HLSL:
Interprets the bit pattern of x as a floating-point number.
Parameters
Return Value
The input interpreted as a floating-point number.
Type Description
Function Overloads
`float<x> asfloat(float<x> value);` `float<x> asfloat(int<x> value);` `float<x> asfloat(uint<x> value);`
Minimum Shader Model
This function is supported in the following shader models.
Remarks
Older compilers incorrectly allowed
asfloat(bool)
, but note that bool inputs are not supported.See also
Intrinsic Functions (DirectX HLSL)
The text was updated successfully, but these errors were encountered: