Preserve full guest addresses when deduplicating BVH builder memory operations #236
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from avatarmanz/VIctory-7900XTX. Originally posted by feanorsun on 2026-11-26T12:15:16Z.
Fixes #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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.