Commit graph

728 commits

Author SHA1 Message Date
Simon Ser
5b776be6d2 Move the run global to main.hpp
It's used by both wlserver and steamcompmgr.
2021-08-10 12:05:49 +02:00
Simon Ser
24bea3406a Make the run global atomic
It's written to from multiple threads.
2021-08-10 12:02:26 +02:00
Simon Ser
0708ab06d2 steamcompmgr: nudge when children have exited
Make sure to wake up steamcompmgr when all children are gone.
Otherwise the steamcompmgr thread will get stuck.
2021-08-10 12:00:48 +02:00
Simon Ser
a038e881c2 steamcompmgr: stop capturing pid in waitThread 2021-08-10 11:57:39 +02:00
Simon Ser
ae66c6037b steamcompmgr: wait all child processes
Closes: https://github.com/Plagman/gamescope/issues/233
2021-08-10 11:56:45 +02:00
Jan Beich
82db27c6fc drm: don't use private wlroots prototype for bundled cvt
src/cvt.cpp:23:10: fatal error: 'backend/drm/cvt.h' file not found
 #include "backend/drm/cvt.h"
          ^~~~~~~~~~~~~~~~~~~
2021-08-07 15:38:17 +02:00
Simon Ser
5c358cef71 ci: build with clang 2021-08-05 10:35:40 +02:00
Simon Ser
ca75f213aa ci: add GitHub action 2021-08-05 10:32:13 +02:00
Simon Ser
f1a340b029 drm: DisplayPort → DP 2021-08-03 15:49:02 +02:00
Simon Ser
4bc7b4952b Remove unnecessary global variables 2021-08-03 15:46:24 +02:00
Simon Ser
538610154c wlserver: make more variables static 2021-08-03 11:33:12 +02:00
Simon Ser
482f1f3b0b wlserver: stop using headless backend for keyboard
The headless backend forces a wlroots renderer to be initialized.
Stop using it, so that it's easier to get rid of the headless
backend altogether.
2021-08-03 11:04:00 +02:00
Simon Ser
ee96a669ef wlserver: check wlr_output_commit return value 2021-08-03 10:42:54 +02:00
Simon Ser
2597c25ec6 readme: mention that Intel is supported 2021-08-03 10:37:27 +02:00
Simon Ser
0034d492d8 wlserver: create wl_output before starting Xwayland
Apparently there's a race that makes Steam unhappy and fail with:

   libGL error: failed to create drawable

Closes: https://github.com/Plagman/gamescope/issues/228
2021-08-02 18:16:09 +02:00
Simon Ser
6e1d4c2a7e drm: switch connector on hotplug
Refresh connector status and mode list on hotplug event. Then
execute the connector selection logic again to see if the
preferred connector has changed.

References: https://github.com/Plagman/gamescope/issues/211
2021-08-02 12:35:49 +02:00
Simon Ser
15b4eb04ec Remove flippable bit from g_emptyTex
This causes a KMS import failure on Intel. A 1x1 buffer never seems
to be flippable there.

Closes: https://github.com/Plagman/gamescope/issues/217
2021-08-02 11:09:40 +02:00
Simon Ser
bedef21474 rendervulkan: add err log for vkAllocateMemory failure 2021-08-02 10:24:11 +02:00
Simon Ser
5f31d7ed79 rendervulkan: add vulkan prefix to log message 2021-08-02 10:22:22 +02:00
Simon Ser
694f6b14e8 rendervulkan: check DRM and Vulkan devices match
References: https://github.com/Plagman/gamescope/issues/158
2021-08-02 10:20:20 +02:00
Simon Ser
4dac8c0c1f rendervulkan: make init_device() return a bool 2021-08-02 10:06:19 +02:00
Simon Ser
d2bca1c440 rendervulkan: make vulkan_init() return a bool 2021-08-02 10:05:03 +02:00
Simon Ser
fa779c0ed2 rendervulkan: log physical device name 2021-08-02 09:47:15 +02:00
Simon Ser
802d86c4bc drm: check return value of liftoff_device_register_all_planes 2021-07-30 16:28:50 +02:00
Simon Ser
82897e1fbf drm: extract connector setup into separate function
It'll get re-used when handling hotplug.
2021-07-28 20:57:56 +02:00
Simon Ser
a314c3f0ba drm: plane -> primary 2021-07-28 19:27:51 +02:00
Simon Ser
a7ab8e7a1a drm: plane_formats -> primary_formats 2021-07-28 19:26:31 +02:00
Simon Ser
94706f0f0e drm: get_matching_mode -> find_mode
For consistency with find_connector.
2021-07-28 19:15:36 +02:00
Simon Ser
6c24e829ae drm: fallback to any connector if none matches 2021-07-28 19:07:07 +02:00
Simon Ser
f15aafe478 drm: add drm_set_connector 2021-07-28 19:03:30 +02:00
Simon Ser
041c0dad1b drm: add drm_set_crtc 2021-07-28 19:00:11 +02:00
Simon Ser
3cbf958680 drm: allow changes from portait mode to landscape 2021-07-28 18:46:48 +02:00
Simon Ser
1b4231e33b drm: set needs_modeset in drm_set_mode 2021-07-28 18:44:36 +02:00
Simon Ser
a978c54fff drm: stop recording drmModeModeInfo in state 2021-07-28 18:40:29 +02:00
Simon Ser
c9b8ff3854 drm: remove outdated TODO 2021-07-28 18:18:16 +02:00
Simon Ser
f1eb06d9b7 drm: add explicit needs_modeset flag 2021-07-28 18:17:07 +02:00
Simon Ser
802f01d16f drm: give up the modeset on failure
Instead of being stuck when modesetting is not possible, rollback
the changes and give up.
2021-07-28 18:11:20 +02:00
Simon Ser
3ffd29c23a drm: group current state 2021-07-28 18:09:52 +02:00
Simon Ser
24fe84c402 drm: reload our internal state on hotplug 2021-07-28 17:58:07 +02:00
Simon Ser
fae6bfc411 drm: refresh props after VT switch 2021-07-28 17:47:41 +02:00
Simon Ser
2b975d14af drm: add CRTC state
This allows tracking whether we've previously disabled a CRTC.
2021-07-28 17:33:20 +02:00
Simon Ser
df6091a3b4 drm: de-duplicate drmModeGetProperty calls
A property can be attached to multiple objects.
2021-07-28 17:02:47 +02:00
Simon Ser
c0c005278c rendervulkan: remake output images on resolution change 2021-07-28 16:50:45 +02:00
Simon Ser
590d7129aa drm: add drm_set_resolution
Allows to easily switch the output resolution.
2021-07-28 16:40:51 +02:00
Simon Ser
d67ce2865e wlserver: make global static
Let's prevent other threads from directly accessing it. Helper
functions can be introduced as needed.
2021-07-28 16:14:59 +02:00
Simon Ser
d79530d13b steamcompmgr: fix error path on execvp failure 2021-07-28 15:00:58 +02:00
Simon Ser
7ff26668ab rendervulkan: don't use global g_output.pScreenshotImage in BInit 2021-07-28 13:17:58 +02:00
Simon Ser
82c89fdff9 Log screenshot filename 2021-07-28 13:17:58 +02:00
Simon Ser
e678e0c0b2 sdlwindow: replace goto with bool flag 2021-07-28 13:17:58 +02:00
Simon Ser
f44db16b1b Check wlserver_init return value 2021-07-27 16:45:31 +02:00