summaryrefslogtreecommitdiff
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.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp
index 7788a50d5..c753600a7 100644
--- a/source/slang/slang-ir-util.cpp
+++ b/source/slang/slang-ir-util.cpp
@@ -277,6 +277,31 @@ bool isSimpleHLSLDataType(IRInst* inst)
return true;
}
+bool isWrapperType(IRInst* inst)
+{
+ switch (inst->getOp())
+ {
+ case kIROp_ArrayType:
+ case kIROp_TextureType:
+ case kIROp_VectorType:
+ case kIROp_MatrixType:
+ case kIROp_PtrType:
+ case kIROp_RefType:
+ case kIROp_ConstRefType:
+ case kIROp_HLSLStructuredBufferType:
+ case kIROp_HLSLRWStructuredBufferType:
+ case kIROp_HLSLRasterizerOrderedStructuredBufferType:
+ case kIROp_HLSLAppendStructuredBufferType:
+ case kIROp_HLSLConsumeStructuredBufferType:
+ case kIROp_TupleType:
+ case kIROp_OptionalType:
+ case kIROp_TypePack:
+ return true;
+ default:
+ return false;
+ }
+}
+
SourceLoc findFirstUseLoc(IRInst* inst)
{
for (auto use = inst->firstUse; use; use = use->nextUse)