diff options
| author | Yong He <yonghe@outlook.com> | 2023-05-09 18:00:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-09 18:00:48 -0700 |
| commit | ddebd60853b3f34bfd8e89de804fd15808abf75d (patch) | |
| tree | d5d686843bc2c67e493693376a0170857998c077 /source/slang/slang-ir-util.cpp | |
| parent | 38ed03a7203baacf36fca62539ac74fd45ed42d2 (diff) | |
Various fixes for autodiff and slangpy. (#2876)
* Various fixes for autodiff and slangpy.
* Fix cuda code gen for `select`.
* Fix getBuildTagString().
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
| -rw-r--r-- | source/slang/slang-ir-util.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp index ba34a725d..55c2b18c0 100644 --- a/source/slang/slang-ir-util.cpp +++ b/source/slang/slang-ir-util.cpp @@ -411,10 +411,6 @@ bool isPtrLikeOrHandleType(IRInst* type) return true; if (as<IRPseudoPtrType>(type)) return true; - if (as<IRMeshOutputType>(type)) - return true; - if (as<IRHLSLOutputPatchType>(type)) - return true; switch (type->getOp()) { case kIROp_ComPtrType: @@ -824,30 +820,30 @@ bool isGlobalOrUnknownMutableAddress(IRGlobalValueWithCode* parentFunc, IRInst* if (!isPtrLikeOrHandleType(type)) return false; + if (root) + { + if (as<IRParameterGroupType>(root->getDataType())) + { + return false; + } + } + switch (root->getOp()) { case kIROp_GlobalVar: - return true; case kIROp_GlobalParam: case kIROp_GlobalConstant: case kIROp_Var: case kIROp_Param: break; + case kIROp_Call: + return true; default: - // The inst is defined by an unknown inst. return true; } - if (root) - { - if (as<IRParameterGroupType>(root->getDataType())) - { - return false; - } - auto addrInstParent = getParentFunc(root); - return (addrInstParent != parentFunc); - } - return false; + auto addrInstParent = getParentFunc(root); + return (addrInstParent != parentFunc); } struct GenericChildrenMigrationContextImpl |
