-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Implement the degrees
HLSL Function
#99104
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
Comments
@llvm/issue-subscribers-clang-codegen Author: Farzon Lotfi (farzonl)
- [ ] Implement `degrees` clang builtin,
- [ ] Link `degrees` clang builtin with `hlsl_intrinsics.h`
- [ ] Add sema checks for `degrees` to `CheckHLSLBuiltinFunctionCall` in `SemaChecking.cpp`
- [ ] Add codegen for `degrees` to `EmitHLSLBuiltinExpr` in `CGBuiltin.cpp`
- [ ] Add codegen tests to `clang/test/CodeGenHLSL/builtins/degrees.hlsl`
- [ ] Add sema tests to `clang/test/SemaHLSL/BuiltIns/degrees-errors.hlsl`
- [ ] Create the `int_spv_degrees` intrinsic in `IntrinsicsSPIRV.td`
- [ ] In SPIRVInstructionSelector.cpp create the `degrees` lowering and map it to `int_spv_degrees` in `SPIRVInstructionSelector::selectIntrinsic`.
- [ ] Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/degrees.ll`
DirectXThere were no DXIL opcodes found for SPIR-VDegrees:Description:Degrees Converts radians to degrees, i.e., radians * 180 / π. The operand radians must be a scalar or vector whose component type is Result Type and the type of radians must be the same type. Results <table> Test Case(s)Example 1//dxc degrees_test.hlsl -T lib_6_8 -enable-16bit-types -O0
export float4 fn(float4 p1) {
return degrees(p1);
} HLSL:Converts the specified value from radians to degrees.
Parameters
Return ValueThe result of converting the x parameter from radians to degrees. Type Description
Minimum Shader ModelThis function is supported in the following shader models.
See also<dl> <dt> Intrinsic Functions (DirectX HLSL) |
@llvm/issue-subscribers-clang-frontend Author: Farzon Lotfi (farzonl)
- [ ] Implement `degrees` clang builtin,
- [ ] Link `degrees` clang builtin with `hlsl_intrinsics.h`
- [ ] Add sema checks for `degrees` to `CheckHLSLBuiltinFunctionCall` in `SemaChecking.cpp`
- [ ] Add codegen for `degrees` to `EmitHLSLBuiltinExpr` in `CGBuiltin.cpp`
- [ ] Add codegen tests to `clang/test/CodeGenHLSL/builtins/degrees.hlsl`
- [ ] Add sema tests to `clang/test/SemaHLSL/BuiltIns/degrees-errors.hlsl`
- [ ] Create the `int_spv_degrees` intrinsic in `IntrinsicsSPIRV.td`
- [ ] In SPIRVInstructionSelector.cpp create the `degrees` lowering and map it to `int_spv_degrees` in `SPIRVInstructionSelector::selectIntrinsic`.
- [ ] Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/degrees.ll`
DirectXThere were no DXIL opcodes found for SPIR-VDegrees:Description:Degrees Converts radians to degrees, i.e., radians * 180 / π. The operand radians must be a scalar or vector whose component type is Result Type and the type of radians must be the same type. Results <table> Test Case(s)Example 1//dxc degrees_test.hlsl -T lib_6_8 -enable-16bit-types -O0
export float4 fn(float4 p1) {
return degrees(p1);
} HLSL:Converts the specified value from radians to degrees.
Parameters
Return ValueThe result of converting the x parameter from radians to degrees. Type Description
Minimum Shader ModelThis function is supported in the following shader models.
See also<dl> <dt> Intrinsic Functions (DirectX HLSL) |
- add degrees builtin - link degrees api in hlsl_intrinsics.h - add degrees intrinsic to IntrinsicsDirectX.td - add degrees intrinsic to IntrinsicsSPIRV.td - add lowering from clang builtin to dx/spv intrinsics in CGBuiltin.cpp - add semantic checks to SemaHLSL.cpp - add expansion of directx intrinsic to llvm fmul for DirectX in DXILIntrinsicExpansion.cpp - add mapping to spir-v intrinsic in SPIRVInstructionSelector.cpp - add test coverage: - degrees.hlsl -> check hlsl lowering to dx/spv degrees intrinsics - degrees-errors.hlsl/half-float-only-errors -> check semantic warnings - hlsl-intrinsics/degrees.ll -> check lowering of spir-v degrees intrinsic to SPIR-V backend - DirectX/degrees.ll -> check expansion and scalarization of directx degrees intrinsic to fmul Resolves llvm#99104
degrees
clang builtin,degrees
clang builtin withhlsl_intrinsics.h
degrees
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
degrees
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/degrees.hlsl
clang/test/SemaHLSL/BuiltIns/degrees-errors.hlsl
int_spv_degrees
intrinsic inIntrinsicsSPIRV.td
degrees
lowering and map it toint_spv_degrees
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/degrees.ll
DirectX
There were no DXIL opcodes found for
degrees
.SPIR-V
Degrees:
Description:
Degrees
Converts radians to degrees, i.e., radians * 180 / π.
The operand radians must be a scalar or vector whose component type is
16-bit or 32-bit floating-point.
Result Type and the type of radians must be the same type. Results
are computed per component.
12
<id>
radians
Test Case(s)
Example 1
HLSL:
Converts the specified value from radians to degrees.
Parameters
Return Value
The result of converting the x parameter from radians to degrees.
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: