Skip to content

Commit 65fa8d1

Browse files
jaladreipsigcbot
authored andcommitted
Disable PrivateToGlobalPointerPass when doing sync DispatchRays
Sync DispatchRays does not utilize SWStack. With no SWStack, we don't need to do PrivateToGlobalPointerPass, so we can turn it off.
1 parent dc866a0 commit 65fa8d1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

IGC/AdaptorCommon/RayTracing/RayTracingInterface.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,18 @@ void RayTracingLowering(RayDispatchShaderContext* pContext)
148148
// splitting. This may allow us to do less spill/fills to the RTStack.
149149
// Will investigate further as we have more workloads.
150150
mpm.add(CreateTraceRayInlineLoweringPass());
151+
151152
// Eliminate any obvious dead stores from rayquery
152153
mpm.add(createDeadStoreEliminationPass());
154+
153155
// convert to global pointers first since all downstream passes will be
154156
// doing operations to the RTStack which will involve A64 stateless
155157
// operations. If we enable stateful SWStacks, then this will convert
156158
// to the address space associated with the SWStack.
157-
mpm.add(createPrivateToGlobalPointerPass());
159+
// This pass is not needed when doing sync DispatchRays since there's no SWStack
160+
if (!pContext->doSyncDispatchRays())
161+
mpm.add(createPrivateToGlobalPointerPass());
162+
158163
// Inject BTD Stack ID release calls before every return in raygen shaders.
159164
mpm.add(CreateStackIDRetirement());
160165
if (IGC_IS_FLAG_DISABLED(DisableEarlyRemat))

0 commit comments

Comments
 (0)