Is there any way to get GPU time without VSync Idle/Stall time in UE4.27?

Hello,

With VSync enabled, you cannot get the GPU time without bubbles. In general on D3D12, the GPU time is assumed to have bubbles - see the usage of “GRHISupportsFrameCyclesBubblesRemoval” in DynamicResolution.cpp.

“r.Vsync” will enable “IDXGISwapChain::Present(…)” synchronization to vertical blanks (as controlled by “rhi.SyncInterval”). This can cause the “Present(…)” to block execution until a synchronization point.

Dynamic Resolution’s GPU end frame event is enqueued after Slate’s draw window event, meaning that the timing query for begin/end frames will contain the time used by “Present(…)”.

To work around the bubbles, you can try tuning the CVar “r.DynamicRes.CPUTimeHeadRoom” to represent the average amount of time your GPU bubbles take. This value will be added to the measured GPU frame time.

Please let us know if this helps.