Skip to content

Commit d03177f

Browse files
jaladreipsigcbot
authored andcommitted
Disable split async pass when doing sync DispatchRays
When doing sync DispatchRays, we don't want to split TraceRay operations
1 parent c167de6 commit d03177f

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

IGC/AdaptorCommon/RayTracing/RayTracingInterface.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,12 @@ void RayTracingLowering(RayDispatchShaderContext* pContext)
192192
// multiple times.
193193
mpm.add(createRayInfoCSEPass());
194194
}
195+
195196
// After this pass, all shaders with TraceRay() or CallShader() calls will
196197
// be split into continuations at those call sites.
197-
mpm.add(createSplitAsyncPass());
198+
if (!pContext->doSyncDispatchRays())
199+
mpm.add(createSplitAsyncPass());
200+
198201
if (IGC_IS_FLAG_DISABLED(DisablePromoteToScratch) &&
199202
pContext->m_DriverInfo.supportsRTScratchSpace())
200203
{

IGC/Compiler/CodeGenContext.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,9 +1791,6 @@ namespace IGC
17911791

17921792
bool RayDispatchShaderContext::requiresIndirectContinuationHandling() const
17931793
{
1794-
IGC_ASSERT_MESSAGE(modMD->rtInfo.NumContinuations != UINT_MAX,
1795-
"not computed yet!");
1796-
17971794
if (IGC_IS_FLAG_ENABLED(EnableInlinedContinuations) &&
17981795
canWholeProgramCompile())
17991796
{

IGC/common/MDFrameWork.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,8 @@ namespace IGC
228228
uint32_t RayQueryAllocSizeInBytes = 0;
229229

230230
// SplitAsyncPass sets the number of continuations that were generated.
231-
// This is heuristically used to determine whether we should inline
232-
// or indirectly BTD to the continuations.
233-
uint32_t NumContinuations = UINT_MAX;
231+
// However, with sync DispatchRays SplitAsyncPass is not guaranteed to run.
232+
uint32_t NumContinuations = 0;
234233

235234
// Track the address spaces and SSH offsets for indirect stateful
236235
// accesses.

0 commit comments

Comments
 (0)