Repository navigation
Conversation
…et by that write `wait_memory` drops a Wait32/64BitValueX on an address the same list already wrote (`has_prior_write`): the GPU reaches the write first, and polling the address before the list is submitted would only time out. The two writers that go to the CPU instead (`cpu_writes`: a Write32/64BitValueX into the title's own memory outside the unified-memory windows, and a timestamp there) did not record their range, so a wait on it later in the list stayed: it was polled before the list was submitted, while the CPU makes the write only after the submit, and it ran into the wait timeout every time. Both now record the range (`note_write`) as the GPU writers do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Regression pair for Tested
this PR,
Not tested
AI use: Claude Code (Claude Opus 5.5) |
|
Independent Windows run on 23d1aa8. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, debug.
I extended the checked-in timestamp fixture in a scratch copy. One native D3D12 list recorded a 32-bit immediate write, two 64-bit timestamp writes, and matching waits on all three CPU-memory destinations. All three destinations were zero before submission. The recording left only an unrelated wait pending. Once I satisfied that wait, one native submission delivered the immediate value 42 and both nonzero GPU timestamps. The device remained healthy. Restoring the original recording code left all four waits pending and failed the assertion before submission.
|
|
AMD RX 7800 XT test report Tested locally by merging PR head Hardware and tools: AMD Radeon RX 7800 XT, driver 32.0.31035.1003; Windows 10 Pro; Rust 1.100.0 / Cargo 1.100.0; DXC 1.8.2502.11 (DXIL 1.8.2502.11). Debug test build.
Not tested
AI use |
bmjask
left a comment
There was a problem hiding this comment.
P1: this removes a wait after a CPU-emulated title-memory write as if the write were GPU-ordered. write() queues cpu_writes::Write::Immediate then note_write; wait_memory sees a prior write and drops the wait. But cpu_writes::after performs the immediate write only after a fence for the submitted list completes. Thus intended write -> wait -> later commands becomes entire list (including later commands) -> CPU write; no PC/GPU write orders the marker before post-wait work. Timestamp readbacks have the same issue. Split/fence/write before the post-wait segment, or retain waits for CPU-emulated writes. The test only asserts removal and does not execute/verify ordering.
|
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head Hardware & environment
Unit / GPU tests (
Combined retail sanity run (
Not tested
AI use
|
|
@bmjask Agreed on P1: this doesn't order the CPU-emulated write before the commands after the wait. For context, The proper fix is what you describe: split the list at such a wait and make the write (or a GPU write of the same value) before the post-wait part. That is a bigger change in AI-assisted (Claude Code, Claude Opus 5.5). |
wait_memorydrops aWait32/64BitValueXwhose address the same list already wrote (has_prior_write): the GPU reaches the write before the wait, and polling the address on the CPU before the list is submitted would only run into the timeout. Two writers do not record their range, because they go to the CPU instead (cpu_writes):Write32/64BitValueXinto the title's own memory outside the unified-memory windows;So a wait on such an address later in the same list stayed.
execute_with_waits_onpolled it before submitting the list, while the CPU makes the write only after the submit, so every such wait ran out its timeout and was then let through. Both writers now record the range, as the GPU writers (write,fill,CopyMemoryToMemoryX, timestamps into a window) already do.Found while checking defect 1 of @chazi123's report on #646 ("the CPU poll for a list's Wait ran before that same list was submitted"). For writes into the unified-memory windows,
mainalready drops or splits such waits. This was the one path where it can still happen. I can't tell whether it is the case in that report (their counter is in a window), so this PR does not claim to fix the+0x23cf683stop.What is in it
hle/d3d12x/list_x.rs:write()'s title-memory branch andtimestamp()'s readback branch callnote_writefor the range they queue.a_wait_after_a_title_memory_write_in_the_same_list_is_met_by_it: a synthetic list writes a heap word throughwrite()(no unified memory in the test, so it takes the CPU path), then waits on it and on another word. Only the wait on the other word may stay. It fails onmain(2 waits left) and passes here. It needs no GPU.Tested
cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4:23d1aa8): 752 passed, 0 failed, 41 ignored;main930e8b4: 751 passed, 0 failed, 41 ignored.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.Regression run
From Kalmarv's run (#1256 (comment)), thanks:
main:
PR:
Limits (from bmjask's review): the write stays CPU-emulated and is made only after the whole list's fence completes (
cpu_writes::after), so commands after the dropped wait can run before the marker or timestamp lands.mainhas the same ordering (its CPU poll of the wait times out and lets the list through); this PR removes only the timeout. Ordering it properly means splitting the list at such a wait, which is a separate, larger change.Overlap with #2506 (tiagonleal): #2506 drops a same-list wait only when the value the list wrote meets it, and keeps dropping it when no value is recorded. This PR records the title-memory and timestamp writes with
note_write(no value), so on top of #2506 it would drop those waits whatever the value. The two conflict inlist_x.rs. If #2506 lands first, I'll rebase this so the title-memorywrite()records its value through #2506'snote_write_value, and the timestamp readback (value unknown) no longer drops a wait.Not tested
AI use
🤖 Generated with Claude Code