summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index dd3034da1..97109274f 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -3877,7 +3877,7 @@ namespace Slang
IRInst* IRBuilder::emitDifferentialPairGetDifferential(IRType* diffType, IRInst* diffPair)
{
- SLANG_ASSERT(as<IRDifferentialPairType>(diffPair->getDataType()));
+ SLANG_ASSERT(as<IRDifferentialPairTypeBase>(diffPair->getDataType()));
return emitIntrinsicInst(
diffType,
kIROp_DifferentialPairGetDifferential,
@@ -3887,7 +3887,7 @@ namespace Slang
IRInst* IRBuilder::emitDifferentialPairGetPrimal(IRInst* diffPair)
{
- auto valueType = cast<IRDifferentialPairType>(diffPair->getDataType())->getValueType();
+ auto valueType = cast<IRDifferentialPairTypeBase>(diffPair->getDataType())->getValueType();
return emitIntrinsicInst(
valueType,
kIROp_DifferentialPairGetPrimal,
@@ -3895,6 +3895,15 @@ namespace Slang
&diffPair);
}
+ IRInst* IRBuilder::emitDifferentialPairGetPrimal(IRType* primalType, IRInst* diffPair)
+ {
+ return emitIntrinsicInst(
+ primalType,
+ kIROp_DifferentialPairGetPrimal,
+ 1,
+ &diffPair);
+ }
+
IRInst* IRBuilder::emitDifferentialPairGetDifferentialUserCode(IRType* diffType, IRInst* diffPair)
{
SLANG_ASSERT(as<IRDifferentialPairTypeBase>(diffPair->getDataType()));
@@ -7256,6 +7265,7 @@ namespace Slang
case kIROp_TorchGetCudaStream:
case kIROp_MakeTensorView:
case kIROp_TorchTensorGetView:
+ case kIROp_GetStringHash:
return false;
case kIROp_ForwardDifferentiate: