Commit graph

1741 commits

Author SHA1 Message Date
Pierre-Loup A. Griffais
5e3a9c9408 Vulkan: have a whole bunch more scratch command buffer slots
If running non-vsynced apps, we might need to keep track of 500+ in-flight
commits. Maybe make dynamic at some point?
2020-01-26 13:36:30 -08:00
Pierre-Loup A. Griffais
ca954bb237 steamcompmgr: rework how commits are handled
Keep track of a queue of commits and use the wait thread to get notified
when they're done.

Only repaint when new commits are done, not just queued.
2020-01-26 13:25:28 -08:00
Pierre-Loup A. Griffais
4f01be3bf5 Vulkan: shouldn't need to have synchronous uploads anymore. 2020-01-25 20:34:03 -08:00
Pierre-Loup A. Griffais
dfba164987 Vulkan: Remove one TODO by implementing deferred free for textures. 2020-01-25 20:31:19 -08:00
Pierre-Loup A. Griffais
9a177050e5 Vulkan: fix everything using the same command buffer.
We can't quite get away with it now that we want to kick off several
waits at the same time.
2020-01-25 19:51:11 -08:00
Pierre-Loup A. Griffais
982e61e28d steamcompmgr: add support for spewing stats into a pipe 2020-01-24 01:47:26 +00:00
Pierre-Loup A. Griffais
dde441b13f steamcompmgr: tweak focus logic to know about Steam pop-up windows
Like the standalone input configurator view.
2020-01-24 00:45:24 +00:00
Pierre-Loup A. Griffais
4079d0c785 steamcompmgr: rework a couple of things to plan for decoupling paints
- Add a commit wait thread that just waits for the work associated with
   an in-bound dma-buff is done. We'd like to be getting a fence directly
   from Wayland, but in the absence of that we'll make our own by tapping
   into implicit-sync, DX11-style. gpuvis logging of the outcome of the
   waits in the thread are consistent with the end of GPU work.

 - Rework wayland commit handoff between wlserver and steamcompmgr to let
   steamcompmgr have full access to the commit queue, letting it remove
   elements in the middle and still keep going, compared to the previous
   interface. This lets steamcompmgr get one commit per window per loop,
   for now. We should be able to kick off waits and ref/unref resources
   for all pending commits soon, with some work on the accounting first.

This should also fix an issue introduced recently where the overlay
could get really starved in embedded mode, as we were just getting
the first commit in the queue for a single frame.
2020-01-23 00:52:17 -08:00
Pierre-Loup A. Griffais
cf16f59e84 steamcompmgr: exit when subcommand exits, if there is one 2020-01-22 22:34:38 -08:00
Pierre-Loup A. Griffais
1830b53c2e steamcompmgr.cpp: rise 2020-01-22 21:50:01 -08:00
Pierre-Loup A. Griffais
74143121cd Fix instant crash on embedded from recent nested resize work. 2020-01-20 23:47:55 +00:00
Pierre-Loup A. Griffais
99af917abc README: document shortcuts. 2020-01-20 02:10:36 -08:00
Pierre-Loup A. Griffais
6183a70564 nested: toggle filter with meta+n 2020-01-20 02:04:57 -08:00
Pierre-Loup A. Griffais
4dcacf3cc1 steamcompmgr: make cursor scaling more current, remove some cruft. 2020-01-20 01:58:39 -08:00
Pierre-Loup A. Griffais
d6ff686b64 nested: make Meta+f toggle fullscreen for the output window. 2020-01-20 01:45:43 -08:00
Pierre-Loup A. Griffais
188ea49e51 nested: let the output surface be resizeable
And let the SDL window be resizeable too.
2020-01-20 01:32:54 -08:00
Pierre-Loup A. Griffais
e5d888d56e Make README cool and add some usage examples. 2020-01-18 21:54:55 -08:00
Pierre-Loup A. Griffais
228c5e049c We needed our threads to block SIGUSR1, not ignore it.
It's a requirement of wlroots, since it uses it to get notified of
Xwayland readiness.

Having our threads use SIG_IGN would mean that they could still get
selected to get the signal and would just discard it, as opposed to
not being in the running at all. So the more threads we added, the
least chance we had of the notify function running consistently at
startup.

Now seems to consistently agree that XWayland is up every startup.
2020-01-18 21:08:37 -08:00
Pierre-Loup A. Griffais
3ca59feabd inputsdl: grab cursor when focused, send mouse input through X.
This more or less makes everything pretty playable.
2020-01-18 20:37:11 -08:00
Pierre-Loup A. Griffais
946b49c7a6 steamcompmgr: fix bug from 2013 with cursor hiding.
We don't want to unhide the cursor in the small period of time where we
don't have a foxued window.
2020-01-18 18:12:39 -08:00
Pierre-Loup A. Griffais
6481e1d777 rendervulkan: offset rendering a bit to avoid blurry text.
This isn't a perfect fix, see comment.
2020-01-18 17:35:23 -08:00
Pierre-Loup A. Griffais
303c702547 rendervulkan: it's 2020, surely GPUs understand integers by now?! 2020-01-18 17:24:56 -08:00
Pierre-Loup A. Griffais
7b2220003c Let it take a command to run in its DISPLAY after "--". 2020-01-18 17:14:49 -08:00
Pierre-Loup A. Griffais
90fa0770e8 nested: plumb some more output options.
Output window size, scaling filter, border.

