Commit graph

1199 commits

Author SHA1 Message Date
Joshua Ashton
5f610d8614 main: Fix build
Forgot to commit this :s
2022-09-07 11:06:04 +00:00
Joshua Ashton
f0f19b3499 steamcompmgr: Add basic infra for fifo relaxed 2022-09-07 10:47:44 +00:00
Joshua Ashton
440d0f1b53 steamcompmgr: Don't force base plane repaint for cursor movement 2022-09-07 10:40:32 +00:00
Joshua Ashton
6198e1be07 steamcompmgr: Don't tear if Steam Overlay is open
Looks bad
2022-09-06 17:01:22 +01:00
Joshua Ashton
21ce7baf0f steamcompmgr: Use presentation hints to determine whether to tear 2022-09-06 17:01:22 +01:00
Joshua Ashton
d9cab62e80 steamcompmgr: Store per-commit tearing state in commit_t 2022-09-06 17:01:22 +01:00
Joshua Ashton
55f764fa7f wlserver: Add wlserver_surface_is_async 2022-09-06 17:01:22 +01:00
Joshua Ashton
2e62575518 wlserver: Grab presentation hints 2022-09-06 17:01:22 +01:00
Joshua Ashton
6dde7bd8bc wlserver: Add wlserver_wl_surface_info
A stop gap before x11_surface_info which is held by steamcompmgr
2022-09-06 17:01:22 +01:00
Joshua Ashton
dad0939bed wlserver: Rename wlserver_surface to wlserver_x11_surface_info 2022-09-06 17:01:22 +01:00
Joshua Ashton
23ba26ce99 protocol: Add tearing control protocol 2022-09-06 17:01:22 +01:00
Joshua Ashton
733f2e2a17 wlserver: Make wlr_surface's data point to wlserver_surface
This used to point directly to gamescope_xwayland_server_t, but we can amke it pooint to wlserver_surface and get it from it's structure.
This lets us add more data.
2022-09-06 17:01:22 +01:00
Joshua Ashton
df908e691a main: Add --immediate-flips
Defaults g_bAsyncFlipsEnabled which is otherwise controlled by the atom, by Steam.
2022-09-06 17:01:22 +01:00
Joshua Ashton
a4ab1b0459 drm, steamcompmgr: Allow async flips if supported with GAMESCOPE_ALLOW_TEARING
Reworks some logic re. frame pacing and presentation to flip directly when an app asks when this is enabled.

The next step for us would be to make this respect whether the app has vsync enabled or not using the tearing protocol too.

This is a good starting point though.
2022-09-06 17:01:22 +01:00
Simon Ser
c40c8aa482 build: bump libdrm dep version
We use drmGetDeviceFromDevId() now.
2022-09-01 17:58:48 +02:00
Simon Ser
fc1fc35d5c Drop find_drm_node_by_devid()
Use drmGetDeviceFromDevId() instead.
2022-09-01 17:57:35 +02:00
Joshua Ashton
c5269642a2 build: fix ci 2022-08-23 23:18:58 +00:00
Ben Jackson
5f974de2eb ime: Don't reset to default keymap for actions (enter, etc) if ime keyboard in use 2022-08-23 16:06:26 -07:00
Joshua Ashton
6da2f90e51 Revert "wlserver: create one wl_output global per Xwayland server"
This reverts commit 5b7f70a9e5.
2022-08-23 20:40:10 +00:00
Joshua Ashton
8ef0922b02 steamcompmgr: Only account for LAYERED when CONTROLPARENT is also set
Fixes Street Fighter V (310950) splash always being overlayed

We should find more cases as we go along as well.
2022-08-23 14:48:01 +00:00
Joshua Ashton
c49cac3a00 drm: Blacklist 4096x2160 mode
This mode is required for certaiin certifications but is effectively useless and doesn't fit the actual screen size of displays. (Gets scaled down)
2022-08-22 23:56:13 +00:00
Simon Ser
608de1c19e Remove unused wlserver_movecursor() 2022-08-21 13:12:05 +02:00
Simon Ser
5b7f70a9e5 wlserver: create one wl_output global per Xwayland server
Closes: https://github.com/Plagman/gamescope/issues/571
2022-08-21 13:08:57 +02:00
Joshua Ashton
9aada10be3 drm: Split GAMESCOPE_COLOR_GAMMA_EXPONENT for EXTERNAL displays 2022-08-19 22:10:21 +00:00
Joshua Ashton
bbc240390c drm: Split GAMESCOPE_COLOR_MATRIX for EXTERNAL displays 2022-08-19 22:01:36 +00:00
Joshua Ashton
518c5042fd wlserver: Put accum mouse dx/dy on wlserver
Given we move that, store it there. Doesn't really matter though.
2022-08-19 21:28:38 +00:00
Joshua Ashton
bf3093bc2c wlserver: Fix relative mouse movements
Do the same thing as SDL2
2022-08-19 21:18:18 +00:00
Joshua Ashton
cb59480be0 drm: Add backdoor to disable liftoff caching for debugging 2022-08-17 02:01:46 +00:00
Joshua Ashton
3cda5e8f2e steamcompmgr: Add more blurb to WS_EX_LAYERED 2022-08-17 00:17:06 +00:00
Joshua Ashton
d5eb6667a9 steamcompmgr: Handle LAYERED win32 windows
The Launcher in Witcher 2 (20920) has a clear window with WS_EX_LAYERED on top of it.

