summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-util.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-11-06 16:42:14 -0800
committerGitHub <noreply@github.com>2024-11-06 16:42:14 -0800
commit989847f6a9408b68e90ac242f4a19d3266054c3e (patch)
tree1cfeb1b12f0c6d1de2669936878cce0f4c542709 /source/slang/slang-ir-util.cpp
parentd9cb281f5fd456d6a1df2e8e156810a86f56fc6e (diff)
Fix IntVal unification logic to insert type casts + buffer element lowering regression. (#5508)
* Fix IntVal unification logic to insert type casts. * Fix regression.
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
-rw-r--r--source/slang/slang-ir-util.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp
index c7b40da8b..3d2a539a6 100644
--- a/source/slang/slang-ir-util.cpp
+++ b/source/slang/slang-ir-util.cpp
@@ -221,6 +221,17 @@ bool isValueType(IRInst* dataType)
}
}
+bool isScalarOrVectorType(IRInst* type)
+{
+ switch (type->getOp())
+ {
+ case kIROp_VectorType:
+ return true;
+ default:
+ return as<IRBasicType>(type) != nullptr;
+ }
+}
+
bool isSimpleDataType(IRType* type)
{
type = (IRType*)unwrapAttributedType(type);