Commit graph

1158 commits

Author SHA1 Message Date
Joshua Ashton
8fe9322578 vblankmanager: Explain divergence situation in a comment 2022-02-12 18:24:12 +00:00
Joshua Ashton
e690b00f7b vblankmanager: Allow going back in time by fixed redzones
Going back a little bit okay, it's when we use varying values to go back, we become divergent from target over time with varying clocks
2022-02-12 18:13:45 +00:00
Joshua Ashton
f156763458 vblankmanager: Don't sleep back in time
Fixes getting stuck in a feedback loop with high variance
2022-02-12 17:59:20 +00:00
Joshua Ashton
2cac416000 vblankmanager: When calculating fps limiter sleep time, take the min of the rolling max frame time against target interval - redzone
We account for redzone later, and don't want to go over vblank time and preceed into previous vblank or whatever here.
2022-02-12 13:46:36 +00:00
Joshua Ashton
0862a2b896 steamcompmgr: Only free all buffers on setting target fps if disabling 2022-02-12 13:25:38 +00:00
Joshua Ashton
29060cc87c steamcompmgr: Detect stalls in fps limiter latent buffer heuristic 2022-02-12 12:11:00 +00:00
Joshua Ashton
a5c660e54f vblankmanager: More value tuning
Based on some rough data across a variety of games that are both GPU bound and also ones that are very not and cause GPU clocks to vary wildly
2022-02-12 11:54:51 +00:00
Joshua Ashton
70442294c0 steamcompmgr: Only allow one latent buffer when falling behind 2022-02-12 09:10:55 +00:00
Joshua Ashton
a1fa55c3a3 steamcompmgr: Add FSR active feedback
Also use this for mangoapp
2022-02-12 08:50:52 +00:00
Joshua Ashton
1df5c3a147 modegen: Always ceil clocks for fixed modes
Some modes like 55Hz end up off by one at 54 like we had with 30 before.
2022-02-11 09:35:48 +00:00
Joshua Ashton
e53f986048 vblankmanager: Tune FPS limiter and dynamic vblank heuristics 2022-02-11 05:28:03 +00:00
Joshua Ashton
8a94186522 steamcompmgr: Release all on IO error 2022-02-10 02:34:38 +00:00
Joshua Ashton
d759bd5efd vblankmanager: Fix shutting down fps limiter thread
Closes: #406
2022-02-10 02:34:03 +00:00
Joshua Ashton
30e91fc24f steamcompmgr: Don't hide cursor when going from dropdown->focus window and vice versa 2022-02-10 02:25:42 +00:00
Joshua Ashton
291d788b4f steamcompmgr: Show cursor on tap always 2022-02-10 02:19:08 +00:00
Joshua Ashton
15c254fd7f steamcompmgr: Hide new cursor when transitioning our global input focus
Fixes going from QAM -> game and keeping the cursor from the game.
2022-02-10 02:04:36 +00:00
Joshua Ashton
bf427b8156 steamcompmgr: Fix dynamic refresh crash if no focus window 2022-02-09 02:45:31 +00:00
Joshua Ashton
e5c3a1e1da steamcompmgr: Prefer non-dialog override redirects
Prefers dropdowns over popups.

Fixes dropdowns in Zwei: The Ilvard Insurrection (427700) where when you
tap on a dropdown, it'd immediately start preferring to show a popup with a hint
that you get from hovering.
2022-02-09 01:30:56 +00:00
Joshua Ashton
6d2cb3073c steamcompmgr: Implement dynamic refresh rate based on FPS limit
Adds a mode to dynamically change the refresh rate based on the existing FPS limit.
2022-02-09 00:34:58 +00:00
Joshua Ashton
c5ab6f388b vblankmanager: Implement FPS limiter by strategic buffer withholding 2022-02-09 00:34:58 +00:00
Joshua Ashton
9fa6fcd9ac modegen: Round display clocks up instead of down
Fixes oboe getting 29fps for vrefresh or whatever

