startup: slot 44 copies a 64 KiB root SRV window at every call, but no draw reads the copy #3027

Closed
opened 2026-11-27 08:04:43 +00:00 by lukaslw-lab · 0 comments
lukaslw-lab commented 2026-11-27 08:04:43 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-27T08:04:43Z.


In the main executable's startup run (#870), list slot 44 (SetGraphicsRootShaderResourceView) is called about 23,000 times per second late in the load with title addresses that have no upload mapping. Each call copies a 64 KiB window of title memory into the upload ring (list_root_srv → readable_window + upload_from_title) for the desktop binding.

No draw reads that binding:

  • Translated draws set their own root signature and copy the SRV from its title address at the draw (pass.root_address, source == 2 in draw_translated).
  • Only list_draw's real-pipeline path and an indirect graphics draw on the title's root signature read the desktop binding. A real stream pipeline is built only over a root signature without bindings (build_stream_pipeline, root_without_bindings), and the run logs draws 0 for real-pipeline draws.

Windows 10 22H2, i7-4790K, RTX 3080 Ti, NVIDIA 32.0.16.1047, release on main 98e4a2ee, warm shader cache, scripted input, 250 s, X2W_D3D12_RING_RELEASE_AT_SUBMIT=1 and X2W_D3D12_TABLE_ALIAS=1, two runs:

150–240 s
slot 44 calls per second 23,000–28,000
stand-in time in slot 44 1.14–1.19 threads (43–49 µs per call)
upload ring bytes copied by slot 44 about 1.4–1.7 GiB/s
mean frame rate 6.3 / 7.1 fps

The copies are also most of the ring traffic behind #2948: without any opt-in switch, deferring them leaves 88 instead of 164,727 null bindings with cause buffer in the same run.

Proposed in #3028: an opt-in X2W_D3D12_ROOT_SRV_AT_DRAW=1 that keeps the address pending at slot 44 and makes the same copy only at a draw that reads the binding. The default stays as on main.

This report was prepared with AI assistance (Claude); the runs are mine.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6642476612 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3027). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-27T08:04:43Z. --- In the main executable's startup run (#870), list slot 44 (`SetGraphicsRootShaderResourceView`) is called about 23,000 times per second late in the load with title addresses that have no upload mapping. Each call copies a 64 KiB window of title memory into the upload ring (`list_root_srv` → `readable_window` + `upload_from_title`) for the desktop binding. No draw reads that binding: - Translated draws set their own root signature and copy the SRV from its title address at the draw (`pass.root_address`, `source == 2` in `draw_translated`). - Only `list_draw`'s real-pipeline path and an indirect graphics draw on the title's root signature read the desktop binding. A real stream pipeline is built only over a root signature without bindings (`build_stream_pipeline`, `root_without_bindings`), and the run logs `draws 0` for real-pipeline draws. Windows 10 22H2, i7-4790K, RTX 3080 Ti, NVIDIA 32.0.16.1047, release on `main` `98e4a2ee`, warm shader cache, scripted input, 250 s, `X2W_D3D12_RING_RELEASE_AT_SUBMIT=1` and `X2W_D3D12_TABLE_ALIAS=1`, two runs: | | 150–240 s | |---|---| | slot 44 calls per second | 23,000–28,000 | | stand-in time in slot 44 | 1.14–1.19 threads (43–49 µs per call) | | upload ring bytes copied by slot 44 | about 1.4–1.7 GiB/s | | mean frame rate | 6.3 / 7.1 fps | The copies are also most of the ring traffic behind #2948: without any opt-in switch, deferring them leaves 88 instead of 164,727 null bindings with cause `buffer` in the same run. Proposed in #3028: an opt-in `X2W_D3D12_ROOT_SRV_AT_DRAW=1` that keeps the address pending at slot 44 and makes the same copy only at a draw that reads the binding. The default stays as on `main`. This report was prepared with AI assistance (Claude); the runs are mine.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#3027
No description provided.