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.
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.
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.
Import libliftoff as subproject and plumb our planes through it.
Wait for a flip to complete immediately after queuing it for now.
Also immediately wait for cursor image uploads, as we don't have to
do Vulkan rendering anymore after queuing an upload.
Cursor shows up with format hack, but is badly corrupt. We might need
to use a DRM dumb_fb rather than going through the same Vulkan image.
Alpha bits of surfaces are ignored again, need to make Steam select
an ARGB visual for overlay windows, probably.
Setting up the "alpha" plane property somehow makes overlays not
show up at all despite liftoff happily letting us go with scanout.
Only set implicit_sync on in-bound buffers, we'll sync our scanout image
ourselves by exporting the fence and passing to DRM, and flushing.
The fence export actually fails, so leave it commented our for now.
Flushing also doesn't do anything, the bottom of our scanout image is still
corrupt when scanning out to DRM.
So we can easily test single-app scenarios by generating placeholder
ones. Will also make it more robust by using Xres1.2, which should
remove the need for Alkazar's patch for Dead Cells and other apps that
don't get tagged right by the current overlay.
It worked well enough with the Big Picture cursor, and seeing it change
scales between Steam and a game was sometimes jarring, but it doesn't
compute hotspot offset right, and scaling cursors doesn't come out great
a lot of the time.
We're in sole control of the cursor now, there's no "fake" cursor anymore.
Don't attempt to hide it in X, it doesn't matter.
Also Vulkan rendering of a texture populated from arbitrary bits.
Also add the third layer to the shader... Badly needs clean-up.
This should make steamcompmgr messages actually go when we send them.
We're pulling too many frames out of "vsynced" clients now, need to instill
a real frame cadence based on vblank and notify based on that.
The WL_SURFACE_ID messages force us to register SubstructureRedirectMask,
which means we have to participate in a bunch more stuff before windows
will resize and reconfigure properly. This fixes a bunch of problems with
real games.
In order to launch the binary with for example Mesa being installed not into
the regular /usr prefix but into something like /opt the binary needs to be
launched from the install directory and not only directly from the build
directory.
So actually do install the executable.
Main motivation was to have a clean-ish spot to add a ping-pong
command-buffer instead of allocating one every frame. Leaking
significantly less GTT now.
Also add some more leading whitespace courtesy of Kate.