Stops using floats here too, floats bad.
2022-02-09 00:34:58 +00:00
Joshua Ashton
02e0086856 steamcompmgr: New night mode color toys 2022-02-09 00:20:35 +00:00
FlightlessMango
c61d936cd9 mangoapp: FSR 2022-02-09 00:19:15 +00:00
Joshua Ashton
f65d54e61d steamcompmgr: Add atom to control exposed modes per-xwayland server 2022-02-09 00:17:15 +00:00
Joshua Ashton
4a308c97f7 steamcompmgr: Handle being initially connected to external display 2022-02-09 00:17:15 +00:00
Joshua Ashton
bf119ee44b steamcompmgr: Mark focus dirty on root window resize 2022-02-09 00:17:15 +00:00
Joshua Ashton
4f25eefbad steamcompmgr: Resize Steam's xwayland mode to output mode 2022-02-09 00:17:15 +00:00
Joshua Ashton
d272cebb38 steamcompmgr: Resize nested height to match output aspect ratio in Steam mode 2022-02-09 00:17:15 +00:00
Joshua Ashton
5ed0753165 wlserver: Add wlserver_set_xwayland_server_mode
Sets the current mode and stuff for a specific xwayland server.
2022-02-09 00:17:15 +00:00
Joshua Ashton
aca867e60f rendervulkan: Fix half-texel offset
Previously this was doing scale / 2 but it gets multiplied by scale, so this didn't work when it wasn't 1.0

Found when testing higher reses
2022-02-05 02:07:52 +00:00
Joshua Ashton
f1646c8f03 steamcompmgr: Fix nested max scale factor 2022-02-05 02:02:24 +00:00
Joshua Ashton
04e9eaebe3 drm: Be safe against blob destruction 2022-02-04 03:31:13 +00:00
Sam Lantinga
ab4684078c Fixed pipewire stream stopping after a few seconds
With the latest version of pipewire, the process callback is no longer automatically called. Instead, you should call pw_stream_trigger_process() when frames are ready, to have the processing callback happen.

Since the only processing we're doing is requesting a buffer, I'm calling that directly from the callback, since that is thread-safe for a single reader.
2022-02-04 00:49:48 +00:00
Joshua Ashton
b4cf9d3203 wlserver: Use root server for content overrides 2022-02-04 00:49:26 +00:00
Joshua Ashton
7b75629040 steamcompmgr: Hide our cursor when forcing position for Steam touch stuff 2022-02-03 23:10:05 +00:00
Joshua Ashton
c1f9ec7ecf steamcompmgr: Fix default gain when disabled
This was yellow for testing, somehow slipped in.
2022-02-03 18:52:46 +00:00
Florian
696771ba66 Update Readme with FSR options 2022-02-03 10:37:54 +01:00
Florian
2079de25e5 fixed missing newline after -U in help message 2022-02-03 10:37:44 +01:00
Joshua Ashton
c5ccd71ff6 drm: Implement linear color gain control via atoms
Adds GAMESCOPE_COLOR_LINEARGAIN to control the linear color gain.
2022-02-03 05:29:33 +00:00
Joshua Ashton
55cb27fd15 steamcompmgr: Fix X's idea of interactive focus
Always update X's idea of focus, but still dirty
the it being outdated so we can resolve that globally later.

Only affecting X and not the WL idea of focus here,
we always want to think the window is focused.
but our real presenting focus and input focus can be elsewhere.
2022-02-02 23:00:44 +00:00
Joshua Ashton
a953bd276e drm: Fix leaking mode properties 2022-02-02 23:00:38 +00:00
Joshua Ashton
88852d187c steamcompmgr: HACK! Always composite with a cursor
Cursor plane on AMDGPU is very broken with both rotation and overlay planes that are not screen sized. Workaround for now.
2022-02-02 23:00:30 +00:00
Joshua Ashton
a1d560e836 steamcompmgr: Handle cursor image width being different to surface width for rotation offset
The surface width for the cursor is 256, but the image width is 64 which means we have a bunch of blank space, so we need to account for this in DRM code for the CRTC offsets.
2022-02-02 22:58:11 +00:00
Joshua Ashton
8313853802 steamcompmgr: Fix clang build 2022-02-01 00:34:10 +00:00
Joshua Ashton
f4c3425a85 steamcompmgr: Add GAMESCOPE_FSR_SHARPNESS property
0 to 20, controls FSR sharpness
2022-02-01 00:30:59 +00:00
Joshua Ashton
d01363e35e steamcompmgr: Implement GAMESCOPE_SCALING_MODE atom
0 = linear
1 = nearest
2 = integer
3 = fsr
2022-02-01 00:26:45 +00:00
Joshua Ashton
7755bb635d steamcompmgr: Clean up code to determine if we need composite 2022-02-01 00:06:08 +00:00
Joshua Ashton
0b5368efe7 steamcompmgr: Force composite when we must force nearest filtering
SCALING_FILTER is not hooked up in AMDGPU.
2022-02-01 00:04:25 +00:00
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