Layered windows are windows that are meant to be transparent
with alpha blending + visual fx.
https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features
2022-08-17 00:12:17 +00:00
Joshua Ashton
910ae1b3c7 steamcompmgr: Parse Windows styles/stylesex 2022-08-17 00:08:10 +00:00
Joshua Ashton
f32e8637b7 steamcompmgr, rendervulkan: Add GAMESCOPE_COMPOSITE_FORCE and GAMESCOPE_COMPOSITE_DEBUG for debugging 2022-08-16 23:39:13 +00:00
Joshua Ashton
c3d6959669 steamcompmgr: Add workaround for Antichamber
Has a splash screen that ends up being treat as a dropdown.

Workaround this until we hook up the Proton window style deduction.
2022-08-16 23:21:33 +00:00
Joshua Ashton
a8592be47d vblankmanager: Push back drawtime if we are compositing
Avoids getting into a feedback loop with clocks when we need to composite.

Fixes stutter when using FSR on Steam Deck.
2022-08-16 23:13:56 +00:00
Joshua Ashton
092aef1f95 drm: Cache composition results from liftoff 2022-08-16 23:55:23 +01:00
hexchain
db99b92e2b Reformat the help text 2022-08-16 09:43:57 +02:00
Joshua Ashton
65d97cb152 steamcompmgr: Don't skip taskbar+pager windows if they are fullscreen
Fixes fullscreen in Batman: Arkham City GOTY (200260)
2022-08-11 12:48:13 +00:00
Joshua Ashton
60513c0925 drm: Unset COLOR_RANGE and COLOR_ENCODING if not YCbCr or unbound 2022-08-11 08:46:24 +02:00
Joshua Ashton
e2bc5d4c71 rendervulkan: Add isYcbcr helper for layers 2022-08-11 08:46:24 +02:00
Joshua Ashton
8d03522dcd subprojects: Bump libliftoff to support unsetting props 2022-08-11 08:46:24 +02:00
Saphira Kai
3122d1aabe update outdated flag and keyboard shortcut information in README 2022-07-29 18:37:50 +02:00
Simon Ser
6371958e1a drm: log when connectors appear/disappear 2022-07-29 10:44:29 +02:00
Simon Ser
2e03b8fb6b drm: always parse EDID on hotplug uevent
Don't parse it only when we see the connector for the first time.
2022-07-29 10:39:18 +02:00
Simon Ser
ce4699fc6d drm: improve preferred flag comparison in compare_modes
Two preferred modes shouldn't happen, but this ensures a copy-paste
for another flag doesn't result in mis-sorted modes and it's more
consistent with the rest of the logic.
2022-07-29 09:25:50 +02:00
Joshua Ashton
90693b72cd drm: Call drmModeGetConnector before getting object properties
Works around a DRM bug where the EDID blob would be 0.

We always get modes from DRM from this, which means it MUST be getting the edid.

Surprise! Calling this before getting the object props makes it so it gets the edid. Yipee!
2022-07-27 18:03:42 +00:00
Joshua Ashton
a23fd5ff54 drm: Always prefer modes > 60Hz to any others
Avoids picking 4K@30Hz and other modes which feel really bad.
Happens on a lot of USB C -> HDMI adapters, even if they advertise support for it online.
2022-07-27 17:51:04 +00:00
Joshua Ashton
30b74a762a vblankmanager: Fix build 2022-07-27 15:58:56 +00:00
Joshua Ashton
7adbdd3f80 drm: Use unordered_map for connectors
When adding/removing from a normal map, the iterators become undefined, which means drm->connector can change randomly to the wrong connector or garbage memory.
2022-07-27 15:50:17 +00:00
Joshua Ashton
282eaae796 steamcompmgr: Split GAMESCOPE_DYNAMIC_REFRESH into internal/external
GAMESCOPE_DYNAMIC_REFRESH remains for internal
GAMESCOPE_DYNAMIC_REFRESH_EXTERNAL will be used for external displays.
2022-07-27 15:46:42 +00:00
Joshua Ashton
9c81cd1d80 vblankmanager: Only move back redzone by refresh for external screens
Deck screen can handle this with our custom clocks and this just increases latency otherwise.
2022-07-27 15:44:17 +00:00