D3D12.X: a command list is forgotten after the runtime frees it, so a new list at its address can lose its state #2680
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by SergeAx on 2026-11-26T06:26:53Z.
real::cl_release(hle/d3d12x/real.rs) drops what XCL keeps by a PC command list's address (list_x::on_releasewithalloc_pool::forget_list,bind::forget,dred::forget_list) only after the runtime's finalReleasehas freed the list. A list made on another thread in between can get the same address and lose its own entries: its bind state (pipeline, allocator, unified-memory blocks), its allocator and last submit inalloc_pool, and its DRED marks.title_list::releasedoes the same with a longer window (#1453 removes that one), and so doespso_releasefor pipelines (#2422).Found on
mainb49be183, debugMeasured
Releasegives its address to a new list at once (bind::reset,alloc_pool::created_on) fails onmain: aftercl_releasethe new list has no bind state and no allocator.--test-threads=4 hle::d3d12x::list_x, the builds alternating run by run:list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit(#42) failed in 13 of 200 runs onmain, 6 of 200 withcl_releaseforgetting first, 0 of 400 with #1453, and 0 of 400 with both. Most of it is the longer window oftitle_list::release: with #1453 alone it did not fail in 400 runs, so this window has not been seen to fail a test on its own.list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list(#42) is not explained by it: it failed in a full-suite run withcl_releaseforgetting first (Reset #139 recorded on the PC list still on the GPU).Plan
As in
res_releaseand #2422: on the last reference (AddRefsays 2),cl_releaseforgets the list before the runtime's finalRelease. When two last-but-one releases happen at once, both miss being the last, and the list is forgotten after its release, as before. That test becomes the regression test.AI use: found with Claude Code (Claude Opus 5.5), which ran the measurements above and wrote this issue.
Imported from ivall/xcl. Originally posted by SergeAx on 2026-11-28T06:41:06Z.
Fixed on
mainby309e3557, the change from #2691, which came in with #2959's stack.