Open
Description
Summary
With VSync on, there appear to be irregular but persistent frame drops on some machines. Investigate the cause of this and fix or work around the issue.
How to reproduce
- Open a Duality application with VSync and observe spikes in frame time in a ProfileRenderer.
- Alternatively, observe linear movement of an object, where frame drops show as a jittery / non-smooth motion. Sample project: here
- Also, there is an OpenTK-only sample to reproduce this: here
Workaround
- It seems that using the SDL2 backend of OpenTK fixes this (while introducing other window-related issues), so putting
SDL2.dll
next to the launcher application should get rid of jittering.
Analysis
- There have been tests with OpenTK-only code that reproduced the issue, though generally somewhat less reliable than Duality samples. This may be due to different code paths being used / OpenGL coverage, but it leaves some uncertainty whether the cause for this is in OpenTK or Duality, or in neither of the two.
- When assuming the issue to be part of Duality, it would make sense to improve on Profiling to have better tools for investigation.
- Reset min / max values of all profiles as a public API method.
- Introduce a min / max reset hotkey to ProfileRenderer.
- Introduce an "Unknown" profiler that is calculated by "Frame" profiler - sum of all other top-level profilers.
- See if the "Unknown" profiler hints towards any spikes in frame time that were not yet investigated.
- This might be helpful: Diagnose frame skips and stutter
- Other than that, continue investigating to which degree this is reproducable with OpenTK only and how SDL2 window management is different from OpenTK window management.
Attachments
- Related issue on OpenTK