Repository navigation
Conversation
…list split() closed the title's list and only then reset a spare or made a new list for the next segment. When CreateCommandList failed there, it returned with the list already closed and the wrapper still on it: what the title recorded after the Wait went into a closed list and was lost, Write64 cell writes included (a cell then stays recorded and never submitted, as in xcl-dev#1452), and the title's own Close failed. The next segment is now had first: a spare, or a list made closed on no allocator with CreateCommandList1 (create_closed_pc_command_list). It is reset onto the allocator only after the Close, since an allocator backs one recording at a time. With no segment to be had, the list stays open and the wait stays in it, as with XCL_SPLIT_MIDLIST_WAIT=0. A failed Close puts the segment back as a spare; a failed Reset of it falls back to CreateCommandList on the allocator, as before. Part of xcl-dev#1452. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Update for head AMD run (listed as untested): the new test passes on an RX 9070 XT, and the Head
Not tested: the reporter's route on the RTX 3060. There is no title here, and the new test always uses the default adapter, so it did not run on the RTX 3060. Also not tested: Intel, a real |
luckyteagirl
left a comment
There was a problem hiding this comment.
At exact head 7fce129 on current main b49be18, a failed Reset abandons an owned command-list reference. This is a source-derived review; I did not inject a D3D12 Reset failure.
The no-spare path now gets next from create_closed_pc_command_list, whose normal-device branch transfers ownership with into_raw() and adopts it. After the current list closes, split tries reset_list(next, …). If that Reset fails, the branch at list_x.rs:2834–2845 replaces next with a separately created fallback list or returns None; neither outcome releases or pools the failed next. The earlier code had a similar hole for a popped spare, but this PR makes a fresh list reachable through the failure path too, including when resource pressure is already causing Reset/creation failures.
Could the failed next be released through the adopted-list cleanup path before trying the fallback (rather than reusing a list whose Reset failed)? A fault-injected Reset failure with both successful and failed fallback creation could assert that the abandoned list's COM reference is released exactly once.
AI assistance: three GPT-6.2 Sol agents independently identified the ownership path; GPT-6.2 Astra checked the exact-head source and wording.
When the Reset that opens a split's next segment failed, split() made a list in its place (or gave up) and dropped the failed one without a Release: with the next segment now made by CreateCommandList1 when there is no spare, that leaked a fresh list. It is released now (title_list::release_segment, as the recording's segments are at its Release), before the fallback is made. The test fails the Reset and, in its second half, the fallback too (test-only switches), and checks that the list's reference was released once in both. Part of xcl-dev#1452. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The title ran the same with this pull request as without it, in 2 runs of each under Wine + vkd3d-proton on an RTX 4070. Each run split one list around a mid-list Wait, 0.6 to 2.5 s after the title's first call to the stub Setup:
Read: the split now takes its next segment (a spare, else Not tested: Windows; a split whose next segment cannot be made, in the title; the whole test suite. AI use: Claude Code (Claude Opus 5.5) ran the title and the tests and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. |
The transactional split already reserves a closed continuation before closing the producer, but a cache miss made a private allocator, opened a list on it, and closed the list only to Reset it later onto the title allocator. CreateCommandList1 directly makes the required closed allocator-free object. Use that path when ID3D12Device4 is available and retain the existing allocator-backed path for older devices and Close-failure injection tests. This preserves the integrated preflight/commit/rollback model and allocator generation tracking. The Windows GNU library/test cross-check passed with existing warnings. Windows MSVC, GPU tests, and title smoke were not available here. Adapted from the CreateCommandList1 reservation concept in xcl-dev#2717 by Kalmarv with Claude Code (Claude Opus 5.5); its core close-before-create fix was already superseded by the integrated transactional split. Assisted-by: Codex (GPT-5.6-sol)
|
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2717 at Setup
Targeted RTX 4060 release unit tests (
|
|
@luckyteagirl Thanks, confirmed and fixed in Thanks @DarkPanda69 for the RX 9070 XT and RTX 3060 runs of AI use: Claude Code, Claude Opus 5.5 wrote the fix, the test and this reply. |
The transactional split already reserves a closed continuation before closing the producer, but a cache miss made a private allocator, opened a list on it, and closed the list only to Reset it later onto the title allocator. CreateCommandList1 directly makes the required closed allocator-free object. Use that path when ID3D12Device4 is available and retain the existing allocator-backed path for older devices and Close-failure injection tests. This preserves the integrated preflight/commit/rollback model and allocator generation tracking. The Windows GNU library/test cross-check passed with existing warnings. Windows MSVC, GPU tests, and title smoke were not available here. Adapted from the CreateCommandList1 reservation concept in xcl-dev#2717 by Kalmarv with Claude Code (Claude Opus 5.5); its core close-before-create fix was already superseded by the integrated transactional split. Assisted-by: Codex (GPT-5.6-sol)
A mid-list split (a
Wait64BitValueXafter aWrite64BitValue*in the same list) closed the title's list before it had the next segment. When the next segment could not be made (CreateCommandListfailed), the split gave up with the list already closed: the title went on recording into a closed list. All of it was lost, Write64 cell writes included, and the title's ownClosethen failed. Now the split gets the next segment first: a spare, or a new list made closed withCreateCommandList1. It is opened on the allocator only after the Close, because an allocator backs one recording at a time. When none can be had, the list stays open and the wait stays in it, as when the split is turned off (XCL_SPLIT_MIDLIST_WAIT=0).Part of #1452. This may not be what stops the reporter's run (#1452 (comment)), where a Write64 cell is recorded and never submitted. That log shows a successful split (
#1) and, in what was posted, nomid-list split … CreateCommandList failedwarning. This is one path that gives that state; #2691 (a list forgotten after the runtime frees it, so a new list at its address loses its Write64s) is another. The dump line that tells them apart is in #2718 (stacked on #2244). @xpatfussy69x, if you can: one run of your route with that PR andnvidia-smi dmon -s pucm -o Tbeside it, plus anymid-list splitlines from the log.What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:splittakes the next segment (next_segment_list) before it closes the list. A failed Close puts the segment back as a spare. A failed Reset of it releases that list (title_list::release_segment) and falls back toCreateCommandListon the allocator, as before.crates/xcl/src/hle/d3d12x/real.rs:create_closed_pc_command_list(CreateCommandList1, closed, no allocator), next tocreate_raw_pc_command_list.23d3131(luckyteagirl's review): before, a next segment whose Reset failed was dropped without a Release, and now a fresh CreateCommandList1 list could take that path. It is released before the fallback is made. Testa_split_whose_next_segment_fails_its_reset_releases_that_list_once: the Reset fails (a test-only switch), once with the fallback made and once with it failing too. Each time the list's reference must be released exactly once.a_split_without_a_next_segment_leaves_the_list_recording: a split with no next segment to be had (a test-only switch), then one that makes its segment with CreateCommandList1. A GPU write recorded after each wait must land, and both Write64s must count as submitted.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4at23d31316(onmainb49be183): 1435 passed, 2 failed, 47 ignored. The 2 aregpu::recomp::link_tests::gpu_linked_memory_accessorsandlinked_programs_keep_their_declarations: this machine's DXC (Windows SDK, 1.7.2308) rejects[WaveSize]on a function that is not an entry point. They fail the same way onmain's code.V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32),heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowsa_split_without_a_next_segment_leaves_the_list_recordingfails withmain'ssplitand the same switch (the list is closed after the failed split, so the next split's Close fails and no segment is made: 1 segment, expected 2), and passes with this change.a_split_whose_next_segment_fails_its_reset_releases_that_list_oncefails with therelease_segmentcall taken out (the list's reference is still held:the split released the list whose Reset failed, once), and passes with it.7fce129(D3D12.X: a mid-list split gets its next segment before it closes the list #2717 (comment)):a_split_without_a_next_segment_leaves_the_list_recordingpasses on an AMD Radeon RX 9070 XT (driver 32.0.32029.2010).cargo test -p xcl --lib -- d3d12x::gave 255 passed, 0 failed, 2 ignored on it and on an RTX 3060 (driver 32.0.16.1088). The test uses the default adapter, so it did not run on the RTX 3060.7fce129under Wine 11.21 + vkd3d-proton on an RTX 4070 (D3D12.X: a mid-list split gets its next segment before it closes the list #2717 (comment)): 2 runs with and 2 without, each with one successful mid-list split and no difference between the two.a_split_without_a_next_segment_leaves_the_list_recordingpassed under Wine. The failure path this PR changes (a split whose next segment cannot be made, or whose Reset fails) was not reached in those runs.23d3131on an RTX 4060 8 GB (driver 621.14), release. Both split tests passed, includinga_split_whose_next_segment_fails_its_reset_releases_that_list_once;title_list::3,list_x::42 andreal::60 passed, with no skips. A paired 60 s smoke of another title,mainb49be18against23d3131: 1518 against 1547 frames, no device removal, no crash. The full suite, AMD, Intel and Wine were not run there.Regression run
main (
b49be18):this PR (
23d3131):Not tested
23d3131's test on AMDCreateCommandListor Reset failure: the tests switch them offsplit command listline in either log), so they check the rest of the runtime onlyAI use
🤖 Generated with Claude Code