summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
-rw-r--r--source/slang/slang-ir-util.cpp28
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