-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Implement the ldexp
HLSL Function
#99133
New issue
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
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.
Comments
@farzonl another with a global intrinsic |
51 tasks
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this issue
May 6, 2025
Closes llvm#99133. Implemented `ldexp` entirely in `hlsl_intrinsics.h` and `hlsl_intrinsic_helpers.h`, added coresponding tests in `clang/test/CodeGenHLSL/builtins/ldexp.hlsl` and `clang/test/SemaHLSL/BuiltIns/ldexp-errors.hlsl`.
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this issue
May 6, 2025
Closes llvm#99133. Implemented `ldexp` entirely in `hlsl_intrinsics.h` and `hlsl_intrinsic_helpers.h`, added coresponding tests in `clang/test/CodeGenHLSL/builtins/ldexp.hlsl` and `clang/test/SemaHLSL/BuiltIns/ldexp-errors.hlsl`.
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this issue
May 6, 2025
Closes llvm#99133. Implemented `ldexp` entirely in `hlsl_intrinsics.h` and `hlsl_intrinsic_helpers.h`, added coresponding tests in `clang/test/CodeGenHLSL/builtins/ldexp.hlsl` and `clang/test/SemaHLSL/BuiltIns/ldexp-errors.hlsl`.
GeorgeARM
pushed a commit
to GeorgeARM/llvm-project
that referenced
this issue
May 7, 2025
Closes llvm#99133. Implemented `ldexp` entirely in `hlsl_intrinsics.h` and `hlsl_intrinsic_helpers.h`, added coresponding tests in `clang/test/CodeGenHLSL/builtins/ldexp.hlsl` and `clang/test/SemaHLSL/BuiltIns/ldexp-errors.hlsl`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ldexp
entirely inhlsl_intrinsics.h
and other hlsl headers.ldexp
codgen tests in clang/test/CodeGenHLSL/builtins/ldexp.hlslldexp
sema tests in clang/test/SemaHLSL/BuiltIns/ldexp-errors.hlslhttps://hlsl.godbolt.org/z/97c4GxGrP
Implementation should look something like this:
DirectX
SPIR-V
Exp2:
Description:
Exp2
Result is 2 raised to the x power; 2x.
The operand x must be a scalar or vector whose component type is
16-bit or 32-bit floating-point.
Result Type and the type of x must be the same type. Results are
computed per component.
29
<id>
x
Test Case(s)
Example 1
HLSL:
Returns the result of multiplying the specified value by two, raised to the power of the specified exponent.
This function uses the following formula: x * 2exp
Parameters
Return Value
The result of multiplying the x parameter by two, raised to the power of the exp parameter.
Type Description
Minimum Shader Model
This function is supported in the following shader models.
Requirements
See also
Intrinsic Functions (DirectX HLSL)
The text was updated successfully, but these errors were encountered: