summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-lower-expand-type.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-08-28 09:23:08 -0700
committerGitHub <noreply@github.com>2024-08-28 09:23:08 -0700
commit638e5fb000d4e242a91e8b653da4a72daec0efda (patch)
treecfcd15c1fc6bdee624eb33abac3268241b086dec /source/slang/slang-ir-lower-expand-type.cpp
parent16595a8379e9dbfa1845fd72f3531ff3372da3ef (diff)
Make tuple types work in autodiff. (#4923)
Diffstat (limited to 'source/slang/slang-ir-lower-expand-type.cpp')
-rw-r--r--source/slang/slang-ir-lower-expand-type.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-ir-lower-expand-type.cpp b/source/slang/slang-ir-lower-expand-type.cpp
index 8b68b1fc1..0f2c21dec 100644
--- a/source/slang/slang-ir-lower-expand-type.cpp
+++ b/source/slang/slang-ir-lower-expand-type.cpp
@@ -21,8 +21,9 @@ namespace Slang
{
auto eachInst = as<IREach>(val);
auto packInst = eachInst->getElement();
+ auto type = (IRType*)clonePatternVal(cloneEnv, builder, packInst->getFullType(), eachIndex);
packInst = clonePatternValImpl(cloneEnv, builder, packInst, eachIndex);
- auto result = builder->emitGetTupleElement(val->getFullType(), packInst, eachIndex);
+ auto result = builder->emitGetTupleElement(type, packInst, eachIndex);
return result;
}
case kIROp_Specialize: