diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-translate-glsl-global-var.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/slang/slang-ir-translate-glsl-global-var.cpp b/source/slang/slang-ir-translate-glsl-global-var.cpp index 8cb7fa8e9..4b2196e37 100644 --- a/source/slang/slang-ir-translate-glsl-global-var.cpp +++ b/source/slang/slang-ir-translate-glsl-global-var.cpp @@ -17,6 +17,8 @@ namespace Slang buildEntryPointReferenceGraph(referencingEntryPoints, module); List<IRInst*> entryPoints; + List<IRInst*> getWorkGroupSizeInsts; + // Traverse the module to find all entry points. // If we see a `GetWorkGroupSize` instruction, we will materialize it. // @@ -25,9 +27,10 @@ namespace Slang if (inst->getOp() == kIROp_Func && inst->findDecoration<IREntryPointDecoration>()) entryPoints.add(inst); else if (inst->getOp() == kIROp_GetWorkGroupSize) - materializeGetWorkGroupSize(module, referencingEntryPoints, inst); + getWorkGroupSizeInsts.add(inst); } - + for (auto inst : getWorkGroupSizeInsts) + materializeGetWorkGroupSize(module, referencingEntryPoints, inst); IRBuilder builder(module); for (auto entryPoint : entryPoints) |
