diff options
| author | Yong He <yonghe@outlook.com> | 2020-11-20 08:34:14 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-20 08:34:14 -0800 |
| commit | ee5842a01cdb2bd6cd4acee7214666f180b95d84 (patch) | |
| tree | b4c52c9ead27e71a8e4a31b871f97b800d4d4e62 /source/slang/slang-ir-link.cpp | |
| parent | 4459d4428761b0581b221c52eaea595d1b257a9f (diff) | |
Make witness and RTTI handles lower to `uint2`. (#1613)
* Make witness and RTTI handles lower to `uint2`.
And enable some dynamic dispatch tests on D3D/VK.
* Bug fixes.
Diffstat (limited to 'source/slang/slang-ir-link.cpp')
| -rw-r--r-- | source/slang/slang-ir-link.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/source/slang/slang-ir-link.cpp b/source/slang/slang-ir-link.cpp index a0c46066c..c96286eec 100644 --- a/source/slang/slang-ir-link.cpp +++ b/source/slang/slang-ir-link.cpp @@ -1481,21 +1481,19 @@ LinkedIR linkIR( cloneValue(context, bindInst); } } - if (target == CodeGenTarget::CPPSource || target == CodeGenTarget::CUDASource) + + for (IRModule* irModule : irModules) { - for (IRModule* irModule : irModules) + for (auto inst : irModule->getGlobalInsts()) { - for (auto inst : irModule->getGlobalInsts()) - { - auto hasPublic = inst->findDecoration<IRPublicDecoration>(); - if (!hasPublic) - continue; + auto hasPublic = inst->findDecoration<IRPublicDecoration>(); + if (!hasPublic) + continue; - auto cloned = cloneValue(context, inst); - if (!cloned->findDecorationImpl(kIROp_KeepAliveDecoration)) - { - context->builder->addKeepAliveDecoration(cloned); - } + auto cloned = cloneValue(context, inst); + if (!cloned->findDecorationImpl(kIROp_KeepAliveDecoration)) + { + context->builder->addKeepAliveDecoration(cloned); } } } |
