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
Simon Ser
b380f3fbf2
drm: allow to switch refresh rate at runtime
...
References: https://github.com/Plagman/gamescope/issues/206
2021-07-20 17:53:38 +02:00
Simon Ser
852d3b12a9
drm: embed drm_t.mode
...
This will allow us to store a custom mode there, instead of a
mode that comes from the EDID.
2021-07-20 17:31:57 +02:00
Simon Ser
127b1b510e
drm: sort modes
...
This allows the best mode to be selected even if a constraint is
specified (such as the width or height).
2021-07-20 16:58:12 +02:00
Simon Ser
a3144601c3
drm: select mode based on g_nNestedRefresh
...
g_nOutputRefresh is not set by CLI flags.
2021-07-20 16:25:54 +02:00
Simon Ser
17edd12b3f
drm: pick mode based on CLI args
2021-07-20 16:14:52 +02:00
Simon Ser
953c5ec377
drm: move mode selection to get_preferred_mode function
2021-07-20 15:59:35 +02:00
Simon Ser
af1ba566ba
drm: remove mode_str and vrefresh args from init_drm
...
We'll change these at runtime, so let's stop taking them as init
args. They were unused.
2021-07-20 15:53:15 +02:00
Simon Ser
a22e9d3c0d
Simplify g_nSubCommandArg logic
...
getopt() will eat the "--" separator if there's one. Rely on the
value of optind after the getopt() loop finishes to figure out
whether a command has been specified.
2021-07-20 13:28:24 +02:00
Simon Ser
4cc32ca8a6
readme: simplify example command
2021-07-20 13:16:57 +02:00
Simon Ser
97ae60154d
Add 16:9 defaults for -W/-w
2021-07-20 13:10:50 +02:00
Simon Ser
84dd1e6542
Use inodes to compare DMA-BUFs
...
The file descriptions are only equal to each other if the producer
has dup'ed the same FD.
2021-07-05 19:32:26 +02:00
Simon Ser
eb5972ccf6
Bump libliftoff to 0.1.0
2021-07-01 14:38:53 +02:00
Pierre-Loup A. Griffais
9842f2f807
steamcompmgr: fight clients over focus if we have to
...
A client can call SetInputFocus at arbitrary times and some do, like Chrome webviews.
2021-06-29 21:01:55 -07:00
Pierre-Loup A. Griffais
45c801e0ac
steamcompmgr: report input focus as focused app, not necessarily main plane
2021-06-29 19:27:27 -07:00
Pierre-Loup A. Griffais
f7e1cb2e2e
steamcompmgr: fix copy paste error
2021-06-29 19:06:10 -07:00
Pierre-Loup A. Griffais
88596b9645
steamcompmgr: get rid of set_win_hidden
...
The HIDDEN state was originally just a hint for Panorama windows. It can confuse
other clients. The other states can actually be harmful too, like setting
FULLSCREEN was technically incorrect in many cases.
We might want to always set the FOCUS state on every window, but we never needed
it before so I'm inclined to wait and see there.
2021-06-29 17:50:25 -07:00
Joshua Ashton
00622fff62
rendervulkan: Implement NV12 compositing
...
Dependent on latest Mesa for my commit to support unnormalized ycbcr:
855cb78d46
2021-06-29 16:34:07 -07:00
Joshua Ashton
39fff770f4
rendervulkan: Use Vulkan 1.1
...
Less hastle going forward for stuff promoted, and we don't want to be running on stuff that doesn't support this anyway...
2021-06-29 16:34:07 -07:00
Simon Ser
d176770c15
steamcompmgr: add comment about our iconic handling
2021-06-29 19:02:35 +02:00
Simon Ser
f8fbd06af4
steamcompmgr: never put windows in iconic state
2021-06-29 18:35:11 +02:00
Simon Ser
5e201b3c08
steamcompmgr: reject WM_CHANGE_STATE messages
2021-06-29 18:30:26 +02:00
Simon Ser
5b3ea51f7b
drm: disable all CRTCs on startup
...
If the CRTC we've selected is being used on another connector,
our modeset fails.
2021-06-22 16:39:56 +02:00
Simon Ser
3e17ea2e6f
Add enum for g_nTouchClickMode
...
Makes it clearer what the values mean.
2021-06-18 10:44:13 +02:00
Simon Ser
2807bb27c1
Fix NULL g_XWLDpy
...
The previous commit stopped using the X11 server for nudging the
XWM. Thus g_XWLDpy has been dropped. However we still need it to
send XTest events.
2021-06-16 09:17:45 +02:00
Simon Ser
33f207d6a1
Replace nudge X11 events with pipe
...
Avoids the roundtrip through the X11 server. Avoids having to connect
to the X11 server from multiple threads.
2021-06-10 14:49:02 +02:00
John Schoenick
0194432185
Tag 3.8.3
2021-06-09 13:23:05 -07:00
Simon Ser
d187c2241e
steamcompmgr: improve wait thread robustness
2021-06-09 19:16:22 +02:00
Simon Ser
24b5611478
Terminate wlserver when steamcompmgr stops
...
Closes: https://github.com/Plagman/gamescope/issues/167
2021-06-09 19:10:32 +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
Simon Ser
d8dacddaea
steamcompmgr: flush display after sending nudge event
2021-06-09 18:18:56 +02:00
Simon Ser
03d14fd67d
Set O_CLOEXEC on stats FD
2021-06-09 17:40:52 +02:00