Files
UnrealEngineUWP/Engine/Source/Runtime/SlateRHIRenderer
luke thatcher 67c1b93a5e Fix RT / RHIT stats
- The RHI and render threads are now blocking on FGraphEvents in various platform RHI implementations, but the timing stats did not take this time into account.
 - Some time was double counted (e.g. on the render thread, due to a FRenderThreadIdleScope plus a nested call to FEvent::Wait which includes a per-thread wait stat).

 - The fix is to remove use of GRenderThreadIdle / FRenderThreadIdleScope etc in places where the thread is going to wait on an FGraphEvent, to avoid the double counting. This fixes the odd spikes on the RHIT in CSV profiles.
 - Also removed the GWorkingRHIThreadStallTime global. RHI idle time is now tracked using standard thread stats (FThreadIdleStats::FScopeIdle, which is included in the FRenderThreadIdleScope when called from the RHI thread).

 - Simplified copy/paste instances of GRenderThreadIdle and GRenderThreadNumIdle by replacing them with a FRenderThreadIdleScope across platform RHIs.

After this change, the RT and RHIT unit stats are stable in Lyra game, when clicking away from the window to force the title into a low framerate mode. Before this change, the RT/RHIT stats would change significantly.

#rb Ben.Woodhouse
#preflight 636ad7c3450be1d9f849a34f

[CL 23069592 by luke thatcher in ue5-main branch]
2022-11-09 20:58:40 -05:00
..
2022-11-09 20:58:40 -05:00