summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-validate.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-08-24 16:32:33 -0700
committerGitHub <noreply@github.com>2023-08-24 16:32:33 -0700
commit0470ea05a42d6c3f35d81a433fefdd440500cdbd (patch)
tree25feb7bfd539013bfa64d8ff7698262932e39110 /source/slang/slang-ir-validate.cpp
parentc515bf9edf0ceefa9a0c9b36626ea7c8f72ce36f (diff)
Misc. SPIRV Fixes, Part 2. (#3147)
* Misc. SPIRV Fixes, Part 2. * Fix up. * Fix. * Add system smenatic values. * 16 bit int and floats, matrix/vector reshape, bool ops. * Fix. * Fix. * Allow push constant entry point params. * entrypoint params. * swizzleSet and swizzledStore. * packoffset. * string hash. * Fix. * Matrix arithmetics. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-validate.cpp')
-rw-r--r--source/slang/slang-ir-validate.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/slang/slang-ir-validate.cpp b/source/slang/slang-ir-validate.cpp
index bf1ce1956..d0948fbb1 100644
--- a/source/slang/slang-ir-validate.cpp
+++ b/source/slang/slang-ir-validate.cpp
@@ -336,16 +336,18 @@ namespace Slang
validateIRInstOperands(context, inst);
context->seenInsts.add(inst);
+ if (auto code = as<IRGlobalValueWithCode>(inst))
+ {
+ context->domTree = computeDominatorTree(code);
+ validateCodeBody(context, code);
+ }
+
// If `inst` is itself a parent instruction, then we need to recursively
// validate its children.
validateIRInstChildren(context, inst);
if (auto code = as<IRGlobalValueWithCode>(inst))
- {
- context->domTree = computeDominatorTree(code);
- validateCodeBody(context, code);
context->domTree = nullptr;
- }
}
void validateIRInst(IRInst* inst)