Newer revisions of nothings/stb have switched to stb_image_resize2.h and
moved the original header to deprecated/stb_image_resize.h since [1].
Pin down the version to prevent future breaking changes.
[1]: c4bbb6e75f
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>
Also: Update liftoff dependency to b08bbaa5e6331ed2
("Split liftoff_log_init into set_handler and set_priority")
The callback parameter was moved into a different method, though it is
not needed in this case as we didn't give it one before.
This commit fixes two issues.
A first issue is that fbids_in_req was previously populated
drm_can_avoid_composite and read from in page_flip_handler. As a
result, calling drm_can_avoid_composite then page_flip_handler would
prevent drm_atomic_commit from referencing the right FBs
(page_flip_handler runs in a separate thread and clears fbids_in_req).
To fix this, add a new fbids_queued vector filled by drm_atomic_commit.
Make page_flip_handler read from this new vector instead of
fbids_in_req. As a bonus, this fixes a data race since fbids_queued is
now protected by flip_lock.
The second issue is that drm_can_avoid_composite assumes all layers made
it into a hw plane when liftoff_output_apply succeeds. That's not the
case because libliftoff supports mixed hw plane + composition (where
some layers make it into a hw plane and the others get composited).
To fix this, make drm_can_avoid_composite fail if some but not all
layers make it into a hw plane. In the future, we'll want to support the
mixed mode too.
Closes: https://github.com/Plagman/gamescope/issues/65
References: https://github.com/Plagman/gamescope/issues/41
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.