Clément Guérin
1b3ad77181
handle SDL touch events
...
disable SDL mouse emulation to avoid getting mouse events.
2022-06-20 08:59:18 +02:00
Joshua Ashton
1b34a570a5
drm: Implement COLOR_ENCODING + COLOR_RANGE and hook up to env var for now
...
There is no way to tel a NV12 buffer in Wayland's color space. Why?
What a glaring omission.
Even then, the color management protocol that has supposedly been in
development for 2 years is missing basic features like setting the
color range. Great!
For now we are just setting an env var both us and Remote Play Together
are going to listen to and call it a day until the situation is
properly resolved.
2022-06-16 01:31:47 +00:00
Ben Jackson
27ab72ec72
ime: Avoid keymap reset on each injection.
2022-06-14 14:56:56 -07:00
trigg
541ea8fa53
Always use the newest external overlay window
...
Currently creating a new external overlay window will not show up until all others close or are killed.
With this change when the user starts a new external overlay it will take precedence until a newer one appears or it is closed or killed.
This will help alleviate a lot of bugs where overlays 'don't start' because another overlay is already in the slot and not drawing into it.
2022-06-09 13:36:22 +02:00
trigg
8ee041c5f4
Drop reference to last known overlay window
...
Once external overlay windows set their XAtom `GAMESCOPE_EXTERNAL_OVERLAY` to 0 they should be removed from the pool of known external overlays, but reference is kept until they are closed and is never replaced as all current overlays use maximum opacity.
This change is untested and written in a coffee break.
2022-06-09 13:34:47 +02:00
Pierre-Loup A. Griffais
ee043b2ca9
drm: add more EDID make/model combinations as Steam Deck displays
...
Needed for a future Deck EDID update.
2022-06-08 10:49:54 -07:00
Georg Lehmann
b1c38598ee
Remove useless extensions from shaders.
2022-05-26 23:11:25 +00:00
Georg Lehmann
009d4959d1
Use array for descriptor bindings.
2022-05-26 23:11:25 +00:00
Georg Lehmann
3a1f4fbacd
Move some code for a more logical order
2022-05-26 23:11:25 +00:00
Georg Lehmann
e2139bc0bb
Use more designated initalizers.
2022-05-26 23:11:25 +00:00
Georg Lehmann
166395a619
Use VK_NO_PROTOTYPES
2022-05-26 23:11:25 +00:00
Georg Lehmann
11760e8bd8
rewrite compositing with CVulkanCmdBuffer
2022-05-26 23:11:25 +00:00
Georg Lehmann
7f1e55dd96
Introduce CVulkanCmdBuffer
2022-05-26 23:11:25 +00:00
Georg Lehmann
0a0a000a89
Use vulkan_create_texture_from_bits for NIS images.
2022-05-26 23:11:25 +00:00
Georg Lehmann
b406bba47e
Only use two descriptors for samplers
2022-05-26 23:11:25 +00:00
Georg Lehmann
326d7e1f96
Use CVulkanTexture for swapchain images
2022-05-26 23:11:25 +00:00
Georg Lehmann
fa26f16fa9
Introduce CVulkanDevice.
2022-05-26 23:11:25 +00:00
Joshua Ashton
549d22094b
drm: Implement gamma and degamma exponent
2022-05-26 23:08:34 +00:00
sad-goldfish
e4892543a0
Add realtime flag for SCHED_RR
...
Use sched_get_priority_min for priority
Accommodates other unixes with odd minimum priorities.
Manually handle save/restore of scheduling.
Add space. (formatting)
Exit on failure to get scheduler parameters.
Add missing braces.
Copy and edit existing sched_parm rather than new.
May be relevant on some exotic unixes.
2022-05-25 19:01:18 +02:00
Eric
a515153a93
rendervulkan: Add support for NVIDIA image scaling
2022-05-18 01:41:01 +00:00
Eric
0dac3ceac4
nis: Import NIS SDK
...
The docs, and samples directories have been removed along with the
third_party_licenses.txt file.
Source downloaded from: https://github.com/NVIDIAGameWorks/NVIDIAImageScaling/archive/refs/tags/v1.0.2.tar.gz
2022-05-18 01:41:01 +00:00
Joshua Ashton
3c59167b67
steamcompmgr, drm: Add GAMESCOPE_COLOR_MATRIX to control CTM matrix
2022-05-18 01:20:49 +00:00
Georg Lehmann
97288b8b1a
remove unused wlr egl/gles includes
2022-05-12 11:32:05 +00:00
Georg Lehmann
867308b010
remove dead code
2022-05-12 11:32:05 +00:00
Georg Lehmann
9ba37d923c
Make actual cursor extent a CVulkanTexture property
2022-05-12 11:32:05 +00:00
Georg Lehmann
2c47fc57f0
Remove CVulkanTexture::m_bTransitioned
...
No real reason to overcompilicate things.
2022-05-12 11:32:05 +00:00
Georg Lehmann
2f111b0b98
Stop accessing CVulkanTexture members directly.
2022-05-12 11:32:05 +00:00
Georg Lehmann
d29d83f792
Remove those two terrible structs
2022-05-12 11:32:05 +00:00
Joshua Ashton
d760586543
main: Set XWAYLAND_FORCE_ENABLE_EXTRA_MODES
2022-05-12 09:44:57 +00:00
Joshua Ashton
1c731b61c8
steamcompmgr: When window_wants_no_focus_when_mouse_hidden, move to width -1, height -1 instead
2022-05-12 08:29:15 +00:00
Joshua Ashton
ff14b6a5dd
steamcompmgr: Add workaround for Warframe (230410) launcher's language dialog
2022-05-09 01:12:14 +00:00
Joshua Ashton
27eaf5f926
steamcompmgr: Add support for retrieving motif hints
2022-05-09 01:12:14 +00:00
Joshua Ashton
964a9b15cf
steamcompmgr: Initialize maybe_a_dropdown
2022-05-09 01:12:14 +00:00
James Jones
22660ce088
drm: Skip gamma LUT on CRTCs that don't support it
...
On hardware and drivers that don't support a gamma
LUT property, don't attempt to generate or set
one. Log the lack of gamma LUT support at the
informational level.
2022-05-06 22:45:44 +02:00
James Jones
e24348da39
main: Raise the file descriptor limit at launch
...
Gamescope currently uses 1024 VkFence objects to
synchronize CPU and GPU work. The NVIDIA Vulkan
driver currently creates a file descriptor for
each VKFence object created. To ensure there are
sufficient file descriptors, attempt to raise the
limit to 2048 file descriptors if it is currently
lower than that. Failure to raise the limit for
any reason is non-fatal, as the increased limit
is not required on some drivers.
2022-05-06 22:45:44 +02:00
Sam Lantinga
a32244de62
Switched the default YUV color conversion to full range BT.709
...
This matches the hardware color conversion on Steam Deck
2022-05-05 01:03:46 +00:00
Joshua Ashton
2855219311
wlserver: Add WLSERVER_TOUCH_CLICK_DISABLED
2022-05-03 23:55:08 +00:00
Joshua Ashton
4a153094b5
steamcompmgr: Fix setting dynamic refresh without FPS limit
2022-04-28 01:40:53 +00:00
Sam Lantinga
d4bdeb71e2
ime: fix typing the EURO symbol using the on-screen keyboard
2022-04-27 19:03:28 +02:00
Simon Ser
1b54be4aca
pipewire: add support for DMA-BUFs
2022-04-27 14:04:43 +02:00
Simon Ser
3c2235dadc
pipewire: acquire textures in stream_handle_add_buffer
2022-04-27 14:04:43 +02:00
Simon Ser
0c5dcc5ba3
rendervulkan: add exportable flag to vulkan_acquire_screenshot_texture
2022-04-27 14:04:43 +02:00
Simon Ser
b5c0a0f7fe
pipewire: group shm-specific fields
2022-04-27 14:04:43 +02:00
Simon Ser
6b59f377ce
rendervulkan: make caller responsible for providing screenshot texture
2022-04-27 14:04:43 +02:00
Joshua Ashton
4d631e240e
steamcompmgr: Fix a regression in FO4 with win_maybe_a_dropdown and document
2022-04-26 04:16:43 +00:00
Joshua Ashton
0865717165
steamcompmgr: Don't follow transients if we have a focusControlWindow
2022-04-26 04:06:56 +00:00
Joshua Ashton
3e81a24171
steamcompmgr: Only set GAMESCOPE_FOCUSED_APP in steam mode
...
Closes : #416
2022-04-26 00:51:06 +00:00
Simon Ser
f810a8563d
Add exportable flag to CVulkanTexture
2022-04-23 23:13:17 +00:00
Alistair Findlay
accadbb291
Fixed typo - "renegociating" changed to "renegotiating"
2022-04-23 10:01:25 +02:00
Alex Maras
b5aa05ae8f
sdlwindow: Handle SDL_WINDOWEVENT_CLOSE
2022-04-20 17:16:36 +02:00
Joshua Ashton
34957bc383
rendervulkan: Don't enable VK_KHR_image_format_list
...
This is in 1.2 now
2022-04-18 16:09:20 +01:00
Joshua Ashton
ce1c428788
rendervulkan: Use float16 in Vulkan 1.2 now
2022-04-18 16:09:20 +01:00
Joshua Ashton
76aad316ce
rendervulkan: Use timeline semaphores for scratch cmd buffers (used for imports, etc)
2022-04-18 16:09:20 +01:00
Joshua Ashton
e478a746a5
rendervulkan: Create Vulkan 1.2 device
...
For timeline semaphores. It's common enough for us to do that now.
2022-04-18 16:09:20 +01:00
Joshua Ashton
a85d71cc9e
steamcompmgr: Don't require a fps limit for dynamic refresh
2022-04-17 22:55:46 +01:00
Joshua Ashton
34c6904234
wlserver: Be more defensive in content_override_handle_surface_destroy
...
Better to be defensive here than crashing.
2022-03-25 23:13:05 +00:00
Joshua Ashton
45ba90bc40
steamcompmgr: Don't XSelectInput PointerMotionMask
...
Otherwise it can end up not propogating to windows properly, and they will never recieve the PointerMotion event.
All this seemed to be doing was trapping what was going to be sent to the game, and then using it, despite us already always knowing the cursor position.
2022-03-24 22:54:17 +00:00
Joshua Ashton
c7962c3e6b
steamcompmgr: Tie break by map sequence before damage sequence
2022-03-24 18:58:23 +00:00
Joshua Ashton
e4a517b4b8
steamcompmgr: Handle maybe dropdowns better + resolve override transients after finding a first transient
...
Fixes regressions in TES:IV Oblivion launcher + Zwei launchers
2022-03-24 18:53:47 +00:00
FlightlessMango
6d0c84d163
mangoapp: send focusWindow pid
2022-03-19 01:35:19 +00:00
Joshua Ashton
9eb7445a62
steamcompmgr: Move 1x1 windows down the priority queue below override redirects
...
Fixes Origin launcher being parented to a 1x1 centred window.
2022-03-18 17:36:35 +00:00
Joshua Ashton
49125a2d17
steamcompmgr: Ignore win_skip_taskbar_and_pager for maybe overrides
2022-03-18 17:29:19 +00:00
Joshua Ashton
499573c5fb
steamcompmgr: Ignore overrides that are 1x1
2022-03-18 16:34:21 +00:00
Joshua Ashton
edbf409d07
steamcompmgr: Fix transient following for maybe dropdowns
...
For Warframe language selection (but not specifically, this is just the right thing.)
2022-03-18 00:07:23 +00:00
Joshua Ashton
e30b5636b0
steamcompmgr: Fix dialog preference check
...
For Warframe language selection.
2022-03-18 00:07:20 +00:00
Joshua Ashton
8a3a0893cd
steamcompmgr: Tie-break dropdowns w/ transient-for presence
...
For Warframe language selection.
2022-03-18 00:07:16 +00:00
Joshua Ashton
ade9eca823
steamcompmgr: Fix gravity + position check for determining maybe a dropdown state
...
For Warframe language selection.
2022-03-18 00:07:12 +00:00
Joshua Ashton
be4b83cff2
steamcompmgr: Handle potential dropdowns better in focus order
...
For Warframe language selection.
2022-03-18 00:07:00 +00:00
Joshua Ashton
a913f8566f
steamcompmgr: Don't disable dynamic refresh when the QAM/Overlay comes up
2022-03-11 22:46:08 +00:00
Philip Nilsson
d3d0bc189e
sdlwindow: Fix extra mouse button mapping
...
This changes the mouse button mapping in gamescope to match the mapping in SDL2-2.0.20:src/core/linux/SDL_evdev.c.
Fixes issue #234 .
2022-03-02 20:41:33 +01:00
Simon Ser
66f603e6c4
ime: use default keymap if possible
2022-03-01 18:46:51 +00:00
Simon Ser
279321fa73
ime: fix utf8_size for the NUL character
2022-03-01 18:46:51 +00:00
Joshua Ashton
82948d87e0
steamcompmgr: Make maybe_an_override path respect focus window's appids and good candidate state
2022-02-27 09:41:10 +00:00
Joshua Ashton
bfefe62933
steamcompmgr: Fix on-screen check for override candidates
...
Fixes Apex Legends Origin signup via. Steam Overlay browser
2022-02-27 09:36:34 +00:00
Joshua Ashton
5b8f9e6a64
steamcompmgr: Handle some non-explicit dropdowns
...
Fixes Rockstar Launcher dropdowns
2022-02-25 08:40:31 +00:00
Joshua Ashton
8597753b75
steamcompmgr: Fix integer scaling when supersampling
2022-02-25 08:02:18 +00:00
Joshua Ashton
e190d55f65
steamcompmgr: Exclude skip taskbar + page & 1x1 windows & override redirects from reported focusable windows
2022-02-25 06:59:07 +00:00
Joshua Ashton
58a9aa6543
steamcompmgr: Bring back inputFocusMode 2
...
Now we have input split properly, we can have this again.
2022-02-23 23:33:30 +00:00
Simon Ser
7004d98223
drm: add support for DP-MST connectors
...
These are created/destroyed dynamically by the kernel.
2022-02-23 23:07:21 +00:00
Simon Ser
483e2729ec
drm: store connectors in map
...
We'll need to create/destroy connectors for DP-MST. A vector
invalidates pointers/references when new elements are inserted.
2022-02-23 23:07:21 +00:00
Joshua Ashton
d6b6428143
rendervulkan: Support blur for override redirect layer too
...
Essentially just shoves that into the horizontal pass and cleans it out of the normal composite when we go to do vertical and also makes the blur image the same size as the output, which should have been done anwyay to avoid harsh borders.
2022-02-23 23:00:48 +00:00
Joshua Ashton
b7dd42e0b8
steamcompmgr: Remove useless zpos hack
...
Not needed anymore, this got fixed in liftoff
2022-02-23 23:00:48 +00:00
Bas Nieuwenhuizen
46beac1556
Add support for communicating a swapchain override to apps.
...
With matching stuff in mesa to dynamically change the swapchain
to FIFO (or the approximate GL equivalent).
2022-02-23 03:02:55 +00:00
Georg Lehmann
a56b56d401
rendervulkan: Fix half pixel offset (again)
...
Some quick debugging code that I forgot to change properly.
Derp.
2022-02-18 19:53:29 +00:00
Joshua Ashton
ff5d585785
steamcompmgr: Make GAMESCOPE_DYNAMIC_REFRESH control the refresh rate directly
2022-02-18 03:20:37 +00:00
Joshua Ashton
75f3506a1a
steamcompmgr: Add FPS limiting through frame callback timing
2022-02-18 03:20:37 +00:00
Joshua Ashton
aa94b6dec1
steamcompmgr: Add GAMESCOPE_FOCUSED_APP_GFX atom
2022-02-18 02:56:58 +00:00
Georg Lehmann
4153272274
rendervulkan: Reduce blur pipeline count.
2022-02-18 02:44:11 +00:00
Georg Lehmann
7708d62801
rendervulkan: Layer 0 blur support.
2022-02-18 02:44:08 +00:00
Joshua Ashton
4ed0c26364
vblankmanager: Nuke FPS limiter code for now
...
Not baked enough right now, needs a rework for several reasons.
Keeps dynamic refresh.
2022-02-17 21:58:14 +00:00
Simon Ser
c82cefbdee
mangoapp: fix msgsnd size arg
...
The size argument must not include the `long msg_type` field.
Fixes the following ASan error:
=================================================================
==25745==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55cb6beea08a at pc 0x7f118e89525d bp
0x7f117620a8a0 sp 0x7f117620a048
READ of size 50 at 0x55cb6beea08a thread T10
#0 0x7f118e89525c in __interceptor_msgsnd /usr/src/debug/gcc/libsanitizer/sanitizer_common/sanitizer_c
ommon_interceptors.inc:3138
#1 0x55cb6b6518ed in mangoapp_update(unsigned long, unsigned long, unsigned long) ../src/mangoapp.cpp:
48
#2 0x55cb6b484dde in imageWaitThreadMain() ../src/steamcompmgr.cpp:521
#3 0x55cb6b538298 in void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr
/include/c++/11.2.0/bits/invoke.h:61
#4 0x55cb6b5381b3 in std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /u
sr/include/c++/11.2.0/bits/invoke.h:96
#5 0x55cb6b538063 in void std:🧵 :_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_t
uple<0ul>) /usr/include/c++/11.2.0/bits/std_thread.h:253
#6 0x55cb6b537f23 in std:🧵 :_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/11.
2.0/bits/std_thread.h:260
#7 0x55cb6b537ae9 in std:🧵 :_State_impl<std:🧵 :_Invoker<std::tuple<void (*)()> > >::_M_run
() /usr/include/c++/11.2.0/bits/std_thread.h:211
#8 0x7f118e0a34d3 in execute_native_thread_routine /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc
:82
#9 0x7f118d3d75c1 in start_thread (/usr/lib/libc.so.6+0x8d5c1)
#10 0x7f118d45c583 in __clone (/usr/lib/libc.so.6+0x112583)
0x55cb6beea08a is located 0 bytes to the right of global variable 'mangoapp_msg_v1' defined in '../src/mangoapp.cpp:27:27' (0x55cb6beea060) of size 42
2022-02-16 12:54:49 +00:00
Simon Ser
5f8fa27029
steamcompmgr: cleanup on X11 error
...
The cleanup sequence run on X11 I/O error was incomplete. Let's
extract it to a function to make sure it doesn't go out-of-sync
again.
2022-02-15 17:55:51 -08:00
Joshua Ashton
fd3e8182fd
vblankmanager: Rework fps limiter a bunch
...
Tracks consecutive missed frames much better, handles latent buffers much better.
Disable mangoapp hack for now -- it's obscuring useful data, need a better solution.
Disable low latency by default, still controlable by atom.
2022-02-16 00:55:21 +00:00
Joshua Ashton
b471a05d8a
steamcompmgr: Don't yank input focus from subwindows when dirtying focus for no reason
2022-02-15 02:46:35 +00:00
Joshua Ashton
367a92833d
steamcompmgr: Only reset to corner if we change real input focus focus
2022-02-15 02:15:40 +00:00
Joshua Ashton
a44c0dbc43
steamcompmgr: Handle dropdown positioning if the main window is the current output width & height
2022-02-15 02:02:09 +00:00
Joshua Ashton
82c098f117
pipewire, steamcompmgr: Fix odr violations for event_type
2022-02-14 23:50:31 +00:00
Joshua Ashton
ddf468a8e6
modegen: Add tuned clocks for Steam Deck's display
2022-02-14 22:50:15 +00:00
Georg Lehmann
ada1c7f89d
rendervulkan: Do rcas opacity in the correct colorspace if we calculate it anyway.
2022-02-14 21:48:40 +00:00
Georg Lehmann
2d537df252
rendervulkan: Don't calculate a garbage alpha value.
2022-02-14 21:48:40 +00:00
Georg Lehmann
35b381ce51
rendervulkan: Don't use clock for random debug output.
...
Not supported on turnip.
2022-02-14 21:48:40 +00:00
Joshua Ashton
ecdf214130
vblankmanager: Fix offsetting by vblank time -- use 0 for min sleepy time
2022-02-14 20:08:19 +00:00
Joshua Ashton
a8d59607b3
vblankmanager: Don't resize latency graph when misaligned from vblank + latent frames
2022-02-14 19:54:21 +00:00
Joshua Ashton
f65339de0f
vblankmanager: Don't disable latency graph when latent
...
Causes a bunch of mangoapp resizing which affects frametime, just make it 0 if we don't know.
2022-02-14 19:51:29 +00:00
Joshua Ashton
6c541f184c
steamcompmgr: Fix compile on clang
2022-02-14 19:48:19 +00:00
Joshua Ashton
a59c89d2ec
steamcompmgr: Handle X11 errors for other displays
...
Closes : #382
2022-02-14 19:33:28 +00:00
Joshua Ashton
7ec498af0a
vblankmanager: Track latent frames
2022-02-14 19:15:52 +00:00
Joshua Ashton
765ddd74b1
Revert "vblankmanager: Make min sleepy time 0"
...
This reverts commit 0c3eb8f83d
.
2022-02-14 15:01:07 +00:00
Joshua Ashton
0c3eb8f83d
vblankmanager: Make min sleepy time 0
2022-02-14 14:56:54 +00:00
Joshua Ashton
82d372e95d
vblankmanager: Change sleepyTime min values
...
Allows us to be more consistent at high GPU loads
2022-02-14 14:45:48 +00:00
Joshua Ashton
392a63d62b
steamcompmgr: Add GAMESCOPE_LOW_LATENCY atom
2022-02-14 14:13:47 +00:00
Joshua Ashton
7f2696f51a
vblankmanager: Be more aggressive about ramping back up
2022-02-14 14:11:18 +00:00
Joshua Ashton
561d7c4552
vblankmanager: Tune vblank redzone values
...
Couldn't do the other thing, causes some wackiness when compositing.
2022-02-14 13:48:12 +00:00
Joshua Ashton
fde42a4323
vblankmanager: Fix mangoapp latency value when late frame
2022-02-14 12:52:48 +00:00
Joshua Ashton
a2e01b5701
mangoapp: Handle frametimes from fps limiting better
...
Also logs latency and app's real frametime
2022-02-14 10:19:10 +00:00
Joshua Ashton
d3b5a758d1
vblankmanager: Put some of the vblank redzone into a min value
...
Just matters that we call drmAtomicCommit before 1.6ms, we can keep this value more stable for 99% of cases this way.
2022-02-13 18:35:59 +00:00
Joshua Ashton
12ee4304ec
vblankmanager: Use vblank offset for alignment in FPS limiter
2022-02-13 10:38:41 +00:00
Joshua Ashton
555bf125c6
vblankmanager: Fix leftover FPS_LIMIT_DEBUG
2022-02-13 09:40:17 +00:00
Joshua Ashton
40fba97cea
vblankmanager: Fix targeting framerates less than current with FPS limiter
2022-02-13 09:36:28 +00:00
Joshua Ashton
1594e02c84
vblankmanager: Discard first non-missed frames after a missed frame
...
Additionally fix some vblank limiting stuff for FSR at 4K.
This is our late frame.
2022-02-13 09:16:10 +00:00
Joshua Ashton
8fe9322578
vblankmanager: Explain divergence situation in a comment
2022-02-12 18:24:12 +00:00
Joshua Ashton
e690b00f7b
vblankmanager: Allow going back in time by fixed redzones
...
Going back a little bit okay, it's when we use varying values to go back, we become divergent from target over time with varying clocks
2022-02-12 18:13:45 +00:00
Joshua Ashton
f156763458
vblankmanager: Don't sleep back in time
...
Fixes getting stuck in a feedback loop with high variance
2022-02-12 17:59:20 +00:00
Joshua Ashton
2cac416000
vblankmanager: When calculating fps limiter sleep time, take the min of the rolling max frame time against target interval - redzone
...
We account for redzone later, and don't want to go over vblank time and preceed into previous vblank or whatever here.
2022-02-12 13:46:36 +00:00
Joshua Ashton
0862a2b896
steamcompmgr: Only free all buffers on setting target fps if disabling
2022-02-12 13:25:38 +00:00
Joshua Ashton
29060cc87c
steamcompmgr: Detect stalls in fps limiter latent buffer heuristic
2022-02-12 12:11:00 +00:00
Joshua Ashton
a5c660e54f
vblankmanager: More value tuning
...
Based on some rough data across a variety of games that are both GPU bound and also ones that are very not and cause GPU clocks to vary wildly
2022-02-12 11:54:51 +00:00
Joshua Ashton
70442294c0
steamcompmgr: Only allow one latent buffer when falling behind
2022-02-12 09:10:55 +00:00
Joshua Ashton
a1fa55c3a3
steamcompmgr: Add FSR active feedback
...
Also use this for mangoapp
2022-02-12 08:50:52 +00:00
Joshua Ashton
1df5c3a147
modegen: Always ceil clocks for fixed modes
...
Some modes like 55Hz end up off by one at 54 like we had with 30 before.
2022-02-11 09:35:48 +00:00
Joshua Ashton
e53f986048
vblankmanager: Tune FPS limiter and dynamic vblank heuristics
2022-02-11 05:28:03 +00:00
Joshua Ashton
8a94186522
steamcompmgr: Release all on IO error
2022-02-10 02:34:38 +00:00
Joshua Ashton
d759bd5efd
vblankmanager: Fix shutting down fps limiter thread
...
Closes : #406
2022-02-10 02:34:03 +00:00
Joshua Ashton
30e91fc24f
steamcompmgr: Don't hide cursor when going from dropdown->focus window and vice versa
2022-02-10 02:25:42 +00:00
Joshua Ashton
291d788b4f
steamcompmgr: Show cursor on tap always
2022-02-10 02:19:08 +00:00
Joshua Ashton
15c254fd7f
steamcompmgr: Hide new cursor when transitioning our global input focus
...
Fixes going from QAM -> game and keeping the cursor from the game.
2022-02-10 02:04:36 +00:00
Joshua Ashton
bf427b8156
steamcompmgr: Fix dynamic refresh crash if no focus window
2022-02-09 02:45:31 +00:00
Joshua Ashton
e5c3a1e1da
steamcompmgr: Prefer non-dialog override redirects
...
Prefers dropdowns over popups.
Fixes dropdowns in Zwei: The Ilvard Insurrection (427700) where when you
tap on a dropdown, it'd immediately start preferring to show a popup with a hint
that you get from hovering.
2022-02-09 01:30:56 +00:00
Joshua Ashton
6d2cb3073c
steamcompmgr: Implement dynamic refresh rate based on FPS limit
...
Adds a mode to dynamically change the refresh rate based on the existing FPS limit.
2022-02-09 00:34:58 +00:00
Joshua Ashton
c5ab6f388b
vblankmanager: Implement FPS limiter by strategic buffer withholding
2022-02-09 00:34:58 +00:00
Joshua Ashton
9fa6fcd9ac
modegen: Round display clocks up instead of down
...
Fixes oboe getting 29fps for vrefresh or whatever
Stops using floats here too, floats bad.
2022-02-09 00:34:58 +00:00
Joshua Ashton
02e0086856
steamcompmgr: New night mode color toys
2022-02-09 00:20:35 +00:00
FlightlessMango
c61d936cd9
mangoapp: FSR
2022-02-09 00:19:15 +00:00
Joshua Ashton
f65d54e61d
steamcompmgr: Add atom to control exposed modes per-xwayland server
2022-02-09 00:17:15 +00:00
Joshua Ashton
4a308c97f7
steamcompmgr: Handle being initially connected to external display
2022-02-09 00:17:15 +00:00
Joshua Ashton
bf119ee44b
steamcompmgr: Mark focus dirty on root window resize
2022-02-09 00:17:15 +00:00
Joshua Ashton
4f25eefbad
steamcompmgr: Resize Steam's xwayland mode to output mode
2022-02-09 00:17:15 +00:00
Joshua Ashton
d272cebb38
steamcompmgr: Resize nested height to match output aspect ratio in Steam mode
2022-02-09 00:17:15 +00:00
Joshua Ashton
5ed0753165
wlserver: Add wlserver_set_xwayland_server_mode
...
Sets the current mode and stuff for a specific xwayland server.
2022-02-09 00:17:15 +00:00
Joshua Ashton
aca867e60f
rendervulkan: Fix half-texel offset
...
Previously this was doing scale / 2 but it gets multiplied by scale, so this didn't work when it wasn't 1.0
Found when testing higher reses
2022-02-05 02:07:52 +00:00
Joshua Ashton
f1646c8f03
steamcompmgr: Fix nested max scale factor
2022-02-05 02:02:24 +00:00
Joshua Ashton
04e9eaebe3
drm: Be safe against blob destruction
2022-02-04 03:31:13 +00:00
Sam Lantinga
ab4684078c
Fixed pipewire stream stopping after a few seconds
...
With the latest version of pipewire, the process callback is no longer automatically called. Instead, you should call pw_stream_trigger_process() when frames are ready, to have the processing callback happen.
Since the only processing we're doing is requesting a buffer, I'm calling that directly from the callback, since that is thread-safe for a single reader.
2022-02-04 00:49:48 +00:00
Joshua Ashton
b4cf9d3203
wlserver: Use root server for content overrides
2022-02-04 00:49:26 +00:00
Joshua Ashton
7b75629040
steamcompmgr: Hide our cursor when forcing position for Steam touch stuff
2022-02-03 23:10:05 +00:00
Joshua Ashton
c1f9ec7ecf
steamcompmgr: Fix default gain when disabled
...
This was yellow for testing, somehow slipped in.
2022-02-03 18:52:46 +00:00
Florian
2079de25e5
fixed missing newline after -U in help message
2022-02-03 10:37:44 +01:00
Joshua Ashton
c5ccd71ff6
drm: Implement linear color gain control via atoms
...
Adds GAMESCOPE_COLOR_LINEARGAIN to control the linear color gain.
2022-02-03 05:29:33 +00:00
Joshua Ashton
55cb27fd15
steamcompmgr: Fix X's idea of interactive focus
...
Always update X's idea of focus, but still dirty
the it being outdated so we can resolve that globally later.
Only affecting X and not the WL idea of focus here,
we always want to think the window is focused.
but our real presenting focus and input focus can be elsewhere.
2022-02-02 23:00:44 +00:00
Joshua Ashton
a953bd276e
drm: Fix leaking mode properties
2022-02-02 23:00:38 +00:00
Joshua Ashton
88852d187c
steamcompmgr: HACK! Always composite with a cursor
...
Cursor plane on AMDGPU is very broken with both rotation and overlay planes that are not screen sized. Workaround for now.
2022-02-02 23:00:30 +00:00
Joshua Ashton
a1d560e836
steamcompmgr: Handle cursor image width being different to surface width for rotation offset
...
The surface width for the cursor is 256, but the image width is 64 which means we have a bunch of blank space, so we need to account for this in DRM code for the CRTC offsets.
2022-02-02 22:58:11 +00:00
Joshua Ashton
8313853802
steamcompmgr: Fix clang build
2022-02-01 00:34:10 +00:00
Joshua Ashton
f4c3425a85
steamcompmgr: Add GAMESCOPE_FSR_SHARPNESS property
...
0 to 20, controls FSR sharpness
2022-02-01 00:30:59 +00:00
Joshua Ashton
d01363e35e
steamcompmgr: Implement GAMESCOPE_SCALING_MODE atom
...
0 = linear
1 = nearest
2 = integer
3 = fsr
2022-02-01 00:26:45 +00:00
Joshua Ashton
7755bb635d
steamcompmgr: Clean up code to determine if we need composite
2022-02-01 00:06:08 +00:00
Joshua Ashton
0b5368efe7
steamcompmgr: Force composite when we must force nearest filtering
...
SCALING_FILTER is not hooked up in AMDGPU.
2022-02-01 00:04:25 +00:00
Joshua Ashton
0bc3a2493d
steamcompmgr: Add tuneables for vblank red zone + decay rate
2022-01-31 23:49:39 +00:00
Joshua Ashton
797ee59cbb
vblankmanager: Estimate draw buffer time based on max rolling average draw time
...
Handles spikes much better and allows us to have a lower buffer when not needed.
2022-01-31 23:49:39 +00:00
Joshua Ashton
a659fef806
drm: Use vblank time from page flip handler
2022-01-31 23:49:39 +00:00
Joshua Ashton
779d8f1bee
wlserver: Handle tapping overrides off screen
...
This clamp was stopping us from clicking off the current surface, which we want now.
2022-01-31 23:45:45 +00:00
Joshua Ashton
15dc09adfb
steamcompmgr: Extend cursor barriers tto override
...
It's only fair we can click what we can now see!
2022-01-31 23:45:45 +00:00
Joshua Ashton
289a739358
steamcompmgr: Resize to fit dropdowns
2022-01-31 23:45:45 +00:00
Joshua Ashton
3416cde9f4
steamcompmgr: Raise override redirects
...
Don't give them explicit focus. Allows us to have the cursor off them and have taps and stuff work.
2022-01-31 23:45:45 +00:00
Georg Lehmann
b70ec1b1ad
rendervulkan: Restore force nearest optimization.
2022-01-31 23:41:04 +00:00
Georg Lehmann
3fbcb4d3cd
steamcompmgr: Force compositing for FSR.
2022-01-31 23:41:04 +00:00
Georg Lehmann
a9dac11f15
main: FSR sharpness setting.
2022-01-31 23:41:04 +00:00
Georg Lehmann
96acb9de7e
rendervulkan: Fp16 easu.
2022-01-31 23:41:04 +00:00
Georg Lehmann
3aec05925c
rendervulkan: Enable fp16 extension and feature.
2022-01-31 23:41:04 +00:00
Georg Lehmann
ead46a2db0
main: Add FSR command line option and shortcut.
2022-01-31 23:41:04 +00:00
Georg Lehmann
6cfe2fe09c
rendervulkan: Inital FSR support.
2022-01-31 23:41:04 +00:00
Georg Lehmann
3d3b9ad503
rendervulkan: Create FSR pipelines.
2022-01-31 23:41:04 +00:00
Georg Lehmann
d0605bef22
rendervulkan: Add fsr shaders.
2022-01-31 23:41:04 +00:00
Georg Lehmann
463dabe199
rendervulkan: Move descriptor set definition to separate header.
2022-01-31 23:41:04 +00:00
Georg Lehmann
9a8b3bd22c
rendervulkan: Import fsr headers.
2022-01-31 23:41:04 +00:00
Georg Lehmann
7f3aebbcc0
rendervulkan: Prepare for multiple descriptor sets.
2022-01-31 23:41:04 +00:00
Georg Lehmann
56fb91ea72
rendervulkan: Use drmformats everywhere, create srgb and linear image views
2022-01-31 23:41:04 +00:00
Georg Lehmann
861435aeba
rendervulkan: Allow readwrite images.
2022-01-31 23:41:04 +00:00
Georg Lehmann
5d20c56f2e
rendervulkan: Compile Pipelines on a separate thread.
2022-01-31 23:41:04 +00:00
Georg Lehmann
ebc159869e
rendervulkan: Move VkPipeline creation to its own function.
2022-01-31 23:41:04 +00:00
Joshua Ashton
3dc36c8799
wlserver: Redirect volume events to root xwayland
...
Avoids games being the ones to recieve our lower volume/raise volume keys -- Steam should handle these.
2022-01-31 20:39:35 +00:00
Joshua Ashton
3f4aa2a75f
sdlwindow: Do nothing for title or PushUpdate when nested
...
Waste of cycles.
2022-01-31 18:45:58 +00:00
Joshua Ashton
a5ec3728d9
steamcompmgr: Fix focusDirty tracking being lost when switching to windows without commits
2022-01-31 18:45:58 +00:00
Joshua Ashton
899f1c802e
steamcompmgr: Bring back stats to un-break CI
...
Don't know if we want to bring this back or not... We have better things for this now. But it's breaking CI.
2022-01-31 17:16:18 +00:00
Georg Lehmann
a9654d6cfb
rendervulkan: Only create useful pipelines.
2022-01-31 17:09:10 +00:00
Georg Lehmann
bf55e08712
rendervulkan: Remove swap channels pipeline variant.
2022-01-26 13:06:30 +00:00
Georg Lehmann
4f0f0065ad
rendervulkan: Remove swap channels.
...
Unused since 76292f01cb
, partially broken and
unnecessary because we should be able to always use the correct VkFormat.
2022-01-26 13:06:30 +00:00
Joshua Ashton
698d14b7e9
steamcompmgr: Use SRGB for cursor image
...
This is it's correct color space after all!
Thanks to Georg Lehmann for pointing this out.
2022-01-25 05:13:20 +00:00
Joshua Ashton
10943045ff
rendervulkan: Support modifiers on SRGB images
2022-01-25 05:13:20 +00:00
Joshua Ashton
79f66f9729
steamcompmgr: Warp cursor off of Steam when cursor is hidden
...
Stops misleading hover events from happening while also not intefering with touch.
2022-01-24 11:38:41 -08:00
Georg Lehmann
5bfc27576d
build: preparations for more shaders
2022-01-23 05:10:41 +00:00
Joshua Ashton
3ae7c0c0f5
steamcompmgr: Keep being interactive when switching between focus windows and waiting for commits
...
Avoids bubbles of no focus window
2022-01-23 05:09:18 +00:00
Joshua Ashton
60f20b9fe5
steamcompmgr: Don't care if game is focused to paint
...
We could just want to render the overlay and our held base commit.
2022-01-23 05:09:18 +00:00
Joshua Ashton
98dc1a5a7e
steamcompmgr: Track X dirtying outside of dispatch
...
If we dirty the X server outside of the dispatch, xlib can flush its events, leading us to a state where XPending(dpy), would be true but the poll returns false.
Check if we have locally queued events before polling and flush those to mitigate this. This does not involve a system call.
2022-01-20 10:39:30 +01:00
Joshua Ashton
57eee35f29
wlserver: Wait for steamcompmgr to shutdown before cleaning up xwayland
...
Makes shutdown cleaner
2022-01-20 08:55:26 +00:00
Georg Lehmann
edb77e2490
rendervulkan: Add missing barriers in vulkan_create_texture_from_bits.
2022-01-20 07:37:20 +00:00
Georg Lehmann
eff99fdf81
rendervulkan: Add acquire and release barriers for imported images.
2022-01-20 07:37:20 +00:00
Georg Lehmann
10ba9f3908
rendervulkan: Fix WAW hazard for screenshot image.
2022-01-20 07:37:20 +00:00
Georg Lehmann
ca09577632
rendervulkan: Stop using unnormalized ycbcr samplers.
...
This is not allowed for ycbcr samplers.
2022-01-20 07:37:20 +00:00
Georg Lehmann
73025b24e2
rendervulkan: Avoid writing rgb descriptors for ycbcr images.
2022-01-20 07:37:20 +00:00
Georg Lehmann
1bb24ded57
rendervulkan: Remove empty texture.
2022-01-20 07:37:20 +00:00
Georg Lehmann
dcc290725a
rendervulkan: Enable NULL descriptor feature.
2022-01-20 07:37:20 +00:00
Georg Lehmann
7d6ad29757
rendervulkan: Enable samplerYcbcrConversion.
2022-01-20 07:37:20 +00:00
Georg Lehmann
ca2c770d64
rendervulkan: Always account for push frameid even if it's unused.
2022-01-20 07:37:20 +00:00
Georg Lehmann
95d25290d3
rendervulkan: Switch to GL_ARB_shader_clock and enable shaderSubgroupClock.
...
shaderSubgroupClock is better supported than shaderDeviceClock (e.g. anv
and before radv < gfx8).
2022-01-20 07:37:20 +00:00
Georg Lehmann
e1397a26e3
rendervulkan: Transition present image to general before compositing.
2022-01-20 07:37:20 +00:00
Georg Lehmann
96fb7aeed0
rendervulkan: Transition present image to PRESENT_SRC in nested mode.
2022-01-20 07:37:20 +00:00
Georg Lehmann
2c5dae8439
rendervulkan: Wait for fence after acquire next image.
2022-01-20 07:37:20 +00:00
Joshua Ashton
497c07387d
steamcompmgr: Always composite our first frame
...
AMDGPU gets very very upset if the first commit that also does display bringup+modeset has multiple planes. :(
2022-01-20 07:29:48 +00:00
Joshua Ashton
9c8948cec4
steamcompmgr: Disable DrawBorders for video UI
...
Fixes cursor having a black border here.
2022-01-20 07:29:48 +00:00
Joshua Ashton
ad2bf6663e
steamcompmgr: Don't let overlays account for valid contents
...
Stops mangoapp breaking seamless boot.
2022-01-20 07:29:48 +00:00
Joshua Ashton
d84f7068b4
steamcompmgr: Move to empty instead of size != 0
2022-01-20 08:26:13 +01:00
Joshua Ashton
4237d3d2bb
steamcompmgr: Fallback to whatever is best for local focus if focus control appid is not present inside of xwayland context
...
Allows us to run with multiple xwayland contexts and still have proper focus if the game launches into the first xwayland context
2022-01-20 07:11:40 +00:00
Joshua Ashton
a3cbe5d079
steamcompmgr: Move mangoapp_update to the imageWaitThread
...
More correct, stops reported frametimes being all over the place if steamcompmgr is waiting for stuff to happen.
2022-01-20 07:11:40 +00:00
Joshua Ashton
ae268ec9c9
steamcompmgr: Remove 1 appid per ctx assumption, factor out primary focus + override determination
2022-01-20 07:11:40 +00:00
Joshua Ashton
80101e1932
steamcompmgr: Use overlay's ctx rather than root ctx
...
Makes more sense when reading
2022-01-20 07:11:40 +00:00
Joshua Ashton
4eda19aa69
steamcompmgr: Resolve transient overrides in new multi xwayland focus logic
2022-01-20 07:11:40 +00:00
Joshua Ashton
d781082888
wlserver: Make content overrides per xwayland server
2022-01-20 07:11:40 +00:00
Joshua Ashton
ac09776607
steamcompmgr: Restore per-ctx appid logic if running in single xwayland mode
2022-01-20 07:11:40 +00:00
Joshua Ashton
3556ee4174
steamcompmgr: Add some comments to what we are doing in the global focus code
2022-01-20 07:11:40 +00:00
Joshua Ashton
e7cd2dbb25
steamcompmgr: Add win_surface helper
...
Makes this easier to read
2022-01-20 07:11:40 +00:00
Joshua Ashton
062a2bf496
steamcompmgr: Simplify global_focus member names
...
Now we have an entire struct of previous_focus to go off of, we can remove the word current from them.
2022-01-20 07:11:40 +00:00
Joshua Ashton
205cfbdf87
wlserver: Add a mode for multiple xwaylands
...
Adds --xwayland-count to control the number of xwaylands.
2022-01-20 07:11:40 +00:00
Joshua Ashton
74236fd13f
steamcompmgr: Localize gameFocused to context
2022-01-20 07:11:40 +00:00
Joshua Ashton
e29d76ef44
steamcompmgr: Fix stale keybaord focus bug
...
When the focus changes but the input focus does not (ie. overlay -> steam) the keyboard focus can be left behind on the game, which is not what we want.
Track this more ganularly.
2022-01-20 07:11:40 +00:00
Joshua Ashton
e8faa8647e
steamcompmgr: Respect global focus when updating wayland window surface focus
2022-01-20 07:11:40 +00:00
Joshua Ashton
0040709c30
steamcompmgr: Provide feedback about focused display, mouse focus and keyboard focus
2022-01-20 07:11:40 +00:00
Joshua Ashton
a8a1084331
steamcompmgr: Track ctx in win structure
2022-01-20 07:11:40 +00:00
Joshua Ashton
97056e7a3f
steamcompmgr: Make commit wait lists per-xwayland server
2022-01-20 07:11:40 +00:00
Joshua Ashton
ca8fd6552a
wlserver: Move commit queues to per-xwayland server, rather than global
2022-01-20 07:11:40 +00:00
Joshua Ashton
1536604533
wlserver: Handle mousemotion only for focused server
2022-01-20 07:11:40 +00:00
Joshua Ashton
9946d2380d
steamcompmgr: Focus and paint support for multiple xwaylands
2022-01-20 07:11:40 +00:00
Joshua Ashton
ef109369f1
steamcompmgr: Use win* instead of Window for focus tracking
2022-01-20 07:11:40 +00:00
Joshua Ashton
43d9cf4e6a
steamcompmgr: Initial support for multiple xwaylands
...
Doesn't handle focus or painting anything other than the root context yet.
2022-01-20 07:11:40 +00:00
Joshua Ashton
deb0364c05
wlserver: Move xdisplay init and ownership to xwayland_server
...
Allows us to bring back the sdlwindow mouse behaviour
2022-01-20 07:11:40 +00:00
Joshua Ashton
75c5617f58
steamcompmgr: Split out xwayland_ctx initialization to own function
2022-01-20 07:11:40 +00:00
Joshua Ashton
26f9942e6c
wlserver: Split out xwayland_server from global wlserver state
2022-01-20 07:11:40 +00:00
Joshua Ashton
582da1d967
steamcompmgr: Split globals into xwayland_ctx_t
...
Doesn't fully support multiple xwaylands or have all the infrastructure for that yet. This just splits the globals out for now and passes the ctx around.
2022-01-20 07:11:40 +00:00
Joshua Ashton
7357f46ac7
steamcompmgr: Update last done commit on focus change
...
Fixes Origin windows being in funny places when fading.
2022-01-14 21:19:18 +00:00
Georg Lehmann
78482d3f08
rendervulkan: Remove dead fence code.
...
This was already commented out when it was added 2 years ago, and it doesn't
seem useful.
2022-01-11 15:35:20 +01:00