diff options
Diffstat (limited to 'source/slang/slang-ir-explicit-global-context.cpp')
| -rw-r--r-- | source/slang/slang-ir-explicit-global-context.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-ir-explicit-global-context.cpp b/source/slang/slang-ir-explicit-global-context.cpp index dd07db883..515992cee 100644 --- a/source/slang/slang-ir-explicit-global-context.cpp +++ b/source/slang/slang-ir-explicit-global-context.cpp @@ -564,6 +564,9 @@ struct IntroduceExplicitGlobalContextPass builder.emitStore(fieldPtr, var); } } + + // Update entry point function type after potentially adding parameters. + fixUpFuncType(entryPointFunc); } void replaceUsesOfGlobalParam(IRGlobalParam* globalParam) @@ -723,6 +726,9 @@ struct IntroduceExplicitGlobalContextPass addKernelContextNameHint(contextParam); contextParam->insertBefore(firstBlock->getFirstOrdinaryInst()); + // Update the type of the function to reflect this new parameter. + fixUpFuncType(func); + // The new parameter can be registered as the context value // to be used for `func` right away. // |
