Commit graph

317 commits

Author SHA1 Message Date
Roman Gilg
b23b5b7189 Revert "refactor: unify pointer movement"
This reverts commit d4361f4649.
2020-04-01 22:41:58 +02:00
Roman Gilg
c2058733e3 Revert "refactor: remove unneeded cursor query functions"
This reverts commit 9547ec9a15.
2020-04-01 22:41:50 +02:00
Roman Gilg
4565766cc5 Revert "refactor: remove unneeded cursor calls on paint"
This reverts commit be1ff3d903.
2020-04-01 22:41:40 +02:00
Roman Gilg
beb29e251e build: update wlroots subproject
This has now recent change to include protocols directory explicitly.
2020-03-10 14:21:05 +01:00
Roman Gilg
42a268bd27 refactor: clean up layers properties loop
Restructure the loop a bit to have less code repetition and make it easier to
understand.
2020-03-10 02:02:40 +01:00
Roman Gilg
8833e07618 feat: add layer debugging via libliftoff log
Activate libliftoff's internal log when layers are enabled and the parameter
'd' is provided.

Note: this needs some patches to libliftoff to make the debug readable that I
have proposed upstream.
2020-03-10 02:02:40 +01:00
Roman Gilg
d17f234738 fix: continue layering when fbs available
Trying to layer onto planes should be continued when fb ids are set and
not the other way around. Here the assert also failed when only having
one layer.
2020-03-10 02:02:40 +01:00
Roman Gilg
be1ff3d903 refactor: remove unneeded cursor calls on paint
It is enough to get the global cursor location when repainting it. So we do not
need to query the relative position. If later on we find this is not right we
should be still able to get the relative position from the surface position
instead of calling into XWayland.

Also it is not expected and apparently unnecessary to move the cursor in the
paint function. Therefore remove this call too.
2020-03-10 01:55:58 +01:00
Roman Gilg
9547ec9a15 refactor: remove unneeded cursor query functions
With cursor position going through global variables we do not need to query the
global position anymore. Remove the MouseCursor function for that.

Furtheron the relative position getter is also not necessary, but let's remove
this one in a separate commit.

This commit also adds a debug line for debugging flaky focus changing.
2020-03-10 01:55:58 +01:00
Roman Gilg
d4361f4649 refactor: unify pointer movement
In nested mode we can use the same code path as in drm mode now.
2020-03-10 01:55:58 +01:00
Roman Gilg
a4fa525255 feat: add relative pointer and constraints support
For now only available on drm backend. For nested there is currently a
different workaround active making it work.

Closes #19
2020-03-10 01:55:58 +01:00
Roman Gilg
0f8d679994 feat: use global pointer position variable
Instead of going through the X11 connection just set the pointer position
directly via global variable.
2020-03-10 01:55:58 +01:00
Roman Gilg
f7d815a203 refactor: add cursor class
Puts all cursor relevant code into a single class. Preparation for getting
cursor movement directly through libinput.
2020-03-10 01:55:58 +01:00
Roman Gilg
920fe8bd8f style: remove trailing whitespace
Many code editiors remove trailing whitespace automatically making patches
difficult since often unrelated lines get changed with the same commit.

So remove the whitespace in the steamcompmgr file all at once in this separate
commit.
2020-03-10 01:55:58 +01:00
Pierre-Loup A. Griffais
95caa5c2fc
Merge pull request #27 from Oschowa/no-xxd
Use build in glslangValidator functionally to generate shader include
2020-03-03 17:50:07 -08:00
Oschowa
2a74683c11 Use build in glslangValidator functionally to generate shader include
file.
This removes the xxd dependency.
2020-01-28 21:30:20 +01:00
Pierre-Loup A. Griffais
bc39b20a8f steamcompmgr: fix rare crash when starting games (DOOM in this case). 2020-01-27 23:18:34 -08:00
Pierre-Loup A. Griffais
1bcd0bd930 Vulkan: fix a nasty race.
We could garbage-collect fences before/during their wait.
2020-01-27 22:46:38 -08:00
Pierre-Loup A. Griffais
578849e429 Vulkan: fix validation errors. 2020-01-27 22:32:16 -08:00
Pierre-Loup A. Griffais
06db3d903a steamcompmgr: close commit fd if no matching window.
That was probably a leak on app exit before?
2020-01-27 21:24:10 -08:00
Pierre-Loup A. Griffais
7e4b1d971c steamcompmgr: cleanup check_new_wayland_res.
Now that we can process everything in the queue, we can make the flow
a bit simpler.
2020-01-27 21:08:47 -08:00
Pierre-Loup A. Griffais
7df0b8655a steamcompmgr: add detail to fence debugging. 2020-01-28 04:10:58 +00:00
Pierre-Loup A. Griffais
e72724f050 embedded: fix a crash on startup in Portal.
Trying to push a new frame with no valid contents would send an
uninitialized texture handle to the Vulkan renderer.
2020-01-27 22:21:12 +00:00
Pierre-Loup A. Griffais
2b111b43dd SDL: initialize after wayland.
Otherwise the input thread can start doing wayland stuff before it's safe.
2020-01-26 17:51:27 -08:00
Pierre-Loup A. Griffais
b4893840eb vblank: more tweaks, align to DRM vblank. 2020-01-26 16:28:35 -08:00
Pierre-Loup A. Griffais
4ca73da9f6 vblankmanager: initial system to let steamcompmgr know when to repaint
For now just mark one repaint per refresh interval without any particular
alignment, as that can be hard to get in nested. We'll use the display
timing extensions for that later.

We'll have it align properly in embedded mode soon.
2020-01-26 14:59:51 -08:00
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