fix(vk): publish complete screenshot resource sets #1472

Merged
Arkex-ai merged 1 commit from fix/capture-resource-readiness into main 2026-11-10 07:48:43 +00:00
Arkex-ai commented 2026-11-10 04:13:34 +00:00 (Migrated from github.com)

offscreen_init publishes off_image before allocating the screenshot image and both mapped readbacks. If a later allocation fails, the next call sees that handle and reports success with an incomplete resource set. The generated-frame screenshot path also ignores allocation failures before recording barriers/copies.

Build screenshot/offscreen resources locally, roll back partial allocations, and publish the complete set only on success. Give generated-frame shots the same complete image/readback readiness contract; failed setup clears the capture source before recording or scheduling a mapped read. A later present can retry, and ready resources are reused. Normal presentation and capture dimensions/formats keep their existing policies.

Validation:

  • Production offscreen_init on main reproduces partial published handles after an injected allocation failure.
  • Candidate production-function tests with real Vulkan types cover all four screenshot/offscreen allocation points and both generated-shot points, ownership/leaks, retry and ready reuse. The actual generated-shot recorder emits no commands or scheduled read on failure and records its four commands after recovery.
  • Seven compiled behavior mutations rejected; Linux GCC and ASan+UBSan pass the same production-consumer fixture.
  • Official standalone host/backend build passed at684e8af on5609af4, reusing unchanged guest translation and rebuilding changed host/backend.
  • Local strict suite:190 passed,4 failed,16 skipped. The four failures match the previously identified local environment limitations (NUP symlink privileges, fps-overlay fixture initializer_list, native SDK precompile guard and display-startup LLVM unused-global warning). Exact-head fork CI follows.
  • Native Windows FG2/RCAS50 smoke: cloned Kokiri checkpoint,1720x720 -> maximized3440x1369 -> restored. Game/generated screenshot pairs at two presents all fully decoded as RGB3440x1440. Game exit0; original checkpoint hashes unchanged. Allocation failures were CPU-injected, not injected into this native run. Linux window/GPU untested.

PR1025 adds screenshot requests but preserves this premature readiness marker/allocation logic. PR1352/1321 change captured contents/menu composition; this fix concerns resource readiness. PR1445 addresses the separate interpolation resources.

No game files, screenshots, binaries, captures or private logs included. Assisted-by trailer records tool assistance.

Current-head validation

Current head 95c5c1d, based on main 7d1562d. 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.

API12 integration validation at eb08449: official matching host/backend build, Windows LLVM and Linux GCC/ASan/UBSan resource fixtures pass. Three view-lifetime/publication mutations fail causally. Native FG2 produced 3 decoded RGB3440x1440 normal screenshots, maximize/restore and exit0, with original checkpoint hashes unchanged. This runtime evidence remains attached to that recorded head.

Fork runs are separate from upstream Actions approval; no maintainer approval gate is bypassed.

`offscreen_init` publishes `off_image` before allocating the screenshot image and both mapped readbacks. If a later allocation fails, the next call sees that handle and reports success with an incomplete resource set. The generated-frame screenshot path also ignores allocation failures before recording barriers/copies. Build screenshot/offscreen resources locally, roll back partial allocations, and publish the complete set only on success. Give generated-frame shots the same complete image/readback readiness contract; failed setup clears the capture source before recording or scheduling a mapped read. A later present can retry, and ready resources are reused. Normal presentation and capture dimensions/formats keep their existing policies. Validation: - Production `offscreen_init` on main reproduces partial published handles after an injected allocation failure. - Candidate production-function tests with real Vulkan types cover all four screenshot/offscreen allocation points and both generated-shot points, ownership/leaks, retry and ready reuse. The actual generated-shot recorder emits no commands or scheduled read on failure and records its four commands after recovery. - Seven compiled behavior mutations rejected; Linux GCC and ASan+UBSan pass the same production-consumer fixture. - Official standalone host/backend build passed at684e8af on5609af4, reusing unchanged guest translation and rebuilding changed host/backend. - Local strict suite:190 passed,4 failed,16 skipped. The four failures match the previously identified local environment limitations (NUP symlink privileges, fps-overlay fixture initializer_list, native SDK precompile guard and display-startup LLVM unused-global warning). Exact-head fork CI follows. - Native Windows FG2/RCAS50 smoke: cloned Kokiri checkpoint,1720x720 -> maximized3440x1369 -> restored. Game/generated screenshot pairs at two presents all fully decoded as RGB3440x1440. Game exit0; original checkpoint hashes unchanged. Allocation failures were CPU-injected, not injected into this native run. Linux window/GPU untested. PR1025 adds screenshot requests but preserves this premature readiness marker/allocation logic. PR1352/1321 change captured contents/menu composition; this fix concerns resource readiness. PR1445 addresses the separate interpolation resources. No game files, screenshots, binaries, captures or private logs included. Assisted-by trailer records tool assistance. <!-- goal15-current-validation --> ### Current-head validation Current head `95c5c1d`, based on main `7d1562d`. 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. API12 integration validation at `eb08449`: official matching host/backend build, Windows LLVM and Linux GCC/ASan/UBSan resource fixtures pass. Three view-lifetime/publication mutations fail causally. Native FG2 produced 3 decoded RGB3440x1440 normal screenshots, maximize/restore and exit0, with original checkpoint hashes unchanged. This runtime evidence remains attached to that recorded head. - [Linux AppImage](https://github.com/Arkex-ai/Hookshot/actions/runs/42774740250): success. - [Windows builder](https://github.com/Arkex-ai/Hookshot/actions/runs/42774736011): success. - [Game-free source regressions](https://github.com/Arkex-ai/Hookshot/actions/runs/42774732417): success. Fork runs are separate from upstream Actions approval; no maintainer approval gate is bypassed.
Commenting is not possible because the repository is archived.
No description provided.