summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 8164723b6..86df89702 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -8502,6 +8502,10 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
{
getBuilder()->addBackwardDifferentiableDecoration(irFunc);
}
+ else if (as<TreatAsDifferentiableAttribute>(modifier))
+ {
+ getBuilder()->addDecoration(irFunc, kIROp_TreatAsDifferentiableDecoration);
+ }
}
// For convenience, ensure that any additional global
// values that were emitted while outputting the function