summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-specialize.cpp
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2025-01-08 00:25:32 -0600
committerGitHub <noreply@github.com>2025-01-07 22:25:32 -0800
commit1a56f58fdd0c704e6dc0fad0f0ec33a25a35e60b (patch)
treea44cdcd19379df09bdd4a8e585652e718f402ac6 /source/slang/slang-ir-specialize.cpp
parent7e278c3ad6eaedbce1d6b6babecbe32f1764b269 (diff)
Check whether array element is fully specialized (#6000)
* Check whether array element is fully specialized close #5776 When we start specialize a "specialize" IR, we should make sure all the elements are fully specialized, but we miss checking the elements of an array. This change will check the it. * add test * add all wrapper types into the check * add utility function to check if the type is wrapper type --------- Co-authored-by: zhangkai <zhangkai@zhangkais-MacBook-Pro.local> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-ir-specialize.cpp')
-rw-r--r--source/slang/slang-ir-specialize.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-ir-specialize.cpp b/source/slang/slang-ir-specialize.cpp
index 2757538a6..50dfa2c6a 100644
--- a/source/slang/slang-ir-specialize.cpp
+++ b/source/slang/slang-ir-specialize.cpp
@@ -125,6 +125,12 @@ struct SpecializationContext
}
}
+ if (isWrapperType(inst))
+ {
+ // For all the wrapper type, we need to make sure the operands are fully specialized.
+ return areAllOperandsFullySpecialized(inst);
+ }
+
// The default case is that a global value is always specialized.
if (inst->getParent() == module->getModuleInst())
{