You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
D3D12.X: CPU-write looks on the submit path: measure and turn on XCL_LOOK_AHEAD (former workstream 8, part 3) #3435
The CPU-write looks before each ExecuteCommandLists still take a large share of the submitting
thread's time, and two switches that move part of that work off the thread are off by default
with no measurement on a title. This picks up the write-watch cadence part of the former
workstream 8 (per-frame memory traffic on the submit path). That workstream was claimed in #2688,
which no longer opens. It was part 3 of @Decodere's plan: "evaluate whether per-frame write-watch
look coalescing beyond XCL_LOOK_SKIP helps". Parts 1 and 2 (#2729, #2749) and the XCL_LOOK_SKIP fix (#2768) were merged on 2026-11-28; part 3 has had no activity since 2026-11-26. @Decodere, if you are still on it, say so and I will step back.
What was measured (main d8bd9a3, which has #2729 / #2749 / #2768; RTX 2070 SUPER 8 GB, retail
game, XCL_ACTIVITY=1): the "looks before submits" took a mean of 8.8 % of wall time in menus and
14-16 % in 300-600 s runs. The peak was 65 % of one 2 s window. In one example window: write-watch
86 ms over 5.5 GB, sparse uploads 102 ms.
What already exists (hle/d3d12x/title_textures.rs):
XCL_WATCH_HOT (on): a look takes only recently written 2 MiB blocks, and a thread walks the rest.
XCL_LOOK_AHEAD=<ms> (off): a thread takes the hot blocks' written pages between submits. What
is uploaded, and when, stays the same; the cost moves off the submitting thread.
XCL_LOOK_SKIP=1 (off): a submit whose lists were all closed before the last look began skips
its own look. Unlike look-ahead, this changes what a submit sees: a CPU write between the list's
close and its submit waits for the next look.
Plan:
Measure, no code: the same exe and warm cache; default vs XCL_LOOK_AHEAD=2 vs XCL_LOOK_AHEAD=2 XCL_LOOK_SKIP=1, all with XCL_LOOK_STATS=2. Results posted here with the
exact commands.
Turn look-ahead on by default (it does not change what is uploaded), with XCL_LOOK_AHEAD=0 to
turn it off. XCL_LOOK_SKIP stays opt-in unless the measurement makes a case for it, in a
separate PR.
If the remaining time is in sparse::before_execute (chunk compare plus upload) or in the
texture uploads, a proposal here before any code.
Related, not covered here:#2891 (write-watch merge gap, cold-chunk tiering), #3010
(tile-mapping fence), #2955 (present split under XCL_LOOK_STATS=2), and @oni-swr's measurement of
the untimed vram::before_execute.
Machine for my runs: RTX 2070 SUPER 8 GB (driver 621.40, 32-lane waves), Ryzen 5 3600XT, 32 GB,
Windows 11 26300, release builds. AMD runs would help once step 1 is posted.
AI use: Claude Code (Claude Opus 5.5) read the code and drafted this issue.
@clusterbrandon65 Could you please tell me what you compiled the .exe in the zip from? I'd rather not run random .exe's from zips... If you could detail what commit you compiled from, and all the flags you used!
Activity
KOLESNiii commentedon Nov 29, 2026
@clusterbrandon65 Could you please tell me what you compiled the .exe in the zip from? I'd rather not run random .exe's from zips... If you could detail what commit you compiled from, and all the flags you used!