Find the destination heap once per descriptor copy, not per descriptor #62
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/Belobug--VIctory-Belobug-AMD!62
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@romainhedouin on GitHub · 2026-11-25 13:14 UTC · original
romainhedouin:perf/descriptor-copy-one-lock→a-publier· +63 −39 · 1 files · 1 commits · openWhen 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
@ -163,0 +159,4 @@let mut next = u64::MAX;for &(start, end, heap) in heaps.iter() {if (start..end).contains(&at) {found.get_or_insert((end, heap));@gut0to on GitHub · 2026-11-25 15:09 UTC · original
The 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.
@gut0to on GitHub · 2026-11-25 15:09 UTC · original · reviewed
AI-assisted review: I checked the changed behavior and the associated test coverage.
744c52c653to00c88383cbView 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.