Repository navigation
Coalesce adjacent captured mirror-copy regions - #948
Closed
nickyfactz wants to merge 2 commits into
Closed
nickyfactz wants to merge 2 commits into
nickyfactz wants to merge 2 commits into
Conversation
Combine adjacent regions only when their source and destination both remain contiguous within the same captured buffer and mirror. Keep noncontiguous regions in their existing order. Assisted-by: OpenAI Codex Co-Authored-By: OpenAI Codex <noreply@openai.com>
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.
Captured pages are currently submitted as separate buffer-copy regions even when adjacent pages come from consecutive bytes of the same capture buffer and go to consecutive bytes in the same mirror. Combine only those contiguous regions; retain the original order and separate gaps, overlaps, different buffers and overflow cases.
On an RTX 5090 with NVIDIA driver 616.64, Vulkan mailbox at 1600×900, a stationary Kokiri Forest save on Hookshot 232eecb produced about 2,160 captured copy regions per frame. In a baseline–candidate–baseline test with
RX_VK_PASS_TIMING=1, the candidate produced about 1,260 regions per frame. The instrumented GPU copy span was 2.409–2.512 ms/frame in the first baseline, 1.718–1.770 ms in the candidate, and 2.421–2.432 ms in the second baseline. The candidate copied slightly more data; saves and camera were matched but frames were not identical.These
ALL_COMMANDStimestamps add synchronization, so these numbers are not an uninstrumented FPS or frame-time improvement. A separate uninstrumented 45620e comparison showed enough run-order drift to obscure any frame-time effect. This measures one stationary scene on one GPU. The unmodifiedvk_memory.cppis byte-identical between tested 232eecb and the originally proposed b82bd36 base, while its directly includedvk_menu.hchanged for output resolution.On the same RTX 5090 and driver, a separate 3840×2160 Hyrule Field baseline–candidate–baseline run with frame generation and upscaling off used a copied save and repeated movement plus camera panning. Coarse, nearby renderer summaries reported approximately 3,000–3,100 mirror-sync copy regions/frame in the baselines and 1,650–1,685 in the candidate, with roughly 12 MB synced per frame. These 120-frame averages include captured and live copies, are not strictly aligned to the movement intervals, and the scenes were not frame-identical. The 420-present samples averaged 35.73, 33.57, and 41.35 FPS; these windows were anchored to when input was appended, not when the game read it. The logged input read occurred after the start of both baseline sample windows, so the windows are not matched movement segments. Baseline drift and differences in shader work also prevent attributing an FPS change to this patch. The candidate used the same fe73309 host/game build with the PR renderer rebuilt; it did not include a fresh rebuild of the newer upstream game hotlist. Pre-present captures showed the same Field starting area, not whole-game correctness.
A separate smoke test built the PR commit
615d027and loaded the same Kokiri Forest save on the RTX 5090 and driver 616.64. Pre-present captures showed the forest scene and Link moving after a short scripted input; the process exited cleanly and no device loss was observed in the logs or checked system events. The program cache was disabled because the final build's shader-cache stamp differs from the earlier build. This is one scene with pre-present captures, not a full-game validation or a measurement of FPS improvement.Validation: the strict Linux game-free suite passed 108 checks, with four game/GPU-dependent skips. The new fixture compiles the actual helper and checks copied bytes, independent buffers, partial ranges, gaps, overlaps, backwards order and overflow. On this Windows host the full strict suite passed 100 checks, failed two and skipped ten; both failures reproduce on the unchanged b82bd36 parent: the account cannot create symbolic-link fixtures, and the local LLVM-MinGW toolchain rejects an existing FPS-overlay fixture lacking
<initializer_list>. The fork's hosted source-regressions workflow passed all four jobs for commit 615d027: https://github.com/nickyfactz/Hookshot/actions/runs/42550186470. The refreshed commit 0c93b92 also passed all four jobs: https://github.com/nickyfactz/Hookshot/actions/runs/42570776258.Assisted-by: OpenAI Codex