| Issue |
97625
|
| Summary |
Implement the `GetRemainingRecursionLevels` HLSL Function
|
| Labels |
backend:DirectX,
HLSL,
HLSL_Bot
|
| Assignees |
|
| Reporter |
farzonl
|
- [ ] Implement `GetRemainingRecursionLevels` clang builtin,
- [ ] Link `GetRemainingRecursionLevels` clang builtin with `hlsl_intrinsics.h`
- [ ] Add sema checks for `GetRemainingRecursionLevels` to `CheckHLSLBuiltinFunctionCall` in `SemaChecking.cpp`
- [ ] Add codegen for `GetRemainingRecursionLevels` to `EmitHLSLBuiltinExpr` in `CGBuiltin.cpp`
- [ ] Add codegen tests to `clang/test/CodeGenHLSL/builtins/GetRemainingRecursionLevels.hlsl`
- [ ] Add sema tests to `clang/test/SemaHLSL/BuiltIns/GetRemainingRecursionLevels-errors.hlsl`
- [ ] Create the `int_dx_GetRemainingRecursionLevels` intrinsic in `IntrinsicsDirectX.td`
- [ ] Create the `DXILOpMapping` of `int_dx_GetRemainingRecursionLevels` to `253` in `DXIL.td`
- [ ] Create the `GetRemainingRecursionLevels.ll` and `GetRemainingRecursionLevels_errors.ll` tests in `llvm/test/CodeGen/DirectX/`
## DirectX
| DXIL Opcode | DXIL OpName | Shader Model | Shader Stages |
| ----------- | ----------- | ------------ | ------------- |
| 253 | GetRemainingRecursionLevels | 6.8 | ('node',) |
## SPIR-V
There is no support for `GetRemainingRecursionLevels` when targeting SPIR-V.
## Test Case(s)
### Example 1
```hlsl
//dxc GetRemainingRecursionLevels_test.hlsl -T lib_6_8 -enable-16bit-types -O0
RWBuffer<uint> buf0;
[shader("node")]
[NodeDispatchGrid(1, 1, 1)]
[numthreads(1, 1, 1)]
void fn() {
buf0[0] = GetRemainingRecursionLevels();
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs