GPU: find enclosing buffers behind shorter registrations #1142
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1142
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1142"
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?
@UwUCammie on GitHub · 2026-11-25 21:33 UTC · original
UwUCammie:pr/shadow-containing-ranges→main· +143 −29 · 1 files · 2 commits · openA view can fall inside a registered buffer even when 64 more recent starts lie between the buffer and the view. If those shorter buffers end before the view does, the lookup used to miss the enclosing buffer and make a separate window over the same bytes. The remap path had a similar cutoff at 256 entries. It also missed a placed window starting more than one 4 MiB grid cell before the remap.
The registered-buffer search checks the nearest start first. Beyond one 64 KiB page it checks only buffers longer than a page, stopping when even the longest registered buffer could not reach the request. The latest start that contains the full view still wins. Remapping checks placed windows against their full extents.
Three synthetic regressions cover 300 short intervals inside a larger one, replacing and removing long buffers, half-open boundaries and a remap in the third cell of a window. All 33 shadow tests and 22 tests matching
host::testspassed in the Windows x64 diagnostics build under Wine 11.22. I haven’t measured how often these misses occur in gameplay.@Filip722 on GitHub · 2026-11-25 23:56 UTC · original
I ran the three
shadow::buffer_map_tests::regressions from1c0377dcunder GE-Proton11-14 and all three passed.In a one-launch-per-arm Series S comparison on Bazzite 44, RTX 5060 Laptop 8 GB, NVIDIA 615.78.08 and vkd3d-proton
cae8353ed7959c4+, both arms used the same initial prefix, shader cache, source base and launch settings. The treatment added this PR. At the guarded loading transition, cumulative successful loose shared-window allocations were 1,672 MiB on the control and 1,316 MiB with this PR. Registered shared buffers were approximately 487 MiB in each. Both runs stopped on host memory pressure before the first observed upscale dispatch. The counters measure successful allocation traffic through each stop, and the launches advanced for different durations.Test and report prepared with assistance from OpenAI Codex.
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.