fix(vk): report device loss throughout native presentation #1515
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1515
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/presentation-device-loss"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rebased onto main
d224dc06and resolved the test-runner conflict by moving this test's arguments intoRUN_ALL_ARGS, following #1822. The production patch is unchanged. Focused presentation-device-loss, readback-visibility and runner-declaration checks pass.New head:
d446e99d0191759fcfe1f81fe7693fed1b01a2c6. Fresh checks: source, Windows, AppImage; pending. Full local suite is running. Historical native results remain tied to their original builds; no new API13 game run claimed.A device reset reported during native presentation bypasses the replay's existing terminal device-loss handler. Fence/command-buffer calls ignore the result, acquisition returns silently, and present only logs it; dependent work can continue without the report/exit policy already used by normal submissions.
Route
VK_ERROR_DEVICE_LOSTfrom all result-bearing Vulkan calls directly inpresent_imageto the existingdevice_lost()handler: fence wait/reset, command-pool reset, command begin/end, acquisition, submission and both presentation queues. Check before readback or dependent work and before Reflex counts the present. The existing handler writes its checkpoint report once, flushes the host log and exits. No API change, new dependency or successful rendering change.This follows the project's terminal policy; it does not recover a device or address arbitrary submission OOM. Out-of-date/suboptimal/Wayland-timeout handling stays in place. The tests distinguish call-site routing from a real hardware reset.
Validation at
1d6e9a6on mainb2e1c5a:Exact-head fork workflows follow. Documentation:
docs/presentation-device-loss.md.Main BC retry/staging fallback changes introduced a shared source-fixture compilation regression. At
f80c40dcd9d053d5508ee42df956bcacb84b8a14, the two staging-publication fixture files are integrated fromfe1c22ceb699830965d75168bfe13efc9db690ef: existing assertions remain, mapped fallback/unmapped cleanup/reuse and multi-atom ASTC visibility are exercised. GPU/host/lifter/third-party source trees are identical to the previous head; earlier native results retain their actual hashes. This CI repair is tracked separately and adds no production behavior to this contribution. Exact-head fork workflows were refreshed.Current-head validation
Current head
d446e99, based on maind224dc0. Earlier local/runtime results describe their recorded source hashes.Fork runs are separate from upstream Actions approval; no maintainer approval gate is bypassed.
Looks good. Checked every changed call site in present_image against the head: wait/reset/begin/end/acquire/submit and both present paths now go to device_lost(), which is declared earlier in the file (line ~2510) and is noreturn. The out-of-date/suboptimal/timeout handling is untouched, and device_lost() takes no locks, so calling it while holding present_mu or present_queue_mu can't deadlock. The new test is registered in run_all.py, and the present_semaphores test fix (whole function instead of a fixed 12000 chars) is sensible. CI is green.
Nit: the test is source-scraping plus a stubbed fixture, so it proves routing but not behaviour; fine given no GPU, just worth knowing.
Heads-up: this conflicts with main now (a lot landed today). Could you merge main into the branch (or rebase) and resolve the conflicts? Thanks!
Rebased onto main
d224dc06and resolved the test-runner conflict by moving this test's arguments intoRUN_ALL_ARGS, following #1822. The production patch is unchanged. Focused presentation-device-loss, readback-visibility and runner-declaration checks pass.New head:
d446e99d0191759fcfe1f81fe7693fed1b01a2c6. Fresh checks: source, Windows, AppImage; pending. Full local suite is running. Historical native results remain tied to their original builds; no new API13 game run claimed.