diff options
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 86586c2e8..c66f0d555 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -2741,6 +2741,17 @@ namespace Slang operands); } + IRDifferentialPairType* IRBuilder::getDifferentialPairType( + IRType* valueType, + IRWitnessTable* witnessTable) + { + IRInst* operands[] = { valueType, witnessTable }; + return (IRDifferentialPairType*)getType( + kIROp_DifferentialPairType, + sizeof(operands) / sizeof(operands[0]), + operands); + } + IRFuncType* IRBuilder::getFuncType( UInt paramCount, IRType* const* paramTypes, @@ -3043,6 +3054,15 @@ namespace Slang return inst; } + IRInst* IRBuilder::emitMakeDifferentialPair(IRType* type, IRInst* primal, IRInst* differential) + { + IRInst* args[] = {primal, differential}; + auto inst = createInstWithTrailingArgs<IRMakeDifferentialPair>( + this, kIROp_MakeDifferentialPair, type, 2, args); + addInst(inst); + return inst; + } + IRInst* IRBuilder::emitSpecializeInst( IRType* type, IRInst* genericVal, |
