Find the destination heap once per descriptor copy, not per descriptor #62
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/62"
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 Belobug/VIctory-Belobug-AMD. Originally posted by romainhedouin on 2026-11-25T13:14:44Z.
When the title copies N descriptors (
CopyDescriptorsSimple), each copied slot was mirrored to the host on its own: it took theSHADER_HEAPSlock, scanned the list for the heap holding the slot, and locked that heap'spendinglist. The heap is now found once for each run of slots in the same heap (a run stops where another heap starts, so overlapping heaps give the same answer as before), andCopyDescriptorsno longer builds twoVecs of ranges per call.SHADER_HEAPSread-lock acquisitionspendinglocksVecallocations perCopyDescriptorsTested: counts from the code; a standalone model of the per-slot lookup against the run lookup agreed on 3,000,000 random cases (overlapping and adjacent heaps, mismatched steps); type-checked for Windows (
cargo clippy --target x86_64-pc-windows-msvc, with and without--all-features, no new warnings), not run.🤖 Generated with Claude Code
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by gut0to on 2026-11-25T15:09:09Z.
Review: COMMENTED
AI-assisted review: I checked the changed behavior and the associated test coverage.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by gut0to on 2026-11-25T15:09:09Z.
Code review location:
crates/victory-gpu/src/descriptor.rs; line 162The standalone model covers overlapping heaps, but could we keep one overlapping-heap case as a Windows unit test for mirror_range? The found.get_or_insert choice and run cutoff intentionally preserve the old first-containing-heap behavior, which is subtle and otherwise has no repository regression test. AI-assisted review; I checked the production path and the test coverage described in the PR.
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.