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.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 02c4fae68..b9d7a898f 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -3929,6 +3929,16 @@ struct ExprLoweringVisitorBase : public ExprVisitor<Derived, LoweredValInfo>
baseVal.val));
}
+ LoweredValInfo visitDetachExpr(DetachExpr* expr)
+ {
+ auto baseVal = lowerRValueExpr(context, expr->inner);
+
+ return LoweredValInfo::simple(
+ getBuilder()->emitDetachDerivative(
+ lowerType(context, expr->type),
+ getSimpleVal(context, baseVal)));
+ }
+
LoweredValInfo visitPrimalSubstituteExpr(PrimalSubstituteExpr* expr)
{
auto baseVal = lowerSubExpr(expr->baseFunction);