watch::guard re-protection (~75 ms/frame) & CPU prep: hot-block pinning + pipelined frame prep #1238
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/fxceless--victory-fork#1238
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Marukooh on GitHub · 2026-11-26 01:28 UTC · original
Summary & Measurements (RTX 5070 Ti + Linux/Proton)
In heavy prologue windows (2,500–6,000 draws/frame, zero pipelines compiling), CPU
preparing+copy-backstill dominate frametime even afterVICTORY_HOIST_CLAMPS=1andVICTORY_VIDEO_BUDGET_MB=10500(~127–148 ms/frame total, ~41–46 ms GPU).Adding per-frame instrumentation on
watch::guard(watch::ASKS/watch::WALKS) showed where the CPU time goes across ~60 submissions/frame:GetWriteWatchcalls: 1,400–3,100 / frame (1.7–3.9 ms total — the syscall itself is cheap)Batching contiguous blocks under a single lock and tracking absent ranges (
guard-bake+guard-light+VICTORY_BACK_OWN_VIEW=1) already cut our synthetic memory benchmark from25.04 → 6.94 ms(alias views) and1.22 → 0.033 ms(reserves), bringing Series X prologue median down to 127.25 ms/frame (copy-back 63.3 → 42.95 ms, CPU preparing 79.6 → 59.95 ms).Proposals to cut CPU overhead further (toward < 10 ms)
Many blocks touched by
watch::guardare rewritten by the title every single frame. Pinning blocks that were dirtied for N consecutive frames (leaving them unprotected / treated as dirty until idle for a few frames) directly eliminates most of the ~74.8 ms re-protection churn without changing the overall memory model.Currently
preparing,copy-back, andPresentrun synchronously in sequence (framelogshows waits inside submission/completion handling while actualPresent+ final copy is ~0.1–0.2 ms). Moving list/descriptor prep and landing-buffer staging to a worker with double/triple-buffered landing rings lets CPU prep overlap with the ~45 ms GPU execution.#1233) and the readback coalescing work (#1229,#1230,#1232) once hot-block pinning removes theVirtualProtectfloor.