fix(vk): present ahead's vk_replay.cpp half, lost in #1720's merge (main doesn't link) #1858

Merged
NotRexed merged 1 commit from fix/present-ahead-replay into main 2026-11-10 19:00:42 +00:00
NotRexed commented 2026-11-10 18:43:34 +00:00 (Migrated from github.com)

Main doesn't link since #1720 merged. The AppImage job says:

hookshot_vk.so has 2 unresolved symbol(s); it would not load:
    _ZN5mkwvk14present_commitERKNS_14PendingPresentE
    _ZN5mkwvk18present_defer_intoE

Why: #1720's last commit (a259978b) reset vk_replay.cpp to main's copy so main could be merged in, with "present ahead re-applied next". The PR was merged before that re-apply. Main ended up with:

  • vk_framegen.h declaring present_commit and present_defer_into;
  • the display thread in vk_framegen.cpp calling them;
  • no definitions anywhere.

Fix: put back the 24 lines from the PR's previous head (7006ea0f) on current main:

  • the present_defer_into thread-local;
  • present_image's deferral after its copy's submit;
  • present_commit;
  • present_image's present split out as present_out.

Main's present_image now checks vkQueueSubmit2 for device loss, and that check stays ahead of the deferral.

Present ahead only runs for a paced 2x frame-generation set with two spare swapchain images (#1720's conditions). Everything else presents through present_out exactly as before. CI compiles and tests it here, including tests/test_present_ahead.py, which reads bool present_commit( from vk_replay.cpp. I'll check frame generation 2x pacing in game before relying on it.

🤖 Generated with Claude Code

Main doesn't link since #1720 merged. The AppImage job says: ``` hookshot_vk.so has 2 unresolved symbol(s); it would not load: _ZN5mkwvk14present_commitERKNS_14PendingPresentE _ZN5mkwvk18present_defer_intoE ``` **Why:** #1720's last commit (a259978b) reset `vk_replay.cpp` to main's copy so main could be merged in, with "present ahead re-applied next". The PR was merged before that re-apply. Main ended up with: - `vk_framegen.h` declaring `present_commit` and `present_defer_into`; - the display thread in `vk_framegen.cpp` calling them; - no definitions anywhere. **Fix:** put back the 24 lines from the PR's previous head (7006ea0f) on current main: - the `present_defer_into` thread-local; - `present_image`'s deferral after its copy's submit; - `present_commit`; - `present_image`'s present split out as `present_out`. Main's `present_image` now checks `vkQueueSubmit2` for device loss, and that check stays ahead of the deferral. Present ahead only runs for a paced 2x frame-generation set with two spare swapchain images (#1720's conditions). Everything else presents through `present_out` exactly as before. CI compiles and tests it here, including `tests/test_present_ahead.py`, which reads `bool present_commit(` from vk_replay.cpp. I'll check frame generation 2x pacing in game before relying on it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Commenting is not possible because the repository is archived.
No description provided.