Reclaim dynamic descriptor ranges at GPU completion #48
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!48
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-48"
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?
@gomeaw on GitHub · 2026-11-26 00:11 UTC · original
gomeaw:fix/release-completed-descriptor-tables→main· +131 −16 · 5 files · 1 commits · openChange
Under late submission, a list can keep its dynamic descriptor ranges through CPU readback and until the list is recycled.
VICTORY_BURY_LAGcan hold the settled list for another 64 submissions. That consumes part of the fixed pool while other recording threads try to allocate new tables. RTX 5080 descriptor pressureRelease only the descriptor ranges of each completed flight before CPU readback, in both the relay and blocking settle paths. The helper checks the GPU fence for each flight. The detached list keeps its draw state, resource references, and upload memory through the existing lifetime. Draining the ranges also makes the later list drop safe after the slots have been assigned elsewhere.
Verification
A Windows WARP test fills a real dynamic heap, observes that the reservation is held while a private fence is incomplete, then recovers the entire span while the old list is still held in a flight. The test also checks the device-removal fence sentinel and verifies that dropping the old list keeps the replacement allocation live. Windows validation
Part of #35. The expected reduction in refused tables still needs a matched RTX gameplay run. AI-assisted with Codex. The test uses synthetic inputs.
@spook40 on GitHub · 2026-11-26 00:37 UTC · original
Tested PR #48 on NVIDIA GeForce RTX 3060 Ti (8 GB VRAM) (
pr-48branch,diagprofile with--features diagnostics,VICTORY_TEXTURE_MAX=512):title suspended; ending the title, saving a297390736-byte host pipeline library (early=2662,made=3,loaded=2498,started_early=2503).5.2 ms(33.4 mslooking at heap slots), with the GPU around ~73% busy (152.2 msnothing queued) and80.7 mswaiting on flights (17.3flights/frame,135.8 mslanding).AI-assisted with Gemini.
@sawetco on GitHub · 2026-11-26 01:11 UTC · original
Paired RTX 5070 (12 GB) result with PR #10 dispatch splitting on. This tests #48 on top of PR #10. Base was
d78024bwith the split-aware cache key and the same controller-input hook in both binaries. The only renderer change in the second binary was #48 atdca516d. Both reported the same shader-translator fingerprint.Windows 11, Ryzen 5 7600X, 32 GB, NVIDIA 621.24, hardware D3D12, Series X, upstream
-Safesettings, 3840×2160 presentation. Each run copied the same Jason home save, 2,498 shaders and the same 195,034,430-byte host pipeline library. After recognizing the porch we waited at least 60 s, then sent the same 30 s controller sequence. No window capture during that sequence. One pass per configuration using the existing OS and driver caches.Counters are medians of the renderer's ~5 s reports. Every sampled 3D-workload interval in the #48 run reported zero refused tables. The patched porch and post-route captures both show Jason's face and reflected shoreline. Both configurations still showed the tip over a black scene after loading. The largest remaining named drop category on the patched walk was the disabled RT structure builder (338.4/frame across all five reports). The slower p95 warrants a repeat before drawing an FPS conclusion.
A third run on the patched binary changed only
VICTORY_LATE_WAIT_LISTS=32. The same walk reported 0 refused, 2 indirect dropped, 2.41 fps and p95 1,095 ms. That run kept the water visible and produced a longer p95 here.A separate diagnostic run used
VICTORY_TIMELINEfor two six-frame captures. During the post-load black picture (the tip was visible), 565.8 of 617.6 ms/frame on the traced Present dependency chain were onvictory-pipelines-*outside named spans. During the walk (16.5 s after input), it was 598.3 of 623.2 ms/frame, with the card reporting 459.9 ms/frame idle between this process's submissions. Both captures reported zero lost events. These traces do not resolve what the worker did inside those spans.If anyone with a 12 or 16 GB NVIDIA card can repeat this at the same checkpoint, the most helpful comparison would be whether zero refusals coincide with a visible water surface, and the p95 Present interval once the porch has been visible for one minute. For the black-screen capture, which additional worker span or first-use PSO timing would best distinguish a driver pipeline build from waiting on another worker?
@pr0vId3nce on GitHub · 2026-11-26 04:07 UTC · original
Tested #48 on an RTX 4080 16 GB with
scripts\play.ps1's default settings (the fast set:THIN=1,JOIN_PARTS=8,UPLOAD_AHEAD=1; no-Safe, noBURY_LAGoverride). The two results above used-Safe, so this covers the case #35 reports as broken. Short version: on this card #48 removes the refusals and the broken picture.Setup. Ryzen 9 7900X, 32 GB RAM, Windows 11, Series X profile,
diagbuild with--features diagnostics. A story checkpoint in the first cell, scripted Enter presses only, the camera resting at the cell window. Each run lasted 600 s. The counters are medians of the renderer's 5-second reports from 364 to 600 s after input. The shader cache was already filled (victory shaders).0a435660a43566+ #48 (dca516d)With #48, none of the 110 reports in the run had a refusal. The longest search in the run took 12 ms. There was no device removal and no DRED line.
Same thing with the lag turned off instead. Two runs of
0a43566with the default settings plusVICTORY_BURY_LAG=0gave 0 tables refused, 0 indirect dropped, the same right picture, and a median of 132 ms in both. So #48 gets the result of turning off the lag while keeping the lag's later recycling of lists and objects. For comparison, DexNom/VIctory8cca4d2in the same scene on the same machine, run back to back with one of those, gave a 199 ms median.On #62. On this card (Ada) the blur under the default settings came with the refusals. With #48,
THIN=1andJOIN_PARTS=8both on give a sharp picture for the full 10 minutes. That fits the two-switch combination reported there, since both raise how many lists are in flight at once. It may not settle the Blackwell report, and the exposure flashes reported in #62's comments were not looked for here.Not changed by #48:
E_INVALIDARG, ~1 dispatch a frame each).Caveats.
0a43566run was the build's first run, with the driver's pipeline cache empty. Its refusal counts are taken after every pipeline had been made, but its frame time (117 ms while dropping ~1,600 indirect draws and ~20% of tables) is not a like-for-like speed comparison. That is why the speed comparison above uses theBURY_LAG=0runs.No game files or images attached. The runs were driven and this was written AI-assisted (Claude Code).
@gomeaw on GitHub · 2026-11-26 07:16 UTC · original
The paired RTX 5070 result isolates the table-exhaustion fix. It also gives us two good capture points for the pipeline delay. I opened #144 in response to the question about worker spans. With that patch the existing
VICTORY_TIMELINEreport can distinguish shader translation, waiting for another worker's translation, library locks, D3D12 PSO loads and creates, and cache saves. It also labels first-use waits on the requesting thread.If you repeat the tip-over-black capture and the warm porch route with #144, the Present dependency section of the text report should be enough for the next comparison. The same save, cache seed and controller sequence will help identify whether the longer p95 comes from the same cause as the black scene.
@avatarmanz on GitHub · 2026-11-26 07:36 UTC · original
Left open: changes when dynamic descriptor ranges come back on every card; needs an in-game check on the 7900 XTX first.
@sawetco on GitHub · 2026-11-26 10:40 UTC · original
I repeated the two RTX 5070 captures requested above using the four-file instrumentation diff from #144 (
a6a6ef7) on the same #10 + #48 build as the original run. In the black transition, the Present dependency chain spends about 90% of its time inside D3D12 pipeline creation and library loading. During the porch walk those two calls account for about 36%.On the porch the largest single entry was a 154.30 ms
WaitOnAddresswhose waker the trace could not attribute. Another 99.85 ms was outside named spans onvictory-pipelines-2. The GPU timeline showed 613.42 ms and 379.72 ms per frame between this process’s submissions in the transition and walk respectively. Both captures reported zero lost events.RTX 5070 12 GB, driver 621.24, Ryzen 5 7600X, 32 GB RAM, Windows 11, hardware D3D12. Series X, 3840×2160 presentation to match the original report,
d78024b+ #48, dispatch split on. Same copied story checkpoint and cache seed. At launch there were 2,498 translated shaders and 195,034,430 bytes in the driver pipeline library. Same 18 stick inputs after 60 s on the porch. The second capture began 11.6 s into the walk. The full 30 s walk contained 84 measured host-present intervals, p95 703 ms, with tracing enabled.This narrows the black transition to specific driver calls. For the moving scene, identifying the waker of the unattributed wait would explain more of the tail. Thanks for adding the spans.
@battledogegames-design on GitHub · 2026-11-27 11:26 UTC · original
Thanks for the fence-based retirement work. We independently exercised both production paths at PR #48 commit
dca516de780ff3ebfa8d7a65600118787ab3437b, with the dynamic free-range allocator from PR #47 (025eddeadff7b61ee48ca039f95161809d015992) integrated by the supplied patch. All 120/120 fresh Windows processes passed.The fixture queried the device’s DXGI adapter by LUID and checked its software flag. Hosted WARP reported
0:6171, local WARP0:193cd, and the Radeon0:17705(PCI1002:73bf).Two gated submissions each owned four slots. Every run recorded fences
[1, 2]and checked both GPU readback words against[0xabc1, 0xabc2]. With relay enabled, fence 1 made only the first range reusable. With relay disabled, blocking settle kept both ranges reserved at fence 1 and returned both after fence 2. A repeated settle and recycling the old lists preserved the replacement reservations in both modes. The existing suites also passed in each environment: two allocator tests and three relay tests, including the sentinel, which also passed separately.The 120 runs used an experimental fixture. Preserving LF in the integration patch fixed the initial Windows checkout failure. To resolve Rust E0277, each scoped worker reconstructs a shared
Heapreference from its address. At this pin the owner lives through both joins, each worker mutates a distinctState, andreserve_dynamiconly takes the heap’s address for bookkeeping. Allocation uses the separately borrowed, synchronizedHostHeap. The cast bypasses the compiler’s cross-thread check and would need review if that method began accessing heap fields. For a maintainable upstream regression, one option is a typed heap identity captured before spawning the workers and an internal reservation method accepting that identity and the host allocator. This design was not implemented or tested.To reproduce from the extracted review packet in PowerShell, with Git, Rust 1.98.1 MSVC and the locked dependencies available:
For the full WARP and physical matrix, start from a fresh pinned checkout and omit
-Adapters warp. Then run./fixture/suites.ps1 -Fixture (Resolve-Path ./fixture).Pathfor both suite configurations. The physical fixture requires the selected D3D12 device to report the exact nameAMD Radeon RX 6800 XT, PCI ID1002:73bf, and a clear software flag. On other hardware, use the WARP commands above. A portable follow-up could accept an expected hardware adapter ID, select that adapter explicitly, and verify its identity against the created device while retaining every fence and readback assertion. Only the RX 6800 XT was validated on physical hardware.The accompanying pr48-public.zip contains the experimental fixture, integration patch, reproduction scripts, and sanitized per-process results. The reproduction runner adds Cargo JSON and exit-code logging after validation. We observed no reclamation defect in the tested configuration.
pr48-public.zip
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.