Preserve full guest addresses when deduplicating BVH builder memory operations #236
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!236
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-236"
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?
@feanorsun on GitHub · 2026-11-26 12:15 UTC · original
feanorsun:fix/bvh-builder-memory-keys→main· +89 −2 · 2 files · 1 commits · openFixes #202
The BVH builder used bits 2 through 32 of the guest address to deduplicate work within a command-list recording. After
0x1_0001_0000, a request at0x3_0001_0000produced the same key and could skip a second write preparation or small-buffer copy-back registration.Record
Write(at)for the incoming root address andBack(start)for the buffer start returned byshadow::in_buffer. The low two bits matter becauseRoot::Viewpasses the byte address through, buffers are registered at their exact starts, andMemory::smallprocesses the byte range[start, start + len).Each command list owns its set in
Deferred. An exact repeat of the same operation is skipped until reset replaces that recording's state.HostList::untouchedcounts a recorded builder operation as work, as it did when the old keys lived in the texture set.Thanks to FunWithFlagsDev for identifying both collisions, providing the 8 GiB counterexample and proposing the typed per-recording keys. This change integrates that approach with the current command-list state and adds separate native regressions for the write and copy-back paths.
Windows verification
Both listings found five tests. For the baseline, the same recording method inserted the two original expressions into the original set. Two tests passed and three failed. Write and copy-back independently rejected
0x3_0001_0000after0x1_0001_0000. Both also rejected the next byte,0x1_0001_0001, in the same dword.With typed keys, all five passed, including exact repeats, distinct operations, independent recordings and reset. These tests use integer addresses and CPU recording state. An earlier PowerShell invocation accidentally split
--listinto single-character filters and ran other library tests, including WARP tests. The counts above are from the subsequent module-filtered runs.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.