Repository navigation
Conversation
Pool readback leases and submission scratch, retire completed staging without a timed quarantine, and reserve actual texture heap growth. Preserve ordinary held mip levels with tiled resources enabled, release empty blocks outside pool locks, and index occupied descriptor owners. Add regression coverage and document ownership, pressure, and validation limits. Keep memory deferrals retryable in both rendering and diagnostics.
1mosce
marked this pull request as ready for review
November 30, 2026 08:33
1 task done
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.
Completed uploads kept staging ranges quarantined for another two seconds, tile mode disabled held-level trimming even for ordinary textures, and pressure could repeatedly recreate readback resources. This patch corrects those lifetimes, pools readback ranges, and accounts for actual texture-heap growth across concurrent workers.
Resource-lifetime fixes for review. The resource regressions have targeted coverage and the builds have run in game. Stable target frame times, complete leak freedom, and visual equivalence across city traversal are still unverified. This does not replace the shared-memory/coherency model.
What it changes
docs/readback-arena.md.How it was tested
Base:
41adb55167fa778fcaa5dc36fa18a1fa8dacd657(still upstream main when preparing this PR).Hardware/profile: Windows, RTX 4070 Laptop 8 GiB, 32 GiB system RAM; Series S, 640x360 internal / 1920x1080 output, DLSS Ultra Performance, frame generation off, RT builder off. Optimized Cargo
diagbuilds with and without thediagnosticsfeature. No shader translation changes; wave-size validation is not applicable.cargo check --locked -p victory-gpu --all-features: passed.cargo test --locked -p victory-gpu --features diagnostics -- --test-threads=1: 1008 passed, 2 failed, 66 ignored. The failures arecompose::tests::bgrx_plane_selects_a_typed_viewandshader_cache::tests::every_switch_of_the_translator_is_in_the_key; both were reproduced on clean main..staging_reuses_completed_uploads_without_a_timed_quarantine: passed on the GPU, including pending-copy protection and zeroed reuse after completion.levels_on_demand_on_the_cardandlevels_reuse_resident_tiles_at_budget: passed on the physical GPU with Windows Graphics Tools / D3D12 debug layer, reported tiled-resources tier 4. Heap-reservation coverage also passed on the adapter.git diff --checkand staged asset policy passed (22 text files).Game observations, not a matched FPS A/B: the 15.6-minute walk with the held-mip fix reached 5,412 MiB local usage after warm-up and remained at least 1,242 MiB below the OS budget in that interval; staging ended at 192 MiB. A separate clean-base walk retained 1,408 MiB staging and reached 8,019 MiB local usage against a 6,983 MiB budget. Routes/cameras diverged, so these do not establish a percentage speedup. The final pool-release build completed a short muted smoke run: 4,799 MiB local usage / 7,180 MiB budget at the end, median 16.7 FPS, no untranslated shaders, refused host pipelines or crash-log entries. Runs ended through the harness, on copied saves.
Known checks/limitations: full workspace tests stop at the three BCPack oracle-parity failures also reproduced on clean main. Strict default/all-feature Clippy fails in unchanged upstream code; a warning-only audit is not a passing strict gate. Full-tree asset policy reports the existing hex-literal run in
victory-loader/src/heap_sites/frame_users.rs; the staged patch passes. Dark character textures reproduce on both baseline and candidate. Ground-level city traversal and other GPUs are unverified. Memory growth while visiting new areas is not sufficient evidence either for or against a leak.Checked for overlap
pool.rs; reconcile the alternatives before merging both.KeptSlotsmodule with an identity cache. This patch keeps the existing owner storage and uses occupancy bits plus the locked owner check. These are alternative implementations of the same scan optimization.Implemented and tested with OpenAI Codex. No game assets, executable bytes, captures, shader dumps or private run logs are included.