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
Simon Ser
c33ad217e1
Handle session switch events
...
Pause/resume our frame submission on VT switch.
Closes: https://github.com/Plagman/gamescope/issues/6
2021-07-27 14:11:00 +02:00
Simon Ser
cc309681e3
drm: add more logging for prepare failures
2021-07-27 13:58:22 +02:00
Simon Ser
e125a82914
Don't die on EACCES
...
EACCES is returned by the kernel when we're VT-switched away.
2021-07-27 13:54:47 +02:00
Simon Ser
43ba33425b
Open KMS device with wlr_session
...
This allows proper integration with logind/seatd. When switching
VTs, gamescope now dies with ENOPERM instead of making VT switching
freeze.
References: https://github.com/Plagman/gamescope/issues/6
2021-07-27 11:25:05 +02:00
Simon Ser
ba79953e4e
wlserver: strip wl_ prefix from fields, remove event loop FD
2021-07-27 10:46:03 +02:00
Simon Ser
5f638dd780
wlserver: add missing newline to error log
2021-07-27 10:31:34 +02:00
Simon Ser
f33b040ba7
Move steamcompmgr init out of wlserver
2021-07-27 10:30:14 +02:00
Simon Ser
0f0489b455
wlserver: wait for Xwayland to be ready in wlserver_init
...
We''l be able to move some init bits out of wlserver with this.
2021-07-27 10:25:56 +02:00
Simon Ser
25b036a2d6
drm: simplify add_{connector,crtc,plane}_property
2021-07-26 12:17:55 +02:00
Simon Ser
fc31fcf359
drm: atomically disable CRTCs
2021-07-26 11:46:40 +02:00
Simon Ser
5c6ab5a730
drm: ignore page-flip events on other CRTCs
2021-07-26 11:46:40 +02:00
Simon Ser
d5d3efe303
drm: add missing newline in debug log message
2021-07-26 11:38:42 +02:00
Simon Ser
999673e56b
drm: print human-readable error string on commit failure
2021-07-26 11:36:12 +02:00
Simon Ser
35a0eff0c4
drm: log flipcount in drm_atomic_commit if logs are enabled
2021-07-26 11:32:59 +02:00
Simon Ser
da58d14dda
drm: log flipcount as integer in page_flip_handler
2021-07-26 11:31:16 +02:00
Simon Ser
5fedd45d2f
Switch to poll
...
epoll doesn't offer any benefit for our use-case. select is old.
Let's just make things consistent and use the portable poll
everywhere.
2021-07-25 20:42:16 +02:00
Simon Ser
9a6b72f712
rendervulkan: document bNeedsSwizzle
2021-07-25 19:59:37 +02:00
Simon Ser
c9e8634e13
rendervulkan: add back VK_FORMAT_R8G8B8A8_UNORM
...
This format is used for the cursor. Regressed by 8b70637998
("Use
VK_FORMAT_B8G8R8A8_UNORM no swizzle for DRM_FORMAT_ARGB8888").
gamescope: ../src/rendervulkan.cpp:369: bool CVulkanTexture::BInit(uint32_t, uint32_t, VkFormat, CVulkanTexture::createFlags, wlr_dmabuf_attributes*): Assertion drmFormat != DRM_FORMAT_INVALID' failed.
2021-07-25 19:55:06 +02:00
Simon Ser
5d12da3d22
drm: fetch formats for all planes
...
We were stopping at the primary plane, but we can also scanout
on the overlay planes.
2021-07-25 19:49:26 +02:00
Simon Ser
8828f7218b
drm: log selected connector
2021-07-24 12:28:49 +02:00
Joshua Ashton
8b70637998
Use VK_FORMAT_B8G8R8A8_UNORM no swizzle for DRM_FORMAT_ARGB8888
...
We use this as an input not as the output so we can just use the DRM format as this exactly with no swizzle.
This format is guaranteed to be supported.
2021-07-23 16:33:22 +02:00
Joshua Ashton
860f4d6384
Use VK_FORMAT_R8G8B8A8_UNORM for DRM ARGB formats
...
DRM formats are not endian-dependent, therefore we should not use the PACK32 formats for this.
2021-07-23 16:33:22 +02:00
Simon Ser
7a55cb80b9
drm: sort mode list for all connectors
...
We'll add multi-output support in the future, so we'll need to pick
a mode for an arbitrary connector.
2021-07-22 16:56:19 +02:00
Simon Ser
e5e0ebf5a4
drm: allow selecting a connector via -O
...
References: https://github.com/Plagman/gamescope/issues/211
2021-07-22 16:50:16 +02:00
Simon Ser
52063b3858
wlserver: improve wlr_session_create error handling
2021-07-22 15:09:10 +02:00
Simon Ser
96346bd5f1
wlserver: remove unnecessary wlr_backend_is_headless check
...
A headless backend will always pass this check.
2021-07-22 15:01:09 +02:00
Simon Ser
ebfdad512f
drm: take struct arg in add_{connectopr,crtc,plane}_property
2021-07-20 21:39:46 +02:00
Simon Ser
11927253d5
drm: remove get_prop_value
2021-07-20 21:36:15 +02:00
Simon Ser
593fe90695
drm: save initial object prop values
2021-07-20 21:32:02 +02:00
Simon Ser
637e5341d4
drm: de-indent loop in find_primary_plane
2021-07-20 21:24:52 +02:00
Simon Ser
b2f016dfe5
drm: drop {crtc,plane,connector}_id fields
2021-07-20 21:21:43 +02:00
Simon Ser
69caa325c4
drm: populate plane/crtc/connector from vectors
2021-07-20 21:21:43 +02:00
Simon Ser
97853e2ecb
drm: stop calling drmModeGetPlaneResources in find_primary_plane
2021-07-20 21:21:42 +02:00
Simon Ser
defd14d39d
drm: make find_crtc_for_connector return a crtc pointer
2021-07-20 21:21:04 +02:00
Simon Ser
d5097e2a21
drm: remove duplicate drmModeGetResources
2021-07-20 21:21:03 +02:00
Simon Ser
70d3dda4d4
drm: stop trying to use previous encoder/CRTC
...
Just pick one, simplifies our logic. Now that we disable all CRTCs
on startup, we don't risk stepping over another connector's.
2021-07-20 21:20:34 +02:00
Simon Ser
c9af23c750
drm: use drmIsKMS to detect KMS-capable devices
2021-07-20 21:20:34 +02:00
Simon Ser
930ceb271b
drm: fetch all connectors, CRTCs and planes on init
...
We need to fetch the props anyways to select the right objects.
2021-07-20 21:20:32 +02:00
Simon Ser
a2ba2b1b5b
drm: fix find_crtc_for_connector error return value
...
The return type is uint32_t so we can't return -1. 0 is a perfectly
fine error guard since DRM object IDs can't have this value.
2021-07-20 19:40:20 +02:00
Simon Ser
f021460c90
build: lookup a native glslangValidator executable
2021-07-20 18:56:05 +02:00
Simon Ser
a691f08171
build: remove C from language list
2021-07-20 18:43:09 +02:00
Simon Ser
0c33a70f11
build: stop linking against math
2021-07-20 18:41:16 +02:00
Simon Ser
bfd02dc550
build: whitespace inconsistency fixes
2021-07-20 18:40:09 +02:00
Simon Ser
09980c11fd
build: remove duplicate cc assignment
2021-07-20 18:38:24 +02:00
Simon Ser
cf395c765b
build: use force_fallback_for
...
This allows users to more easily control how dependencies are
looked up. By default, a subproject is used, but users can pass
--force_fallback_for=[] to use system deps.
2021-07-20 18:33:51 +02:00
Simon Ser
17ba657dd6
build: cleanup source files indent
2021-07-20 18:25:36 +02:00