From 02f08bb0517fab070a2b130711df2e518108c26e Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Sat, 4 Oct 2025 14:01:54 +0100 Subject: [PATCH] DXOp::WaveIsFirstLane considers helper lanes as active --- renderdoc/driver/shaders/dxil/dxil_debug.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/shaders/dxil/dxil_debug.cpp b/renderdoc/driver/shaders/dxil/dxil_debug.cpp index 537f54421..d5a43be1b 100644 --- a/renderdoc/driver/shaders/dxil/dxil_debug.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_debug.cpp @@ -3914,7 +3914,18 @@ bool ThreadState::ExecuteInstruction(const rdcarray &workgroup) { // determine active lane indices in our subgroup rdcarray activeLanes; - GetSubgroupActiveLanes(workgroup, activeLanes); + const uint32_t firstLaneInSub = m_WorkgroupIndex - m_SubgroupIdx; + for(uint32_t lane = firstLaneInSub; lane < firstLaneInSub + m_GlobalState.subgroupSize; + lane++) + { + RDCASSERT(lane < m_ActiveMask.size(), lane, m_ActiveMask.size()); + // helper lanes are considered active for this instruction + if(m_ActiveMask[lane]) + { + RDCASSERT(lane < workgroup.size(), lane, workgroup.size()); + activeLanes.push_back(lane); + } + } RDCASSERT(!SubgroupIsDiverged(workgroup, activeLanes)); result.value.u32v[0] = (m_WorkgroupIndex == activeLanes[0]) ? 1 : 0; break;