summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir-synthesize-active-mask.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/slang/slang-ir-synthesize-active-mask.cpp b/source/slang/slang-ir-synthesize-active-mask.cpp
index 39adb7e81..1237a48c2 100644
--- a/source/slang/slang-ir-synthesize-active-mask.cpp
+++ b/source/slang/slang-ir-synthesize-active-mask.cpp
@@ -270,6 +270,11 @@ struct SynthesizeActiveMaskForModuleContext
void markAndModifyFuncsIndirectlyUsingActiveMask(IRFunc* callee)
{
+ // This transform does not apply to host or kernel callees.
+ if (callee->findDecoration<IRCudaHostDecoration>() ||
+ callee->findDecoration<IRCudaKernelDecoration>())
+ return;
+
// In order to detect functions that indirectly use the active
// mask through `callee`, we need to identify call sites.
//
@@ -699,7 +704,8 @@ struct SynthesizeActiveMaskForFunctionContext
// The easy case is ordinary functions (ones that aren't entry
// points).
//
- if( !m_func->findDecoration<IREntryPointDecoration>() )
+ if (!m_func->findDecoration<IREntryPointDecoration>() &&
+ !m_func->findDecoration<IRCudaKernelDecoration>())
{
// We simplyu need to add a new parameter to the entry block
// (which holds the parameters for the function itself).