Commit graph

15 commits

Author SHA1 Message Date
Joshua Ashton
0bc3a2493d steamcompmgr: Add tuneables for vblank red zone + decay rate 2022-01-31 23:49:39 +00:00
Joshua Ashton
797ee59cbb vblankmanager: Estimate draw buffer time based on max rolling average draw time
Handles spikes much better and allows us to have a lower buffer when not needed.
2022-01-31 23:49:39 +00:00
Joshua Ashton
a659fef806 drm: Use vblank time from page flip handler 2022-01-31 23:49:39 +00:00
Simon Ser
f3865a73bd Name our threads
Unfortunately the name length is limited to 15 characters, and the
executable name is dropped from the name if we don't include it.
2021-10-27 17:18:29 +02:00
Simon Ser
470756029d Stop using X11 events for vblankmanager
Instead, use a pipe. Check if the pipe is readable in the
steamcompmgr event loop.

This avoids a roundtrip through the X11 server.

Closes: https://github.com/Plagman/gamescope/issues/201
2021-06-09 18:42:38 +02:00
Pierre-Loup A. Griffais
2bb4907993 Also spew wayland display name through session pipe. 2021-04-27 21:17:36 -07:00
Simon Ser
29d00dbc68 tracing: use {begin,end}_ctx helpers, remove unnecessary newlines 2021-03-11 11:25:34 +01:00
Pierre-Loup A. Griffais
fd7a81547a vblankmanager: obey nested refresh rate if set 2020-09-15 14:46:12 -07:00
Joshua Ashton
9af5c3f254 Cleanup vblankmanager
Keep everything on the same timescale.
Avoid using floats here when we can just use integer maths.
Add demarcations.
Misc. cleanup.
2020-09-12 22:26:31 -07:00
Joshua Ashton
bb9d0cdf8f Use nanoseconds for vblank timing
Avoids locking on-vblank
STL's clock's accuracy can be funky also.
2020-09-12 22:26:31 -07:00
Joshua Ashton
50a508ae74 Encode vblank time in client message
Eliminates the atomic hack here
2020-09-12 22:26:31 -07:00
Pierre-Loup A. Griffais
81b8e8c33c steamcompmgr: ignore vblank messages if we get them too late. 2020-09-01 22:59:44 -07:00
Simon Ser
bae255ee1a
Get rid of C_SIDE
wlroots headers can mostly be included with extern "C" blocks. Two
exceptions are the use of `static` for array args and `class` as a
struct field. These can be #define'ed to avoid C++ build errors.

This allows the whole project to be built as a single C++ codebase,
without having to maintain hybrid header files.
2020-06-11 12:44:36 +02:00
Pierre-Loup A. Griffais
b4893840eb vblank: more tweaks, align to DRM vblank. 2020-01-26 16:28:35 -08:00
Pierre-Loup A. Griffais
4ca73da9f6 vblankmanager: initial system to let steamcompmgr know when to repaint
For now just mark one repaint per refresh interval without any particular
alignment, as that can be hard to get in nested. We'll use the display
timing extensions for that later.

We'll have it align properly in embedded mode soon.
2020-01-26 14:59:51 -08:00