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
startup: a 16 MiB table buffer copy is compared in full on every draw under draw_lock; the late load stalls on it #2976
In the main executable's startup run (#870), frame rate falls from about 30 fps to 4–9 fps once the post-confirm load starts. Local timers (logging only, not in any PR) put about half of the stand-in's busy threads in waits for draw_lock, and trace the hold to one buffer copy.
Windows 10 22H2, i7-4790K, RTX 3080 Ti, NVIDIA 32.0.16.1047, release on 6ee878d8 + #2949, warm shader cache, run.ps1 -Render without -Translate, scripted input, 250 s. Figures for 150–240 s, as busy threads (summed time per wall second):
Stand-in list time
3.5–3.7 threads
Waiting for draw_lock
~1.9 threads (mostly list Reset cleanup and Dispatch)
draw_lock held
~58 % of the time, ~83 % of that by draw_translated (~490 µs per draw)
Thread CPU time during the draw hold
82 % of wall time (work, not page faults)
frame_copy share of the draw hold
86 %
One view's share of frame_copy time
97 %
That view: a raw buffer view the title creates (device slot 18) over a 90 MiB slot 133 placed buffer that aliases title memory (placed ... aliased), bound from the descriptor table by two vertex shaders. frame_copy cuts it to 16 MiB.
About 140 draws per second find it already copied this frame, and each confirms that with a 16 MiB memcmp against the kept bytes (~2.2 ms, ~85 % of frame_copy time). Nearly every comparison matches.
The shaders read it at data-dependent offsets, so the read extent is not known from the shader.
Side effect of the cut: reads past 16 MiB of this view see zeros. Not checked whether the shaders reach there.
Proposed in #2977: an opt-in X2W_D3D12_TABLE_ALIAS=1 that binds the alias for a table buffer view whose whole range lies in an aliased placement. The GPU then reads the bytes at execution, not at record time, as on the console. The default stays as on main.
This report was prepared with AI assistance (Claude); the runs are mine.
Activity
startup: opt in to placed buffer aliasing for table SRVs (R0Y00#2977)