fix(vk): recover recording stream and descriptor allocation failures #1658
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!1658
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/recording-admission"
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?
Failed recording-stream or descriptor allocations can leave incomplete resources usable, leak new resources, or prevent a clean retry. Overflowing reservations and premature bank-cache metadata can also authorize invalid writes or reuse stale bytes.
This change publishes streams and extra descriptor pools only after allocation, mapping/set creation and container ownership succeed. Failures preserve prior resources and allow retry; reservations reject missing mappings and arithmetic overflow. Bank-cache metadata commits after a completed upload or a verified identical-byte hit. Successful growth, retention, push-descriptor and cache-visibility policies are preserved.
Validation:
6a51fc2e82a8b1e86acb063b4d91b23d8269f7fa: Windows builder passed; source regressions and Linux AppImage are in progress. Fork runs do not bypass upstream approval.Implementation, test scope and references: docs/recording-admission.md. No game-derived files or build output are included.
Current-head validation
Current head
6a51fc2, based on main7047756. Earlier local/runtime results describe their recorded source hashes.The standalone contribution patch is unchanged after the audited main refresh; exact-head build/source checks are refreshed below. Earlier runtime evidence remains tied to its recorded hash.
Fork runs are separate from upstream Actions approval; no maintainer approval gate is bypassed.
Looks good. I read the vk_draw.cpp changes and they match the description:
stream_insert, which only publishes the stream after buffer, allocation, mapping and the container insert all succeed. Failed growth no longer leaves an unmapped stream behind or advancessi.stream_reserveis overflow-safe and refuses to run with a missing stream or mapping. A recording whose first stream failed just gets no room, and the nextdraw_begin_recordingretries it.make_poolnow checks the result.bind_descriptorsno longer calls Vulkan with a null pool, and an extra pool is only kept once its first set allocation and the push_back both succeed.bind_genandgridonly after a verified identical-byte hit or a completed upload. The growth size formula is equivalent to before.The new test is registered in run_all.py with the same args as the framelog test, and CI is green.
Nit: the PR body is long and carries a few stale validation sections. It's worth trimming before merge.
Trimmed the PR description and removed the stale validation sections. It now separates the 23-case modeled-failure coverage from earlier native results, which remain tied to their recorded hashes.
No code changes were needed for this nit; the head remains
6a51fc2e82a8b1e86acb063b4d91b23d8269f7fa. The exact-head Windows builder passed (42858312326); source regressions (42858306868) and AppImage (42858317715) are still in progress. Native driver-OOM/device-loss recovery is not claimed.