diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-07-12 18:02:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-12 18:02:36 -0400 |
| commit | bbd9c2e6d7b57f5acc3238083ab2f7c7b140df5e (patch) | |
| tree | b6abec59b4ff3fe92436db35c1e61a6df236f550 /source/slang/slang-ir.cpp | |
| parent | 4ed3aafa20b667329f2f9dea94d7c65dc2e80db4 (diff) | |
Extend `no_diff` to support subscript operations on resources and array variables… (#2981)
* Extend `no_diff` to support subscript operations on resources and array variables
* Update autodiff.slang.expected
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 84730c913..a44667a79 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -3236,6 +3236,17 @@ namespace Slang return inst; } + IRInst *IRBuilder::emitDetachDerivative(IRType *type, IRInst *value) + { + auto inst = createInst<IRDetachDerivative>( + this, + kIROp_DetachDerivative, + type, + value); + addInst(inst); + return inst; + } + IRInst* IRBuilder::emitBackwardDifferentiateInst(IRType* type, IRInst* baseFn) { auto inst = createInst<IRBackwardDifferentiate>( |
