diff options
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
| -rw-r--r-- | source/slang/slang-check-expr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 5ca0af1c9..2f8b28afc 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -2225,11 +2225,15 @@ namespace Slang { // check the base expression first expr->functionExpr = CheckTerm(expr->functionExpr); + + auto treatAsDifferentiableExpr = m_treatAsDifferentiableExpr; + m_treatAsDifferentiableExpr = nullptr; // Next check the argument expressions for (auto & arg : expr->arguments) { arg = CheckTerm(arg); } + m_treatAsDifferentiableExpr = treatAsDifferentiableExpr; // If we are in a differentiable function, register differential witness tables involved in // this call. |
