Identify residency and mapping waits by allocation kind #432
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/432"
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-27T04:52:54Z.
Refs #371
Jesper-Andersson reported a longest residency wait of 592 ms in run H with the own-bytes pool enabled. The longest mapping wait in that run was 35 ms. The existing counters gave totals across threads, so the log alone could not place either wait on the path to a Present. Run H and the request for instrumentation
A diagnostics build with
VICTORY_TIMELINEenabled now showsnew memory: residentaround the synchronousMakeResidentcall andnew memory: mappedaround the mapping barrier. The latter includes waiting for the shared queue lock, submitting the copy, and waiting for its fence if needed. Both spans end before the counters are reported. WithVICTORY_WAIT_RESIDENT=0, both functions return before creating a span or counting a sample.Each existing summary now includes an
allocation_kindsfield with a count, total microseconds, and maximum microseconds for each kind. The resident summary still reports every 1,000 calls. The mapped summary reports on the first call and every 200 calls. The counters distinguish textures (including depth twins), new texture-pool heaps, upload buffers, shared buffers, CPU-mapped card buffers, and device-local UAV buffers. Each label identifies the allocation that requested the wait. For example, staging blocks and other users of the upload-buffer helper share its label. That helper callsMakeResidentand then maps the resource for the CPU. It contributes only to the resident summary.Windows CPU verification
Listed the two tests first in each configuration, then ran each by its full name with one test thread. Default features passed 2/2 and
diagnosticspassed 2/2. Synthetic resident samples of 10 and 30 µs for textures and 7 µs for a shared buffer produced 3 calls, 47 µs total, and a 30 µs maximum. An independent 7 µs mapped sample counted only in the mapping summary. The tests also check the formatted allocation labels and the two reporting intervals.Local tests cover diagnostic accounting. No D3D12 device, WARP, or game was run, and no frame times were measured.
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.