Joshua Ashton
966439e84b
steamcompmgr: Defer focus setting in X event loop
...
Otherwise we can get BadWindow errors as the window may have been destroyed later in the event list.
2021-12-14 15:51:50 -08:00
Joshua Ashton
bb3fd430eb
sdlwindow: Don't hide window in Steam mode
...
Enables testing held commits, etc better.
2021-12-14 15:51:50 -08:00
Joshua Ashton
e6726ccc3a
steamcompmgr: Clean up dangling commits on shutdown
2021-12-14 15:51:50 -08:00
Joshua Ashton
2019359448
steamcompmgr: Release commits on Window destruction
...
We could still have these hanging out in the commit queue after import doing nothing.
2021-12-14 15:51:50 -08:00
Joshua Ashton
c85de4a59c
steamcompmgr: Add debugging for commit refs
2021-12-14 15:51:50 -08:00
Jan Beich
9553362865
steamcompmgr: add missing header for libc++ after 296a3d498d
...
src/steamcompmgr.cpp:270:41: error: implicit instantiation of undefined template 'std::array<commit_t, 2>'
std::array<commit_t, HELD_COMMIT_COUNT> g_HeldCommits;
^
/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
^
src/steamcompmgr.cpp:1160:50: error: implicit instantiation of undefined template 'std::array<BaseLayerInfo_t, 2>'
std::array< BaseLayerInfo_t, HELD_COMMIT_COUNT > g_CachedPlanes = {};
^
/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
^
2021-12-14 18:12:19 +01:00
Joshua Ashton
dd22f8db76
steamcompmgr: Fix validContents nullptr deref
...
We check for this below, we should check it here too otherwise it's pointless
2021-12-13 23:47:29 -08:00
Joshua Ashton
cf20a692d8
steamcompmgr: Add --fade-out-duration option
...
Allows controling the fade out duration without recompiling the whole compositor.
2021-12-13 23:47:29 -08:00
Joshua Ashton
95baa301c7
steamcompmgr: Implement fades
2021-12-13 23:47:29 -08:00
Joshua Ashton
8a84b4d7e6
drm: Remove assertion about base layer opacity
...
We want this for fades.
2021-12-13 23:47:29 -08:00
Joshua Ashton
0252f44ffe
rendervulkan: Handle base layer opacity
2021-12-13 23:47:29 -08:00
Joshua Ashton
06cb10683a
steamcompmgr: Cache and preserve base commit until we get a new one
...
Fixes black frames when focusing new windows without commits yet.
2021-12-13 23:47:29 -08:00
Joshua Ashton
296a3d498d
steamcompmgr: Add framework for held commits
2021-12-13 23:47:29 -08:00
Joshua Ashton
a5af1a78c1
steamcompmgr: Avoid deadlock between import_commit and destroy_buffer
...
Very rarely we can see a deadlock between import_commit and destroy_buffer where:
- destroy_buffer is waiting on `wlr_buffer_map_lock` and has `wlserver_lock` (from up the chain)
- import_commit has `wlr_buffer_map_lock` and is waiting on `wlserver_lock`
To avoid this, we simply replace the lock_guard in import_commit with a unique_lock and manually unlock this before going into the section where we need to lock the wl_server.
This is safe for a few reasons:
- 1: All accesses to wlr_buffer_map are done before this lock.
- 2: destroy_buffer cannot be called from this buffer before now
as it only happens because of the signal added below.
- 3: "References to elements in the unordered_map container remain
valid in all cases, even after a rehash."
2021-12-13 23:46:39 -08:00
Joshua Ashton
952949f1a1
steamcompmgr: Fix crusty cursor in some scenarios
...
The PNG spec says that alpha is not premultiplied, so we need to do that.
(Although there are some things that do use PNG with premultiplied alpha... but let's just ignore that for now and go with the PNG spec and what we are getting exported to us to use on Deck.)
Cursor in X must have premultiplied alpha, our blending setup breaks a lot if this is not true.
2021-11-26 21:55:40 +01:00
Joshua Ashton
93e4d94a78
steamcompmgr: Add --cursor-hotspot
...
Allow setting the hotspot for the custom cursor.
2021-11-26 21:45:39 +01:00
Joshua Ashton
4ee56a1e75
rendervulkan: Do not premultiply color
...
The surface should already have premultiplied alpha.
Gets us to how we look with planes.
2021-11-22 21:48:58 -08:00
Joshua Ashton
23430084e2
rendervulkan: Blend in linear space
...
We must blend in linear space, not SRGB space or we get these horrible browns.
Gets us closer to how this looks with planes.
2021-11-22 21:48:58 -08:00
Bas Nieuwenhuizen
7e93200e08
Dedupe and memoize fb_id and vulkan texture per buffer.
...
Also split lock/unlock from import/drop in drm, because we still
need the lock/unlock semantics to signal to the app when ti can
reuse the buffer.
2021-11-22 21:45:52 -08:00
Bas Nieuwenhuizen
5fc9df512c
Add wlr_buffer destroy callback.
...
Couldn't find a wlr_buffer creation callback, so doing some
work on commit.
2021-11-22 21:45:52 -08:00
Bas Nieuwenhuizen
c0d745baac
Use atomics for CVulkanTexture refcounts.
...
Otherwise the double access on destruction could be very messy. The
default for all these operations is the cst memory order which is
certainly good enough though technically not the most optimal.
(Could do acq_rel for all of them).
2021-11-22 21:45:52 -08:00
Bas Nieuwenhuizen
3a1776f0f8
Properly lock the id->CVulkanTexture map.
...
Only locks the map itself, the lifetime of the texture itself has
still to be known to be valid.
2021-11-22 21:45:52 -08:00
Bas Nieuwenhuizen
5f6940f7d6
Make the drm fb map threadsafe.
...
It could be accessed both in the pageflip handler and in the main
thread.
2021-11-22 21:45:52 -08:00
Joshua Ashton
df781455cf
steamcompmgr: Cleanup focusable loops
...
Use for-each to make things much easier to follow here.
2021-11-22 21:43:32 -08:00
Joshua Ashton
584215dc47
steamcompmgr: Take into account appids for override redirect resolution
2021-11-22 21:43:32 -08:00
Joshua Ashton
d4c8880bdf
steamcompmgr: Workaround zpos bug
...
Super rarely we see bugs when the zposes differ from these values.
For now, let's workaround that and have a define to enable the behaviour so we can fix this in kernel later.
2021-11-22 21:43:32 -08:00
Joshua Ashton
5d9ace2b00
steamcompmgr: Resolve transient override redirects
...
Fixes dropdowns in Origin.
2021-11-22 21:43:32 -08:00
Joshua Ashton
72bc8ec56f
steamcompmgr: Bail presentation if no windows have valid commits
...
Fixes some black frames in some seamless boot on Deck as of 39574a86b6d54d786f057a7a1951e690ca49b370
2021-11-22 21:43:32 -08:00
Joshua Ashton
623c457721
steamcompmgr: Make sure to repaint on focus window change
2021-11-22 21:43:32 -08:00
Joshua Ashton
6697abc766
steamcompmgr: Position cursor and override windows accordingly
2021-11-22 21:43:32 -08:00
Joshua Ashton
6402b5cd40
steamcompmgr: Fix child window cursor barrier
...
If our input focus is ever a child window, we need to account for its X/Y offset in the check for warping it.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-22 21:43:32 -08:00
Joshua Ashton
7fd1f3c930
steamcompmgr: Implement support for override redirect windows
2021-11-22 21:43:32 -08:00
Joshua Ashton
dbdf1095f8
rendervulkan: Add --composite-debug
...
Adds a --composite-debug flag for displaying frame markers on alternating corners of the screen or rotating in a localized square when compositing.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-22 21:40:10 -08:00
Simon Ser
8be45451d9
Introduce --generate-drm-mode
2021-11-20 16:01:39 -08:00
Joshua Ashton
10dd0322d4
steamcompmgr: Resolve transient links before determining input focus
...
Helps with launchers like FO:NV and other games where we end up having the visuals disjoint from what we actually want to input to.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-20 16:00:21 -08:00
Simon Ser
e8dab4efe0
Drop unnecessary typedef
2021-11-10 18:30:47 +01:00
Pierre-Loup A. Griffais
6831e6df2c
steamcompmgr: don't repaint on focus change
...
This'll repaint an empty texture we don't want in a lot of cases.
Reverts part of 7796ffc130
.
2021-11-07 22:46:26 -08:00
Pierre-Loup A. Griffais
5e7dcd30f8
steamcompmgr: don't focus random windows
...
If we don't have -e, everything will have a fake gameID to get focus.
2021-11-07 21:01:56 -08:00
Simon Ser
b3b8d60c00
Disable Xwayland touch pointer emulation
...
Depends on https://github.com/swaywm/wlroots/pull/3289
2021-11-02 12:21:12 +01:00
Simon Ser
78a2496386
pipewire: set CORRUPTED flag when buffer params mismatch
2021-11-01 14:51:03 +01:00
Simon Ser
6be82ccabb
Copy Vulkan textures in PipeWire thread
2021-11-01 10:01:32 +01:00
Simon Ser
e80e4393de
Add CVulkanTexture::{m_width,m_height}
2021-11-01 09:56:08 +01:00
Simon Ser
49fb59ac56
Don't use std::unique_ptr for screenshot textures
...
We need to keep the screneshot textures around if they are still
ref'ed when we re-make the swapchain. std::unique_ptr makes this
impossible. Switch to std::shared_ptr, and get rid of the nLockRefs
field.
2021-11-01 09:44:51 +01:00
Simon Ser
1b9c554f32
Set name for screenshot thread
2021-10-29 17:03:37 +02:00
Joshua Ashton
c7a22d4777
Add error handling to screenshot saving
2021-10-29 13:13:23 +02:00
Joshua Ashton
0aa6761157
Introduce screenshot saving thread
...
Fixes hangs/stutters when taking screenshots.
Should be trivial to extend to pipewire too.
2021-10-29 13:13:23 +02:00
Joshua Ashton
dd5de82c7e
Use PNG for screenshots
...
Closes : #291
2021-10-29 13:13:23 +02:00
Simon Ser
f3865a73bd
Name our threads
...
Unfortunately the name length is limited to 15 characters, and the
executable name is dropped from the name if we don't include it.
2021-10-27 17:18:29 +02:00
Simon Ser
cabba8c921
drm: set mode type to USERDEF
...
Makes it easier to spot it in drm_info, among other things.
2021-10-26 16:29:20 +02:00
Simon Ser
d3496fd719
drm: fix drm_set_refresh when rotated
2021-10-19 16:08:03 +02:00
Bas Nieuwenhuizen
7796ffc130
Force a redraw if the window focus changes.
...
Otherwise if all of the windows in the new situation never redraw
we never update to show the new focus configuration.
This change avoids things like stuck overlays and notification
windows if the underlying game is stuck.
2021-10-18 14:39:18 +02:00
Pierre-Loup A. Griffais
26aeebf11d
steamcompmgr: publish input change count
2021-10-17 20:17:30 -07:00
Simon Ser
ba32e4df21
ime: add support for actions
2021-10-08 22:55:01 -07:00
Simon Ser
a3ec65ef06
Switch to vendored protocol
...
We'll implement some more features on top of input-method, so let's
incubate our own protocol for now. We'll give feedback upstream
once we've experimented a bit with this approach.
The protocol is minimal: it just includes the features needed for
gamescope. It's always easier to add new requests/events than to
change existing ones.
2021-10-08 22:55:01 -07:00
Simon Ser
ad26899b20
ime: reset keymap after sending emulated key events
...
This fixes SteamOS' virtual keyboard.
2021-10-08 22:55:01 -07:00
Simon Ser
6d2b53197e
ime: introduce keycode allow-list
...
Some clients (Chromium…) assume keycodes are always coming from
evdev, and interpret e.g. KEY_ESC directly without using the keymap.
2021-10-08 22:55:01 -07:00
Simon Ser
2ba6eefad8
ime: check for xkb_keysym_get_name errors
2021-10-08 22:55:01 -07:00
Simon Ser
6f26dae77e
ime: send void keysym before key sequence
...
This works around Chromium issues.
2021-10-08 22:55:01 -07:00
Simon Ser
880c87f4c5
ime: disable key repeat
...
Just in case.
2021-10-08 22:55:01 -07:00
Simon Ser
97623694dc
ime: remove unicode keysym name workaround
...
It seems like xkb_keysym_get_name behaves as expected now.
2021-10-08 22:55:01 -07:00
Simon Ser
49da53db55
Implement a subset of input-method-unstable-v2
...
This allows a Wayland client to send arbitrary UTF-8 text to the
currently focused X11 client. Useful for virtual keyboards.
We generate a keymap on-the-fly suitable for the text to type.
2021-10-08 22:55:01 -07:00
Simon Ser
c87dd2ef5c
Drop loadargbcursor
...
This is now built-in in gamescope.
2021-10-06 18:48:47 +02:00
Pierre-Loup A. Griffais
39c9e93e0c
Make default touch mode configurable.
2021-10-04 15:00:29 -07:00
Simon Ser
a5a31d46e3
Upgrade libliftoff
2021-09-30 11:22:40 +02:00
Simon Ser
21b263768f
rendervulkan: order formats with alpha first
...
This allows the cursor to be exported as an ARGB8888 buffer suitable
for the cursor plane.
2021-09-29 19:02:18 +02:00
Simon Ser
f55106a344
drm: reset alpha prop on shutdown
2021-09-27 12:42:33 +02:00
Simon Ser
e29e375904
sdlwindow: make most variables static
2021-09-21 11:00:51 +02:00
Joshua Ashton
50f695591d
rendervulkan: Force nearest filtering for non-scaled and integer offset things
...
No reason to do linear filtering otherwise.
2021-09-15 10:58:38 -07:00
Joshua Ashton
b46cc14025
rendervulkan: Use textureLod()
...
May as well.
2021-09-15 10:58:38 -07:00
Joshua Ashton
320a23220a
rendervulkan: Sample at texel centers
...
I missed adding this back in when I did the PR that was meant to fix this when I was debugging... Oops.
2021-09-15 10:58:38 -07:00
Jan Beich
12bff15700
wlserver: hide remaining pipewire stuff with -Dpipewire=disabled
...
src/wlserver.cpp:511:13: warning: unused function 'create_gamescope_pipewire' [-Wunused-function]
static void create_gamescope_pipewire( void )
^
2021-09-15 18:42:12 +02:00
Jan Beich
5548b29521
wlserver: compare using larger type on 32-bit architectures
...
src/wlserver.cpp:430:16: warning: comparison of integers of different signs: 'long' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
if (s->wl_id == id && s->wlr == nullptr)
~~~~~~~~ ^ ~~
2021-09-15 18:42:12 +02:00
Jan Beich
04fd7ed5b7
drm: adjust printf format modifiers for 32-bit architectures
...
src/drm.cpp:187:50: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
drm_verbose_log.debugf("page_flip_handler %lu", flipcount);
~~~ ^~~~~~~~~
%llu
src/drm.cpp:777:44: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
drm_verbose_log.debugf("flip commit %lu", (uint64_t)g_DRM.flipcount);
~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
%llu
2021-09-15 18:42:12 +02:00
Simon Ser
7d108448b1
Improve unknown option error message
...
The stdlib will already print an error message. Let's just mention
--help.
2021-09-15 13:40:59 +02:00
Simon Ser
5849b6c14e
Forbid duplicate short options
...
Just make sure we don't define two flags with the same letter.
2021-09-15 13:38:38 +02:00
Simon Ser
27cff4e41b
wlserver: drop headless backend
...
Saves us the GLES2 renderer init.
2021-09-15 13:35:42 +02:00
Simon Ser
a480fe81fe
Drop VulkanRenderer_t.parent
...
We don't need the wlroots parent GLES2 renderer anymore.
2021-09-15 13:35:42 +02:00
Simon Ser
2772a17f22
Implement wlr_renderer_impl.get_drm_fd
...
This depends on VK_EXT_physical_device_drm.
2021-09-15 13:35:42 +02:00
Simon Ser
92c6823897
wlserver: let wlr_renderer init the DMA-BUF Wayland protocols
...
wlr_renderer_init_wl_display will automatically init the suitable
Wayland protocols.
2021-09-15 13:35:42 +02:00
Simon Ser
ae7fcc5ba7
wlserver: get wlr_buffer from VulkanWlrTexture_t
...
This side-steps wlr_client_buffer and ensures we get access to the
underlying buffer. This allows us to call
wlr_buffer_begin_data_ptr_access to upload shm textures.
2021-09-15 13:35:42 +02:00
Simon Ser
0bbecd7e90
Extract fence from Vulkan texture if buffer is shm
2021-09-15 13:35:42 +02:00
Simon Ser
118d8213e4
rendervulkan: implement wlr_renderer_impl.texture_from_buffer
2021-09-15 13:35:42 +02:00
Simon Ser
db1ffbe2e4
rendervulkan: remove wlr_renderer_impl.init_wl_display
...
We don't need EGL_bind_wayland_display anymore.
2021-09-15 13:35:42 +02:00
Simon Ser
6fbabb94b3
rendervulkan: build list of supported wl_shm formats
2021-09-15 13:35:42 +02:00
Simon Ser
a325cf193b
Use wlroots' wl_drm implementation
...
wl_drm is not available on Vulkan.
References: https://github.com/swaywm/wlroots/pull/2708
2021-09-15 13:35:42 +02:00
Simon Ser
123df9006f
rendervulkan: implement wlr_renderer_impl.get_render_buffer_caps
2021-09-15 13:35:42 +02:00
Simon Ser
d13d19981b
rendervulkan: drop wlr_renderer_impl.render_ellipse_with_matrix stub
...
This has been removed from wlroots upstream.
2021-09-15 13:35:42 +02:00
Simon Ser
332f261c35
drm: generalize find_drm_node_by_devid for render nodes
...
We'll use this to open the DRM render node from a VkPhysicalDevice.
2021-09-15 12:12:06 +02:00
Bas Nieuwenhuizen
83eae082fa
Warning fix
2021-09-14 17:29:51 -07:00
Bas Nieuwenhuizen
e510af1b7e
Add a proper release barrier for modifier based images when not nested.
...
RADV does retiling in that barrier. Still hinky overall but this fixes
using compositing with DCC compressed images on RADV.
2021-09-14 17:22:07 -07:00
Joshua Ashton
143176acb1
Fix return value when SDL fails initialization
2021-09-14 17:01:42 -07:00
Joshua Ashton
ce87bf1b76
Init format info after initializing DRM
...
Otherwise all our modifiers/formats and stuff are garbage.
Fixes : #269
2021-09-14 17:01:42 -07:00
Pierre-Loup A. Griffais
8e75287454
steamcompmgr: more GAMESCOPECTRL work
2021-09-14 16:29:42 -07:00
Simon Ser
2eb520bc17
Fix BIsNested return type
2021-09-14 18:36:27 +02:00
Simon Ser
5a93c4ed13
Minor style fixup
2021-09-14 18:33:05 +02:00
Simon Ser
eed360ce09
sdlwindow: ignore key repeat events
...
Wayland clients (incl. Xwayland) handle this.
2021-09-14 18:25:56 +02:00
Simon Ser
0d43e3472a
sdlwindow: get mod from key event
...
No need to call SDL_GetModState, the event already carries this
information.
2021-09-14 18:23:30 +02:00
Simon Ser
e5faeaed68
Open DRM device from Vulkan physical device
...
Initialize Vulkan first to pick a physical device, then initialize
DRM or SDL. That way, DRM can open its own device depending on what
Vulkan is using. This avoids picking the wrong GPU on multi-GPU
setups.
This required rejiggering how initialization happens. In particular,
we need to get the SDL Vulkan instance extension list early. This is
supported since SDL 2.0.9 (by omitting the window in
SDL_Vulkan_GetInstanceExtensions).
2021-09-14 18:16:53 +02:00
Simon Ser
1fca3896b1
wlserver: remove wlserver_init args
...
argc and argv are unused, bIsNested can be fetched from globals.
2021-09-14 17:03:52 +02:00
Simon Ser
7198851e98
Unify init functions return types a bit
...
We had both int and bool, let's try to end up with only bools.
2021-09-14 16:59:46 +02:00
Simon Ser
1d528be605
Untangle preferred mode and current mode
...
g_nOutput* stored two different values: preferred values taken from
the CLI at init-time, then current values after init. This results
in some tricky logic because depending on when code is executed it'd
access one or the other.
Introduce two separate sets of variables instead. DRM reads from the
preferred values, decides which DRM mode to enable, then writes to
the current values. SDL reads from the preferred values and makes
them current immediately.
This changes gamescope's behaviour so that native DRM modes are
picked when -w/-h isn't specified on the command line. When -w/-h are
specified, the DRM logic will try to pick a mode which matches.
When nested, the default output size still defaults to 720p, but
changes when the user resizes the window.
Closes: https://github.com/Plagman/gamescope/issues/258
2021-09-14 16:45:23 +02:00
Simon Ser
54e6614e2c
wlserver: stop setting keyboard in wlserver_new_input
...
This avoids messing up with the current keyboard settings when a
new one is plugged in.
2021-09-14 13:56:33 +02:00
Simon Ser
f10e2248fd
wlserver: set keyboard in wlserver_key
...
This ensures clients see the right keymap/modifiers/etc when
handling a keyboard event.
2021-09-14 13:47:55 +02:00
Simon Ser
1694e0c4f7
wlserver: handle null keyboard in wlserver_keyboardfocus
2021-09-14 13:44:35 +02:00
Simon Ser
16211ba7ca
wlserver: expose nested refresh if set
...
Instead of faking an output with the KMS mode's refresh rate,
expose the nested refresh rate when -r is set.
2021-09-14 08:24:07 +02:00
Valentin David
5672737093
wlserver: Add support for mouse wheels
2021-09-13 23:17:34 +02:00
Simon Ser
90f3a13c13
Drop trailing spaces
2021-09-13 23:14:57 +02:00
Valentin David
a8ba73b8ae
wlserver: Force reading XKB_DEFAULT_* variables
...
When gamescope has cap_sys_nice capability, then `secure_getenv` used
by libxkbcommon does not load the keymap configuration from
environment. So the environment variables have to be manually read from
gamescope.
Without `XKB_DEFAULT_LAYOUT` it is not possible to load other keymaps
than US.
2021-09-13 23:06:37 +02:00
Simon Ser
5ac5a1ea29
drm: don't use globals as inputs for find_mode
...
These globals are overwritten by drm_set_mode. Save the globals at
init time to remember what the user preference is.
2021-09-13 18:34:27 +02:00
Simon Ser
3504fb2613
steamcompmgr: fix mouseMoved type
2021-09-13 10:01:28 +02:00
Simon Ser
af836736bf
steamcompmgr: unify function call code style a bit
2021-09-13 09:25:57 +02:00
Simon Ser
d237cf387f
steamcompmgr: switch to stdbool
2021-09-13 09:16:58 +02:00
Pierre-Loup A. Griffais
66064b23cf
steamcompmgr: don't always warp cursor on mouse input focus change
2021-09-12 23:39:34 -07:00
Pierre-Loup A. Griffais
3db90edd75
steamcompmgr: don't allow giving an overlay layer keyboard focus
...
The main plane app rarely lets it go without making visible trouble.
We can reinstate this feature when we have a way to lie about it.
2021-09-12 23:30:51 -07:00
Pierre-Loup A. Griffais
ab72155ce0
steamcompmgr: some cursor hiding improvements
...
Absorb 5 moves for auto-hide purposes instead of 3. Our nudge is 2 moves,
and we can warp on top of that, so we weren't counting everything.
Hide before changing mouse input focus and the warp that ensues.
Re-arm warp count when changing mouse input focus, so doing it repeatedly
with the same window doesn't eventually unhide despite no input.
2021-09-12 23:21:35 -07:00
Joshua Ashton
805e3c5801
rendervulkan: Set addressModeW for samplers
...
Technically, YCbCr has a hard requirement of everything being CLAMP_TO_EDGE here and validation moans about it. Better just to set it.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-12 18:21:44 -07:00
Joshua Ashton
249708fedd
rendervulkan: Enable VK_KHR_image_format_list if we use modifiers
...
This extension is required for whatever reason. Validation complains about it.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-12 18:21:44 -07:00
Joshua Ashton
5a1f28d8bc
rendervulkan: Use push constants for composite data
...
We can just bung this in here and avoid needing to deal with a buffer.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-12 18:21:44 -07:00
Joshua Ashton
3e1ebd7241
rendervulkan: Replace border color with CLAMP_TO_EDGE + bounds check
...
We can't use normal border colors if we are doing linear filtering as we will sample slightly outside on the edges and blend to the border color.
Replace this with a way to push an arbitrary layer alpha and return that in the OOB case, and when sampling, clamp to edge.
This also may be more efficient to avoid sampling OOB a lot of the time in some cases.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-12 18:21:44 -07:00
Simon Ser
1e707d7947
Fix typo in usage message
2021-09-11 20:51:51 +02:00
Simon Ser
b5001aa00c
Simplify build_optstring for long-only options
2021-09-11 02:59:48 +02:00
Joshua Ashton
2cea675db0
meta: Use wrap file for STB rather than submodule
...
Allows us to use this as a Meson subproject which means that recursive cloning doesn't matter (Meson resolves it for subprojects).
Given this subproject doesn't have a meson file, doing subproject() on it would fail, so:
Make a wrap file with an overlay that declares a proper dependency.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-11 02:55:21 +02:00
Pierre-Loup A. Griffais
21d631590a
Fix build_optstring bug with long-only options requiring argument.
2021-09-10 17:46:00 -07:00
Simon Ser
fb4ec7cb4e
Drop short option for --cursor
2021-09-10 14:25:19 +02:00
Simon Ser
f8e251962c
Add --help
2021-09-10 14:21:59 +02:00
Simon Ser
94f78d1b3c
steamcompmgr: use log scope
2021-09-10 12:04:20 +02:00
Simon Ser
d926ea0b33
steamcompmgr: init g_nudgePipe to invalid FDs
...
Make sure we don't wrongly read from stdin or something.
2021-09-10 11:49:14 +02:00
Simon Ser
97746c609f
steamcompmgr: remove unused environ
2021-09-10 11:48:10 +02:00
Simon Ser
ba9c46cea2
drm: disable all KMS resources at exit
2021-09-10 11:42:43 +02:00
Simon Ser
ff8c0b183b
Introduce finish_drm
...
For now it just closes the DRM FD, but will do more soon.
2021-09-10 11:05:09 +02:00
Simon Ser
fc748ebd78
wlserver: remove wlserver_run return value
...
It always returns 0.
2021-09-10 11:01:54 +02:00
Simon Ser
cd0e12d050
Wait for steamcompmgr when exiting
...
This allows steamcompmgr to perform cleanup actions without being
hard-terminated.
2021-09-10 11:00:18 +02:00
Simon Ser
1e163fa358
steamcompmgr: check for XNextEvent errors
2021-09-09 19:56:50 +02:00
Simon Ser
597fc8fa48
Move signal handler to main
2021-09-09 19:49:31 +02:00
Simon Ser
1989c291ee
Avoid double-closing GEM handles
2021-09-04 17:30:13 +02:00
Simon Ser
4330ec5433
drm: clean up buffer handles
...
Closes: https://github.com/Plagman/gamescope/issues/60
2021-09-04 16:43:22 +02:00
Pierre-Loup A. Griffais
5d3a0eb078
Repaint on possible connector hotplug
2021-09-02 17:18:13 -07:00
Pierre-Loup A. Griffais
8782dc2cd1
drm: Always explicitly set rotation property
...
This allows to transition in and out of rotation based on connector hotplug.
2021-09-02 14:43:16 -07:00
Simon Ser
5e66e9cee0
Option -O takes one arg
2021-09-02 23:29:01 +02:00
Simon Ser
268b625655
Remove short notation for some debug options
...
These should be only used during development, so don't deserve a
short option.
2021-09-02 22:10:55 +02:00
Simon Ser
ae785b25bf
Remove -s and -N options
...
These were unused.
2021-09-02 21:51:32 +02:00
Simon Ser
3df6fa58bd
Rename -S to --synchronous-x11
2021-09-02 21:48:43 +02:00
Joshua Ashton
ffa970ef7e
Add --cursor argument
2021-09-01 18:33:57 +02:00
Joshua Ashton
0b5764195e
Add setCursorImage to MouseCursor
2021-09-01 18:33:57 +02:00
Simon Ser
22323418ac
wlserver: set wlroots log handler
2021-09-01 18:31:45 +02:00
Simon Ser
c034ac1f99
wlserver: use log scope
2021-09-01 18:25:24 +02:00
Simon Ser
0536dc0bb0
Repaint when taking screenshot
...
Closes: https://github.com/Plagman/gamescope/issues/247
2021-09-01 17:26:38 +02:00
Joshua Ashton
7812e0a726
Check correct channel for no cursor check
...
This was checking if the cursor has no blue before, when it should be checking the alpha.
2021-09-01 17:09:09 +02:00
Joshua Ashton
76292f01cb
Fix RGB/BGR of the cursor's Vulkan image
...
This was ABGR before, when it should be ARGB.
2021-09-01 17:09:09 +02:00
Simon Ser
39c44a9e3c
Sort options by embedded/nested mode
2021-09-01 16:08:20 +02:00