summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-09-17 16:46:23 -0700
committerGitHub <noreply@github.com>2020-09-17 16:46:23 -0700
commit2ddca33686c08e1833c0d82a420fb2b27cde4e37 (patch)
treeeac30dde6995ed16afbf89bf00b1bf76e7ebfb1f /source/slang/slang-emit-c-like.cpp
parent017acb3b58df51ec8bf3bb7eb9f66e58b6713145 (diff)
Initial attempt to enable CUDA dynamic dispatch codegen (#1549)
* Front-load cuda module loading to fill in RTTI pointers. * Enable dynamic dispatch codegen for CUDA.
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 8ef18242a..f234b0be6 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -3837,7 +3837,6 @@ void CLikeSourceEmitter::ensureGlobalInst(ComputeEmitActionsContext* ctx, IRInst
// Skip certain instructions that don't affect output.
switch(inst->op)
{
- case kIROp_InterfaceRequirementEntry:
case kIROp_Generic:
return;
@@ -3877,6 +3876,16 @@ void CLikeSourceEmitter::ensureGlobalInst(ComputeEmitActionsContext* ctx, IRInst
}
ctx->mapInstToLevel[inst] = requiredLevel;
+
+ // Skip instructions that don't correspond to an independent entity in output.
+ switch (inst->op)
+ {
+ case kIROp_InterfaceRequirementEntry:
+ return;
+
+ default:
+ break;
+ }
ctx->actions->add(action);
}