Repository navigation
D3D12.X: a full write-watch buffer goes on after its last page - #347
Conversation
refresh_once asked GetWriteWatch again from the range's start whenever its 16,384-entry buffer came back full. The pages already reported had been reset, but each call walked them again. A range with many written pages therefore cost more than one pass: 4 GiB with every page written took 105 ms a look, and 47 ms when each call starts after the last page reported. take_written does the look for one range and continues from there. Test: written_pages_past_a_full_buffer_are_all_found_once. A 64-entry buffer over 1,000 pages, with 857 and 128 pages written: each page is found once, in order, and the look resets them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
AMD run: Tested
Not tested
AI use
|
|
NVIDIA run with the negative control the AMD report above lists under Not tested: Tested
Reviewed (read the whole diff)
Not tested
AI use
|
|
The write-watch look measured past the menus on a retail title, for the HANDOFF Open item this PR names ("costs in proportion to their size at every submit … pending measurement past the menus"). This is a measurement of Setup: Per 2 s, one run (the cumulative
Example lines from the 30 fps loading screen, and from world loading: What it shows
Not tested: this PR's head; further into world loading than ~15 s (the commit limit on this machine); NVIDIA. AI use: Claude Code with Claude Opus 5.5 ran the builds and runs, the local instrumentation and the analysis, and wrote this report. The runs are from my machine. |
|
Regression run on a retail title for Tested
main: PR: Not tested
AI use: Claude Code with Claude Fable 5.2 made the runs with me present and wrote this comment. |
…, xcl-dev#490, xcl-dev#347) The fork keeps its own pso_async (short waits, all compute pipelines built ahead); xcl-dev#690 upstream is its used-pipelines part. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
refresh_oncelooks for CPU writes before each of the title's submits. When its 16,384-entryGetWriteWatchbuffer came back full, it asked again from the start of the range. The pages already reported had been reset, but every call walked them again, so a look over many written pages cost more than one pass.take_writtennow continues after the last page reported.Related:
What is in it
title_textures::take_written: one range's look, each call starting after the last page the previous one reported. The pages found, their order and the reset are the same as before.written_pages_past_a_full_buffer_are_all_found_once: a 64-entry buffer over 1,000 write-watched pages, with 857 pages written, then 128 (exactly two buffers full). Each page is found once and in order, and a second look finds none. When the line that moves past the reported pages is replaced withbreak(stop at a full buffer), the test fails.GetWriteWatch(WRITE_WATCH_FLAG_RESET)sequence with a 16,384-entry buffer on committed, resident, write-watched memory. Medians of 5–15 looks, Ryzen 9 9950X:The difference appears only once a look needs more than one call, i.e. more than 16,384 written pages (64 MiB).
Tested
cargo test --workspace -- --test-threads=4:d6cbfcdon85bdf21): 666 passed, 0 failed, 41 ignored over 16 test binaries (lib: 626 / 0 / 21). Two GPU tests print SKIPPED (no wave64 on this GPU):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.main85bdf21, the control: 665 passed, 0 failed, 41 ignored (lib: 625 / 0 / 21), the same two SKIPPED. The one test more is this PR's.d6cbfcdmerged ontomaina6f5f7a.scripts/test.ps1: 677 passed, 0 failed, 41 ignored, no SKIPPED GPU tests.d6cbfcdmerged ontomaina6f5f7a.cargo test --workspace -- --test-threads=4: 677 passed, 0 failed, 41 ignored (lib 637 / 0 / 21), the two no-wave64 skips. With the advance replaced bybreak, the new test fails on its first case (857 pages written).main85bdf21and this head: 910 and 912 frames, no crash or device removal (D3D12.X: a full write-watch buffer goes on after its last page #347 (comment)).Regression run
Our own runs, one after the other on the machine under Tested (RTX 5070 Ti), release builds, no uncommitted changes.
main:
PR:
Not tested
AI use
🤖 Generated with Claude Code