TODO: make output dynamically resizeable, and some settings reloadable.
2020-01-18 16:05:19 -08:00
Pierre-Loup A. Griffais
19e2e511b6 sdlinput: nested keyboard support. 2020-01-18 15:10:14 -08:00
Pierre-Loup A. Griffais
b306714f3c drm: always set DRM_MODE_ATOMIC_ALLOW_MODESET for now.
That seems to make DC happier when we change the src and dst rects.
2020-01-18 03:40:51 +00:00
Pierre-Loup A. Griffais
bb52b60301 wlserver: some more basic tweaks for touch logic.
Add primitive hold-n-drag.
2020-01-17 03:27:55 -08:00
Pierre-Loup A. Griffais
3f51eb4d25 steamcompmgr: fix a bug where the cursor would only unhide if clicked
Ideally we'd get actual MotionNotify and redraw if needed, but probably
grabbed in this case. This was Shadowverse.
2020-01-17 02:45:43 -08:00
Pierre-Loup A. Griffais
56b2aa2d92 wlserver: wire kb+mouse+touch input coming from wlr, mainly libinput.
Add the concept of a cursor coordinate when that initializes when focusing
a surface.

Put some super primitive tap to left-click emulation in there for now.
2020-01-17 02:36:53 -08:00
Pierre-Loup A. Griffais
3eacb24d01 steamcompmgr: fix launchers/etc not displaying at first.
If a window already has a buffer attached by the time we figure out it
exists and sets its role, we missed the initial commit and will never
get it. For windows that animate interactively, that's fine, as we'll
get another one soon enough, but 2D apps like launchers repaint on
demand, so it's not fine there.
2020-01-17 00:45:21 +00:00
Pierre-Loup A. Griffais
bb945da160 steamcompmgr: Remove skipping all frames if no main plane.
If the base game is stuck before having rendered anything, we still want
to show overlay layers when they animate so the user can get out.

Let us composite and the empty texture should take care of it.
2020-01-15 22:58:22 -08:00
Pierre-Loup A. Griffais
ba4fbb3b30
Update README 2020-01-15 18:47:09 -08:00
Pierre-Loup A. Griffais
9b39124301
Update README 2020-01-15 18:46:36 -08:00
Pierre-Loup A. Griffais
c1c739a520
Update README 2020-01-15 18:46:10 -08:00
Pierre-Loup A. Griffais
3353b5845f
Update README 2020-01-15 18:40:53 -08:00
Pierre-Loup A. Griffais
dd6d0d5ad8 drm: drmModeAtomicCommit can return -ENOSPC, make non-fatal.
It's non-fatal, presumably we messed up source coordinates for that flip
but needs root-causing. Can happen in the very early loading of MGSV:TPP.

Fix a bug with the new flip lock where non-fatal flip errors would hang.
2020-01-15 18:31:05 -08:00
Pierre-Loup A. Griffais
c0a793e290 wlserver: handle EINTR in the main loop epoll.
Fixes the server going away when we need it most, or when attaching GDB.
2020-01-15 17:48:20 -08:00
Pierre-Loup A. Griffais
1b0f273f21 steamcompmgr: flush output to startup pipe with a newline. 2020-01-15 15:38:21 -08:00
Pierre-Loup A. Griffais
bdbdabe19b steamcompmgr: add option to send DISPLAY back to invoker.
So the session script can read it back and know when gamescope is ready.
2020-01-14 23:51:22 -08:00
Pierre-Loup A. Griffais
e1c4298d2a Rename project and executable to gamescope.
We're a superset of steamcompmgr now, but have a wider scope, so new
name to reflect it.
2020-01-14 17:35:36 -08:00
Pierre-Loup A. Griffais
83ccb4d74d composite.hlsl: This seems a bit faster on Raven? 2020-01-13 22:42:12 -08:00
Pierre-Loup A. Griffais
901103af3f wlserver: anti-fd exhaustion measures.
If we only take the first commit, we leave a bunch in the queue, which
makes us that much more likely to run out of FDs when importing the
myriad of buffer referenced coming from a non-vsynced client. Fixes
crashes with vblank_mode=0 glxgears after the recent changes.

We were always subject to such crashes, just getting lucky/fast before.
2020-01-13 22:09:55 -08:00
Pierre-Loup A. Griffais
fb49601138 steamcompmgr: use next wayland buffer.
Not last. Prevents non-vsynced clients from getting too far ahead.
2020-01-13 21:14:02 -08:00
Pierre-Loup A. Griffais
94ecdfdc6e drm: more logging. 2020-01-13 20:57:39 -08:00
Pierre-Loup A. Griffais
1a1fa8629f drm: workaround for flip failures launching The Witcher 3.
Tries to flip a 1x1 surface, apparently amdgpu doesn't like it

In a liftoff future it would surely detect that and let us know.
2020-01-13 20:19:17 -08:00
Pierre-Loup A. Griffais
8827ea367e drm: re-add non-liftoff path, with logging. 2020-01-13 20:18:28 -08:00
Pierre-Loup A. Griffais
3a17f3eed7 steamcompmgr: small fixes to not fix damage until we really painted. 2020-01-13 18:53:29 -08:00
Pierre-Loup A. Griffais
e637bdad10 steamcompmgr: gpuvis frame cadence debugging.
Now that things are generally more stable, let's take a look.
2020-01-13 18:45:53 -08:00
Pierre-Loup A. Griffais
c77df96523 rendervulkan: always write all layers in the descriptor.
Use an empty dummy texture for unbound slots, as the driver can't know
what the shader will sample from.

Also remove any sort of implicit attempts at compaction of slots.
2020-01-09 02:34:54 +00:00
Pierre-Loup A. Griffais
807b24f731 steamcompmgr: Added a debug option to always composite.
This way we never flip anything but our own buffers, to facilitate bug
isolation.
2020-01-08 02:40:14 +00:00