@@ -2789,13 +2789,13 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
27892789 const uint32_t threadId = ref.id ;
27902790 const uint32_t lane = threadId;
27912791 ThreadState &thread = workgroup[lane];
2792- ++countActiveThreads;
27932792
27942793 if (thread.nextInstruction >= instructionOffsets.size ())
27952794 {
27962795 tangle.SetThreadDead (threadId);
27972796 continue ;
27982797 }
2798+ bool wasActive = !thread.Finished ();
27992799
28002800 threadExecutionStates[threadId] = thread.GetEnteredPoints ();
28012801
@@ -2804,6 +2804,7 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
28042804 // the thread activated a new convergence point
28052805 if (threadConvergeInstruction != INVALID_EXECUTION_POINT)
28062806 {
2807+ wasActive = true ;
28072808 if (newConvergeInstruction == INVALID_EXECUTION_POINT)
28082809 {
28092810 newConvergeInstruction = threadConvergeInstruction;
@@ -2817,6 +2818,7 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
28172818 // the thread activated a new function return point
28182819 if (threadFunctionReturnPoint != INVALID_EXECUTION_POINT)
28192820 {
2821+ wasActive = true ;
28202822 if (newFunctionReturnPoint == INVALID_EXECUTION_POINT)
28212823 {
28222824 newFunctionReturnPoint = threadFunctionReturnPoint;
@@ -2830,11 +2832,16 @@ rdcarray<ShaderDebugState> Debugger::ContinueDebug()
28302832 ++countFunctionReturnThreads;
28312833 }
28322834
2835+ if (thread.IsDiverged ())
2836+ {
2837+ wasActive = true ;
2838+ ++countDivergedThreads;
2839+ }
2840+
28332841 if (thread.Finished ())
28342842 tangle.SetThreadDead (threadId);
28352843
2836- if (thread.IsDiverged ())
2837- ++countDivergedThreads;
2844+ countActiveThreads += wasActive ? 1 : 0 ;
28382845 }
28392846
28402847 for (const ThreadReference &ref : threadRefs)
0 commit comments