Simon Ser
26a25b1d29
Pass list of modifiers when allocating with Vulkan
...
This allows us to remove the wsi_image_create_info hack when
modifiers are supported.
References: https://github.com/Plagman/gamescope/issues/51
2021-04-01 13:13:38 +02:00
Sefa Eyeoglu
774002483b
fix: update liftoff log initialisation
...
Also: Update liftoff dependency to b08bbaa5e6331ed2
("Split liftoff_log_init into set_handler and set_priority")
The callback parameter was moved into a different method, though it is
not needed in this case as we didn't give it one before.
2021-03-31 14:25:39 +02:00
Pierre-Loup A. Griffais
7dfb55c8a8
steamcompmgr: disable XRes1.2 support by default.
...
Can re-enable it once an XRes release with this fix has been tagged for a bit:
https://gitlab.freedesktop.org/xorg/lib/libxres/-/merge_requests/1?commit_id=3e6bdd90c604e061c71715865eb403ffdd0dd7f0
Or users can use -x for now.
2021-03-30 18:11:27 -07:00
Pierre-Loup A. Griffais
5936baa865
steamcompmgr: make cursor hide time configurable, -C in ms
2021-03-24 20:35:33 -07:00
Simon Ser
8f9a284d32
Print error if poll fails in imageWaitThreadMain
2021-03-12 19:19:25 +01:00
Simon Ser
29d00dbc68
tracing: use {begin,end}_ctx helpers, remove unnecessary newlines
2021-03-11 11:25:34 +01:00
Simon Ser
36c8b983ee
drm: fix missing flag in drmModeAddFB2WithModifiers call
...
That's a nice footgun right here.
2021-03-05 16:04:45 +01:00
Simon Ser
7633401874
drm: check DRM format/modifier prior to addfb2
2021-03-05 14:47:59 +01:00
Simon Ser
f89f585cdd
drm: build set of scanout capable formats
2021-03-05 14:26:30 +01:00
Simon Ser
706bdf849e
drm: store KMS props in a map
2021-03-05 14:18:09 +01:00
Simon Ser
47fed361cd
drm: remove obscure macros
2021-03-05 11:46:59 +01:00
Simon Ser
9f07d66143
drm: whitespace fixes
2021-03-05 11:32:22 +01:00
Simon Ser
1dc98da7d1
Log when tracing is enabled
2021-03-03 16:51:58 +01:00
Simon Ser
ad06b347ee
Always print error on missing DRM_CAP_ADDFB2_MODIFIERS
2021-03-03 16:07:35 +01:00
Simon Ser
0f96db3dc2
Fix is_focus_priority_greater function
2021-03-02 19:16:56 +01:00
Simon Ser
2d992653a0
drm: remove workaround for small buffers
...
Even if we get EINVAL, we'll just return false later on.
2021-02-25 17:21:27 +01:00
Simon Ser
c0fba1fe9f
drm: remove duplicate assert
2021-02-25 17:14:18 +01:00
Simon Ser
29a23e90e1
drm: simplify rotation in drm_prepare_basic
2021-02-25 17:11:36 +01:00
Simon Ser
141f2cf374
Revert "Remove bogus ARGB8888 entry from Vulkan format list"
...
This reverts commit 202915271e
.
We actually need this format for the cursor plane.
2021-02-25 17:11:36 +01:00
Sefa Eyeoglu
72c629638d
fix: update libliftoff pkg-config dependency
...
emersion/libliftoff@470af77869 changed the
name of the pkg-config dependency to libliftoff
2021-02-25 14:59:02 +01:00
Simon Ser
79acc095b2
rendervulkan: assert DRM format is valid when exporting DMA-BUF
2021-02-24 15:07:23 +01:00
Simon Ser
49e0cc046e
Move Vulkan init into main
...
Some Wayland server setup will need Vulkan initialized.
2021-02-22 12:37:56 +01:00
Simon Ser
202915271e
Remove bogus ARGB8888 entry from Vulkan format list
2021-02-22 12:37:52 +01:00
Simon Ser
b37880c62f
Add TODO about multi-planar DMA-BUFs and vkBindImageMemory
2021-02-22 12:37:46 +01:00
Simon Ser
9b63bf755e
drm: initialize handles before drmModeAddFB2WithModifiers
...
This fixes a drmModeAddFB2WithModifiers EINVAL.
2021-02-19 17:41:33 +01:00
Simon Ser
7eb7e8ec63
Don't scale games by default
...
Right now scale games by default to 720p even if the screen is 1080p.
This happens when -w/-h is *not* specified.
Instead, don't scale the game by default. This means using a 720p
window when nested (shouldn't change anything), and using the screen's
resolution when embedded.
2021-02-12 22:16:34 +01:00
Simon Ser
70af2c38f0
Query window PID via XRes
...
References: https://github.com/Plagman/gamescope/issues/17
2021-02-12 22:16:04 +01:00
Simon Ser
0beb34b9d5
steamcompmgr: prefer to focus windows without SKIP_{TASKBAR,PAGER}
...
Closes: https://github.com/Plagman/gamescope/issues/87
2021-02-12 22:15:45 +01:00
Simon Ser
0275e7839d
steamcompmgr: simplify focus logic
...
Use std::sort instead of a complicated loop.
2021-02-12 22:15:45 +01:00
Simon Ser
c26d86a794
steamcompmgr: store SKIP_TASKBAR and SKIP_PAGER hints
2021-02-12 22:15:45 +01:00
Simon Ser
bce006fd70
Fix typo in drm.cpp
2021-02-09 14:55:01 +01:00
Bas Nieuwenhuizen
d537d6ac98
Cherck all imported DMABUFS are equal.
...
Otherwise we need Vulkan support for the disjoint bit.
2021-02-02 23:56:32 +01:00
Bas Nieuwenhuizen
722201c5c2
Support Vulkan modifier-based imports using VK_EXT_image_drm_format_modifier
...
Tested with radv + radeonsi + glxgears on navi21 to work with DCC (assuming
the nodcc bit is disabled).
This is conservative and will fall back to the legacy path if the modifier
isn't supported. At the same time it also avoids the wird mesa WSI struct
if the modifier is supported.
2021-02-02 23:56:32 +01:00
Simon Ser
bb205a41b0
Add support for modifiers in drm_fbid_from_dmabuf
2021-02-01 15:59:12 +01:00
Simon Ser
c7c917e39a
Read DRM_CAP_ADDFB2_MODIFIERS
2021-02-01 15:52:48 +01:00
Simon Ser
4e6204e079
Zero-initialize DRM globals
...
Let's make sure we don't run into uninitialized values.
2021-02-01 15:52:11 +01:00
Simon Ser
32ebfeb498
Add support for multi-planar buffers in drm_fbid_from_dmabuf
2021-02-01 15:45:30 +01:00
Simon Ser
17c74e3e6b
Don't crash when KMS rejects client FB
...
If the client provides a DMA-BUF that cannot be scanned out, don't
crash. We should just fallback to composition instead.
2021-02-01 15:41:00 +01:00
Simon Ser
1b38faf9fd
Fix double-unlock on wl_event_loop_dispatch error
2021-02-01 15:27:21 +01:00
Simon Ser
b841139327
Collect plane modifiers
...
This will be useful once we implement support for modifiers.
2021-02-01 15:08:01 +01:00
Simon Ser
1c80548dfc
Use CLOEXEC when opening primary DRM node
...
Avoids leaking the FD to our clients.
2021-02-01 14:37:22 +01:00
Simon Ser
7b51575399
Check plane supports {X,A}RGB8888
...
Fail if it doesn't instead of leaving g_nDRMFormat uninitialized.
2021-02-01 14:29:53 +01:00
Simon Ser
598228589d
Only pick primary planes in get_plane_id
...
If we pick another plane, g_nDRMFormat isn't populated. This isn't
a case worth supporting anyways, all drivers expose primary planes.
2021-02-01 14:27:34 +01:00
Simon Ser
9b2da80c23
Convert found_primary to bool in get_plane_id
2021-02-01 14:24:33 +01:00
Simon Ser
b8ecceb48b
Fix return value of get_plane_id
...
The caller checks for 0, not negative values.
2021-02-01 14:22:53 +01:00
Simon Ser
0c99a3c09d
Require planes to have a type property
...
This is guaranteed by DRM core.
2021-02-01 14:22:03 +01:00
Simon Ser
91e7ca45fc
Introduce a helper to get a property value
...
This will be useful for other properties, like IN_FORMATS.
2021-02-01 14:18:26 +01:00
Simon Ser
7f65dedbab
Fix indentation in get_plane_id
2021-02-01 12:26:50 +01:00
Simon Ser
9b780b48db
Use no-op backend for output
...
This avoids needlessly creating buffers for an headless output we won't
use, and will allow us to more easily replace the headless backend with
a custom renderer in the future.
2021-02-01 10:24:39 +01:00
Simon Ser
c9acfb5a68
Allow SDL to run in pure Wayland mode
2021-01-29 18:33:18 +01:00