Repository navigation
android: A33 blanks a missing override only once the desktop has painted again - #36
Merged
Merged
Conversation
…ted again A33's exit arm treats a missing override surface as "the desktop is all that is left", which was true when the shim sent `override_window_content` at surface creation and never sent `wl_surface.destroy`: the override could only disappear at teardown. drm ValveSoftware#64 binds at a swapchain's first commit and destroys the surface for real when the guest does, so the same absence now happens mid-session — a device loss, or a rebuild on a new surface — and the arm blanks the panel for a gap that closes a frame or two later. The arm now waits for evidence that nothing is coming back: when the override first goes away it stamps the window's newest done commit id, and the blind is raised only once something has painted after that. Wine's desktop repaints when the game's window goes away, which is the exit case; a guest recreating its surface binds and commits before the desktop repaints, which is not. The clock is commit ids from the one counter the startup blind already uses, so there is no timeout to tune. The one-shot log line carries the new id so the panel evidence stays tieable to the predicate. Verified: the series applies cleanly to a pristine 6c38178 (23 files, this patch included), and `src/steamcompmgr.cpp` compiles with the build's own flags (`-fsyntax-only`, NDK 27.3, `-Wall -Wextra`, no diagnostics). No device run: the change is a predicate, and the case it changes needs a guest that destroys its Vulkan surface mid-session — a DXVK device loss is the cheapest way to provoke one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
Nothing observed by itself — this is the other half of a drm change (GameNative/gamenative-drm#65). A33's exit arm treats a missing override surface as "the desktop is all that is left", which was true while the WSI shim sent
override_window_contentat surface creation and never sentwl_surface.destroy: the override could only disappear at teardown.Once the shim binds at a swapchain's first commit and destroys the surface for real, the same absence happens mid-session — a device loss, or a rebuild on a new surface — and that arm blanks the panel for a gap that closes a frame or two later.
Cause
The arm decides by absence alone:
"Gone after having been bound" was only ever the exit path when the binding was permanent. With a surface that can be destroyed and recreated, absence is a gap as often as it is an exit, and the two are not distinguished.
Change
A33 is corrected in place (the A28 precedent), not re-issued as a new patch. When the override first goes away its gap is stamped with the window's newest done commit id, and the blind is raised only once something has painted after that:
Wine's desktop repaints when the game's window goes away — that is the exit case, and it still blanks (the reaper blank covers the rest). A guest recreating its surface binds and commits before the desktop repaints — that is the gap, and it no longer flashes. The clock is commit ids from the one counter the startup blind already uses, so there is no timeout to tune.
steamcompmgr_win_tgainsulSessionOverrideGapCommitID, and the one-shot log line gainsgap_commit=so the panel evidence stays tieable to the predicate:No other patch is disabled: none of them is wrong on its own, and this one is only wrong about a premise the drm side removes.
Testing
Odin 3, Android 13, payload
20261110.1—bin/gamescope96cf8bf0(the build of this patch) with the shim from gamenative-drm#65,wine explorer /desktop=shell,1280x720, Epic overlay enabled on both titles.Yooka-Laylee — the startup arm, with the new field:
Three transitions in the session, all at startup; fps 59.9–61.0 over 2 min 30 s.
FINAL FANTASY VII REMAKE INTERGRADE (vkd3d/D3D12) — the case this patch exists to keep quiet:
A swapchain destroyed and recreated mid-session did not unbind the window, so the gap arm never ran and no black frame appeared on the recreate. fps 30.0 with
LIMIT --(the title's own cap),gamescope Error/Warn: 0.The series applies cleanly to a pristine
6c38178f(23 files, this patch included), andsrc/steamcompmgr.cppcompiles with the build's own flags (-fsyntax-only, NDK 27.3,-Wall -Wextra, no diagnostics).Not tested
The gap arm itself — a guest that destroys its Vulkan surface while its window lives (DXVK/vkd3d device loss). Neither title did that in these runs, so
gap_commitstayed 0 in both logs: reasoned through and consistent, but unexercised on hardware.