bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Frame time diagnostic independent of vsync

Open torsteingrindvik opened this issue 1 year ago • 2 comments

What problem does this solve or what need does it fill?

When using the frame time diagnostic and vsync at the same time, the diagnostic shows ~16ms on a 60 Hz display (unless the GPU cannot keep up). If vsync is turned off and FPS increases by a lot, it indicates that the real work the GPU had to do should have taken less than 16ms in the vsync scenario.

I assume the way the frame time is collected happens after some sort of vsync barrier happens, such that the "real" work is masked.

What solution would you like?

Unless the current behaviour can be considered a bug, I'd like to be able to opt into showing the "real" work time elapsed. If vsync on a 60 Hz display runs at 60 FPS I still want to know if rendering these contents actually took 2ms or 16ms.

torsteingrindvik avatar Feb 11 '24 11:02 torsteingrindvik

@bevyengine/rendering-team any comment on if the current behaviour is a bug or not?

torsteingrindvik avatar Feb 12 '24 16:02 torsteingrindvik

The frame time diagnostic is taken from Time<Real>::delta_seconds_f64 and is not really related to rendering for now

mockersf avatar Feb 12 '24 16:02 mockersf