D3D12.X: a put-off call's segment that does not close is not submitted #2612
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2622"
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 KDenKC on 2026-11-26T02:50:14Z.
Related: #2118 (the put-off-to-the-submit path), #2088. Found by @KOLESNiii in a static review (https://github.com/xcl-dev/xcl/issues/2088#issuecomment-7179478338).
The path that puts a call off to a segment of its own, recorded at
ExecuteCommandLists(#2118), ignored the nativeCloseresult twice:deferred_segmentclosed the new empty segment and added it to the recording whateverClosereturned;record_deferredclosed the segment after recording the call, ignored the result, and made it the next segment's predecessor.A segment whose recording the runtime refused was then submitted with the rest. In a test, submitting one removed the device (
0x887A0001, an invalid call).What is in it
Review fix
f0f9daee(thehollowedone's finding, https://github.com/xcl-dev/xcl/pull/2622#issuecomment-7187891221): a put-off segment whose nativeClosefails is released instead of being kept as a spare (a spare that cannot be reset lost its owning reference), in bothdeferred_segmentanddrop_segment, and its dispatch-chain predecessor entry is cleared. This is their patch and test, with one change: the first-refusal release goes through the adopted vtable likedrop_segment, socl_releasecleans the list's address-keyed state.crates/xcl/src/hle/d3d12x/list_x.rs:segment_close: the native Close of a put-off segment, with its HRESULT (and a test-only hook).deferred_segment: if the empty segment doesn't close, it isn't used; the list goes back to the spares and the call waits in its list, as it did before #2118.record_deferred: if the segment doesn't close after the call is recorded, it leaves the recording (title_list::drop_segment; it stays with the spares and is released with them). A list whose Close failed is still open and can't be Reset (E_FAIL, measured), so it can't be emptied. The call is dropped and counted (as a failed Reset there already is), the next segment doesn't follow it, and a warning is logged.crates/xcl/src/hle/d3d12x/title_list.rs:drop_segment.Tests:
a_put_off_call_whose_close_fails_is_not_submitted: the replay's recording is made to fail in the runtime (a query begun and never ended); the submission still runs and its fence is signalled, and the device stays.a_put_off_segment_that_does_not_close_is_not_used: nothing is put off when the empty segment doesn't close.Wine/vkd3d-proton test skip
8cb07b8d+b4a8ad86(test-only): @Royalflamejlh found that vkd3d-proton acceptsClosewith a query left open, soa_put_off_call_whose_close_fails_is_not_submittedfailed 5 of 5 there (https://github.com/xcl-dev/xcl/pull/2622#issuecomment-7201103492). The test now uses the replay's actualCloseresult: a runtime that accepts it skips this one test (releasing each owner once); a refusing runtime runs it in full as before. Based on their suggested change (credited).b4a8ad86removes the twounused_unsafewarnings @Decodere reported (https://github.com/xcl-dev/xcl/pull/2622#issuecomment-7206727902).Tested
Review fix
f0f9daee, RTX 5090,XCL_NETWORK=0: thehollowedone's reference-count test on the previous head: 0 passed, 1 failed (finalReleasereturned 1); with the fix:a_put_off_2 passed, 0 failed (finalRelease0).list_x42 passed, 0 failed, no SKIPPED.cargo build --workspacepassed. The smoke pair below ismainagainst this head (200 s, same recipe).b4a8ad86, RTX 5090:put_off3 runs × 2 passed, 0 failed, both tests RUN (not skipped) on Windows (put-off segment: Close failed (0x80004005)). Whole suite: 1,433 passed, 4 failed (the knownfuzz_validate_and_gpu_0..3), 47 ignored, 26 SKIPPED. Not run under Wine by us.Whole suite at
f0f9daee(RTX 5090,--no-fail-fast --test-threads=4,XCL_NETWORK=0): 1,433 passed, 4 failed (the knownfuzz_validate_and_gpu_0..3), 47 ignored, 26 SKIPPED. On the Ryzen's AMD iGPU (RDNA2), with local test-only overlays so the fixtures honourXCL_ADAPTER(this PR'sput_off_riguses the default adapter, as noted in the review thread):a_put_off_2 passed andlist_x42 passed, with the fixture printing the AMD adapter.RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 Pro 26200, Rust 1.99.1, debug tests. Base
mainb49be18; head008201c.Both tests fail with
main's behaviour at the two sites (the segment code otherwise the same): "the refused segment is not submitted" (left: 3,right: 2) and "nothing was put off" (left: 3,right: 1). Both pass with the change: 20 of 20 runs with--test-threads=4.In the first test the runtime refuses the recording itself (a query begun and never ended, then the native
Close: the test asserts it fails). The test hook is#[cfg(test)]and keyed by the wrapper, so tests running in parallel don't take each other's hook.cargo test -p xcl --lib hle::d3d12x -- --test-threads=4: 256 passed, 0 failed, 2 ignored.cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on008201c(
XCL_NETWORK=0): 1433 passed, 4 failed, 47 ignored over 37 test binaries. The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState0x8007000E, seeds70 / 545 / 1019 / 1507). They fail the same way on
mainb49be18(pre-existing, #1905).--no-fail-fastbecause otherwise those 4 stop cargo before the integration tests.SKIPPED (26 lines): GPU tests or forms that need wave64 (no wave64 on this card); 3 f16/f32 forms the
per-lane lowering refuses (#1426);
heap_window_out_of_memory_falls_back_to_the_switch_form(no heapwindows);
pso_measurement_compiles_an_exact_synthetic_record(needs Developer Mode).Regression run
main:This PR (
b4a8ad86):Both: the retail title,
-Seconds 200,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, the same scripted input to the world load, each on a copy of the same cache (compute precompiled, graphics driver blobs removed). Main's run used a never-used exe name; the head run atb4a8ad86reused the exe name of the earlierf0f9daeehead run (2,065 frames then), so its NVIDIA cache was warm. Both stop presenting at the world load (#2088).Tested by others (thank you):
008201c4: whole suite 1425 passed, 0 failed (main's known failures skipped); both new tests pass. On the Ryzen iGPU (RDNA2,XCL_ADAPTER=radeon): 1436 passed, 0 failed. Note: the new tests' fixture uses the default adapter (see the review thread), soXCL_ADAPTERdid not select it on every machine. https://github.com/xcl-dev/xcl/pull/2622#issuecomment-7181852742Closecase above and tested the skip on both. https://github.com/xcl-dev/xcl/pull/2622#issuecomment-7201103492b4a8ad86, Wine 11.21 + vkd3d-proton (RTX 4070), release: the first test skipped cleanly 4 of 4 ("the runtime closed a list with a query left open"), the second ran and passed 4 of 4. https://github.com/xcl-dev/xcl/pull/2622#issuecomment-7214868387f0f9daee, release: both new tests 3/3 with live0x80004005,list_x42/42 × 3, 60 s paired smoke with no removals. https://github.com/xcl-dev/xcl/pull/2622#issuecomment-7206727902main:cargo test -p xcl --liball passed, 0 failed. https://github.com/xcl-dev/xcl/pull/2622#issuecomment-7186656353Not tested
Closefailing on its own in a title run: not seen in ours (noClose failedline in either smoke run); the failure is injected in the tests.Edge cases we would like tested
Results on other hardware are very welcome here. Please give the commit, GPU, driver and the output.
Close, and what a refused list does when submitted, is up to the driver.cargo test -p xcl --lib a_put_off_ -- --test-threads=4Look for: both pass. In the first, the assertion that the runtime refused the recording (a query begun and never ended) passes, the submission runs, and the device stays. If
Closeisn't refused on your driver, that assertion fails and names the HRESULT: please post it.Closefor an open query, so the first test now skips there (confirmed atb4a8ad86, 4 of 4). Still open: whether vkd3d-proton removes the device when a refused segment is submitted. The same two tests. Look for: whether vkd3d-proton reports the unended query atCloseat all. If it doesn't, the first test fails at "the runtime refused the recording", which says how a refused recording surfaces there.ExecuteCommandListscompletes.KickoffXpath.KickoffXchecks its own list'sClose, then calls the samerecord_deferred. A put-off call refused there should be dropped the same way. Look for: thedeferred call: Close failedwarning and no device removal.XCL_D3D12_DEBUG=1). Look for: whether any put-off segment is ever refused in practice, i.e. the log linesD3D12.X: deferred call: Close failed (…)orD3D12.X: put-off segment: Close failed (…), and the debug layer's message for that list. We saw none in our runs without the debug layer.Related but not changed here: @KOLESNiii's second case. A put-off call is taken out of its segment before a bounded resolve (
XCL_PSO_WAIT_MS) can skip it, so after a timed-out dispatch, a reusable list submitted again may still be missing that dispatch. This is a separate question from theCloseresults, and this PR doesn't touch it.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T03:20:53Z.
Review: COMMENTED
Source-derived adapter selection finding, supported by a local D3D12 null-device LUID probe. No PR test run.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T03:50:03Z.
Review: COMMENTED
No description provided.
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T03:35:30Z.
Full-suite run, since this PR has no test report yet. Tested exact head
008201c4(on its baseb49be18).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1425 passed, 0 failed, 45 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,dispatch_chain_native_wave64_builds_whole,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.a_put_off_call_whose_close_fails_is_not_submitted,a_put_off_segment_that_does_not_close_is_not_used.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1436 passed, 0 failed, 47 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on mainb49be183too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T04:02:54Z.
AMD run of the two new tests, with the adapter shown. Head
008201c4, debug, Windows 11 Pro 26200, on the integrated AMD Radeon(TM) Graphics of a Ryzen 7 9800X3D (RDNA2; driver version not recorded). To select that adapter, thelist_xfixture was temporarily changed (local, test-only, not part of this PR) to use the crate's adapter selection withXCL_ADAPTER, and to print what it got:list_x fixture adapter: AMD Radeon(TM) Graphics; WARP=falsecargo test -p xcl --lib a_put_off_ -- --test-threads=4: 2 passed, 0 failed, 0 ignored, no SKIPPED. Both refused recordings show up atCloseon this driver too (0x80004005), and both log lines fire:deferred call: Close failed (0x80004005), the call is droppedandput-off segment: Close failed (0x80004005).So this is AMD coverage of the two tests, unlike the default-adapter runs discussed above. The fixture change will be its own test-only PR (the follow-up offered to @luckyteagirl).
Not tested: RDNA3/4, Intel, a title run on AMD.
AI use: Codex (GPT-6.1-Sol) wrote the temporary fixture change and ran the tests; Claude Code (Claude Opus 5.5) checked the log and wrote this comment.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T03:20:53Z.
Code review location:
crates/xcl/src/hle/d3d12x/list_x.rs; line 7129The two requested AMD RDNA2 tests call
D3D12CreateDevice(None, ...), soXCL_ADAPTER=6800Mdoes not select their device. On this hybrid AMD laptop, a standalone call with the same arguments succeeded and its device LUID matched the integrated AMD Radeon(TM) Graphics (DEV_1638), not the RX 6800M (DEV_73DF); the fixture therefore would not enter its WARP fallback but would test the iGPU. Could the rig honorXCL_ADAPTER, or at least print the actual device adapter and WARP fallback status, before these results are counted as RX 6800M coverage? This is source review plus an external default-device probe; I did not run the PR tests.AI-assisted review: OpenAI Codex (GPT-6; exact serving variant unavailable) and a Luna subagent.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T03:50:03Z.
Code review location:
crates/xcl/src/hle/d3d12x/list_x.rs; line 7129Thanks @luckyteagirl for catching this, and @futurepro62 for the full-suite report. You are right: our two new tests share
put_off_rigatlist_x.rs:7124, whoseD3D12CreateDevice(None, ...)call at 7129 ignoresXCL_ADAPTER. Their helper calls are at 7166 and 7228. On a hybrid machine they use the default adapter, or WARP if default-device creation fails.Checked: at
008201c4,list_x.rshas 15 directD3D12CreateDevice(None, ...)call sites: this shared helper plus 14 other fixture calls at lines 4645, 4667, 4715, 5111, 5935, 6013, 6199, 6278, 6451, 6627, 6794, 6916, 7052 and 7267. Our tests followed that existing pattern, so their adapter attribution needs correcting.@futurepro62, the two new tests in your “AMD iGPU (
XCL_ADAPTER=radeon)” run therefore most likely ran on your default adapter. Could you confirm which adapter that is? We should hold their AMD-specific coverage attribution until the actual device is identified.I can add the actual adapter name/LUID and WARP status to these two tests now. Making the broader
list_xfixtures honorXCL_ADAPTERthroughgpu::adapter/ the runner's selection pattern can be a separate test-only PR.Not tested: no new device probe or GPU run for this reply; source inspection and the linked reports only.
AI use: Codex (GPT-6.1-Sol) checked the fixture call sites and drafted this reply. Claude Code (Claude Opus 5.5) checked the count and posted it.
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-26T05:41:45Z.
Independent synthetic Windows GPU verification on an AMD Radeon RX 7800 XT (RDNA3), driver
32.0.31035.1003, Ryzen 7 5700X3D, Windows 11 Pro build 26200, Rust 1.100.0x86_64-pc-windows-msvc, DXC/DXIL 1.8.2502.11 (Windows SDK 10.0.26100), debug.Tested
With
CARGO_TARGET_DIR=D:\xcl-2622-amd-targetandXCL_NETWORK=0,cargo build --workspace -j 4succeeded at both clean commits.cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4ran all workspace targets at each commit.008201c4ee8204d1e4c28fc6eee0409b6b26314bb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7Both suites exited 101 on
gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1with the same mismatch at seed 722,res[30]GPU0x1versus CPU0x7fffffff. The existing deferred-submit testa_dispatch_with_a_pipeline_still_building_waits_at_the_submitpassed at both revisions. The two new Close regressions passed at the head and are absent from the parent.The same seven
SKIPPEDcases were logged on both runs and are excluded from coverage.f16_programs_on_the_gpu, per-lane arithmetic on wave32 and wave64 (V_MUL_F16) and per-lane packed arithmetic on wave32 and wave64 (V_PK_MUL_F16).f32_programs_on_the_gpu, per-lane conversions on wave32 and wave64 (V_CVT_F16_F32). These six cases were refused due to the semantic differences tracked in #1426.heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Both full-suite logs identify the RX 7800 XT in the D3D12.X runtime. At the head, a temporary test-only probe matched each Close fixture device's LUID to the RX 7800 XT (
software=false) and reported the same adapter name from the GPU test runner. With that probe,cargo test -p xcl --lib -j 4 a_put_off_ -- --test-threads=4 --nocapturegave 2 passed, 0 failed, 0 ignored, and 0 skipped. The replay hook recorded nativeClosereturning0x80004005. The segment-creation hook injected0x80004005after the native call.Repeating the same targeted command with the temporary
XCL_2622_CONTROL_SUPPRESS_CLOSE_FAILURE=1masked the hook HRESULT at the caller. The control gave 0 passed, 2 failed, 0 ignored, and 0 skipped. The refusal-at-replay test collected three segments with two expected, and the refusal-at-creation test collected three with one expected. The temporary test changes were removed.Not tested
Retail title smoke runs, release builds, and other adapters.
AI use
Claude Code (Claude Opus 5.5) ran the exact-head build and suite. Codex (gpt-6.2-sol) ran the exact-parent build and suite, ran the temporary adapter and causal checks, compared the saved logs, and wrote this test report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T08:29:25Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T09:23:05Z.
Finding on #2622 head
008201c: a replay segment whose nativeClosefails is moved totitle_list's spare pool. On its next use,deferred_segmentremoves it withpop_spare; nativeResetfails, and.filter(emptied)discards the raw pointer. Wrapper teardown can then no longer release that owning COM reference. The same failed-reset spare fallback exists in the ordinary split path, though I exercised the deferred path here.I extended the existing refused-
CloseGPU test locally to hold one extra reference, attempt the next deferred allocation, release the wrapper, then release the test reference. On the untouched runtime with only that test addition, the lastReleasereturned 1 instead of the expected 0 (0 passed, 1 failed, 0 ignored). That identifies an owner lost from the wrapper's tracking; repeated refusals could retain lists and their resources. With the local patch below, it returned 0, and the two focuseda_put_off_tests passed (2 passed, 0 failed, 0 ignored, no skips). The patch releases a refused list rather than placing it among resettable spares, after removing it from the active recording, and clears its split-dispatch predecessor entry before release.Tested: RTX 3080 Ti (NVIDIA 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, DXC/DXIL 1.8.2502.11.
cargo build --offline --locked --workspaceon the clean PR head passed. On the final local, uncommitted patch,cargo test --offline --locked -p xcl --lib a_put_off_ -- --nocapture --test-threads=1had 2 passed, 0 failed, 0 ignored;cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiethad 1,437 passed, 0 failed, 47 ignored across 37 targets, with 25 explicit GPU skip notices. Skips are not GPU coverage.Not tested: a retail title, paired clean-tree smoke, repeated failure under a live workload, or a refused middle call with later deferred calls. This is an author-ready local suggestion, not a merge-readiness claim.
Local test and fix diff (not committed)
AI-assisted: Codex (GPT-6.2 Sol) traced the ownership path, wrote and ran the regression and local patch, and drafted this report. GPT-6.2 Astra reviewed the deferred segment and scratch lifetimes.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T09:43:36Z.
Thanks @thehollowedone, that is a real leak, and thank you for the test that proves it and the patch. We will take your change: a refused segment is released instead of going to the spares, in both
deferred_segmentanddrop_segment. Your extended test goes in with it, credited to you, and we will rerun it and the suite on our side before pushing. I will post here when it is pushed.AI use: Claude Code (Claude Opus 5.5) wrote this.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T10:33:10Z.
@thehollowedone your fix is in
f0f9daee: your patch and your reference-count test, credited in the commit. On our side the test failed on the previous head (finalRelease1) and passes with the fix (0).a_put_off_andlist_xpass, and a new smoke pair is in the description.One change from your diff: in
deferred_segment's first-refusal branch, the release goes through the list's adopted vtable (as yourdrop_segmentdoes) instead ofpc(p, 2), the originalRelease. A refused list there can be a reused spare that XCL adopted. Releasing it past the hook would skipcl_release's cleanup of the list's address-keyed state (the class of #1453 / #2691). Your test still returns 0 with that.AI use: Codex (GPT-6.1-Sol) applied the patch and ran the tests. Claude Code (Claude Opus 5.5) checked the diff and wrote this reply.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-26T19:01:04Z.
Edge case 2 (Wine / vkd3d-proton): vkd3d-proton does not report the unended query at
Close.ClosereturnedS_OK, soa_put_off_call_whose_close_fails_is_not_submittedfailed at "the runtime refused the recording" in 5 of 5 runs at headf0f9daee, as in 14 of 14 at008201c4. With a render pass also left open in the hook, vkd3d-proton refused the list and the test passed; it failed withif hr < 0inrecord_deferred(list_x.rs:2716) made false. The change below makes the test skip where the runtime does not refuse the open query; on Windows it still runs in full.Setup:
mainb49be18+ this pull request, release, Wine 11.21 Staging + vkd3d-proton v3.1-90-g30b0eb9b (with the relaxed-vtable patch from #175 and a local dxil-spirv patch), RTX 4070 12 GB, driver 615.71.09,-- put_off --test-threads=1(at008201c4, 1 run with--test-threads=4and 8 runs of the wholexcllib with--test-threads=4). Native Windows: Windows 11 Pro 26200, RTX 2070 SUPER 8 GB (driver 621.01), rustc 1.100.0, debug,-- put_off --test-threads=1.…close_fails_is_not_submitted…does_not_close_is_not_usedf0f9daee008201c4the runtime refused the recording (0x0)(list_x.rs:7192)008201c4008201c4+ a render pass left open in the hook, begun by its vtable slotif hr < 0made false, failed 2 of 2:the refused segment is not submitted(3 segments against 2)f0f9daee+ the skip belowthe runtime closed a list with a query left openf0f9daee+ the skip belowClose failed (0x80004005); its new reference check too)d3d12_command_list_Close(libs/vkd3d/command.c:6838) returnsE_INVALIDARGonly for a list marked invalid. A query left open is not marked; a render pass left open is ("Close called with an active render pass."). I do not suggest that hook instead: on Windows (debug) it crashed the test with0xc0000005in 2 of 2 runs, before anyClose failedline.f0f9daee(it also releases the reference the test now holds on the refused segment):Not tested: title runs; a debug build under Wine; the whole lib at
f0f9daeeor with the skip; the whole suite on Windows; whether vkd3d-proton removes the device when a refused segment is submitted.AI use: Claude Code (Claude Opus 5.5) ran the tests, wrote the change to the test, and wrote this comment.
Posted without review by a person: the account owner was away and reads replies later.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T00:45:31Z.
Independent desktop NVIDIA verification of PR #2622 at head
f0f9daee2d7e7cf5b46aa0d9b6a1beb46b94b5dc(2commits008201c4 -> f0f9daee; exact merge-base:b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, pre-#2555ancestor ofmain).Environment
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted release tests & build (
f0f9daee)cargo test --release -p xcl --lib a_put_off_call_whose_close_fails_is_not_submitted -- --nocapture(3 consecutive runs)1 passed; 0 failed; 0 ignored; 1337 filtered out× 3 (0.25s,0.22s,0.22s,0skipped; live on RTX 4060:deferred call: Close failed (0x80004005), the call is dropped – not done)cargo test --release -p xcl --lib a_put_off_segment_that_does_not_close_is_not_used -- --nocapture(3 consecutive runs)1 passed; 0 failed; 0 ignored; 1337 filtered out× 3 (0.50s,0.49s,0.50s,0skipped; live on RTX 4060:put-off segment: Close failed (0x80004005) – not done)cargo test --release -p xcl --lib hle::d3d12x::title_list::(3 consecutive runs)3 passed; 0 failed; 0 ignored; 1335 filtered out× 3 (0.02s× 3,0skipped)cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=1(3 consecutive runs)42 passed; 0 failed; 0 ignored; 1296 filtered out× 3 (1.78s,1.78s,1.81s,0skipped)cargo build --release -p xcl1m 10s, exit0,0new lib/bin warnings; minor note:2unused_unsafewarnings in the new#[cfg(test)]hook closures atlist_x.rs:7187and7244)Paired quiet 60 s retail smoke (
title: 29640639)Exact merge-base (
b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, cached baseline on the same machine):PR #2622 (
f0f9daee2d7e7cf5b46aa0d9b6a1beb46b94b5dc):Runtime log observations (
xcl.log)9219log lines,0[ERROR]/ device-removal / panic lines.19657 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14025 MB committed by the process; video memory 6116 MB local, 4683 MB non-local.0put-off segmentClosefailures logged during the 60 s smoke ontitle: 29640639.Limits of coverage
a_put_off_call_whose_close_fails_is_not_submittedanda_put_off_segment_that_does_not_close_is_not_used, verifying failed segments are dropped and released rather than submitted or reused) were directly exercised on real D3D12/RTX 4060 (3/3each,0skipped), alongsidetitle_list::(3/3× 3) andlist_x::(42/42× 3).title: 29640639did not hit a realClosefailure on a put-off segment during the 60 s smoke, so the retail run confirms zero runtime regression on normal list recording/submission (frame-count delta vs. cached merge-base reflects single-run startup variance, not this PR).AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-27T08:25:59Z.
@Royalflamejlh, thanks for tracing
d3d12_command_list_Close. Pushed as8cb07b8d+b4a8ad86(head nowb4a8ad86, credited in the commit). We used your shape with one change: the test checks the replay's ownCloseresult rather than adding a probe list. A runtime that acceptsClosewith the query open skips this one test, releasingwrapand the refused segment once each before returning. A refusing runtime runs the full submission and reference checks as before. On Windows (RTX 5090), bothput_offtests still run (put-off segment: Close failed (0x80004005)), 2/2 in each of 3 runs. The whole suite is unchanged (1,433 passed, the 4 known fuzz failures). We haven't run it under Wine ourselves, so a check ofb4a8ad86there (expect a skip, not a failure) would close it.@Decodere,
b4a8ad86also removes the twounused_unsafewarnings you spotted atlist_x.rs:7187and7244. Thanks for the RTX 4060 run.The body has the new head's smoke block (200 s, 2,088 frames, 0 removals).
AI use: Codex (GPT-6.2-Sol) wrote the change; Claude Code (Claude Opus 5.5) tested it on the RTX 5090 and wrote this comment.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-27T09:35:51Z.
Under Wine + vkd3d-proton on an RTX 4070, at head
b4a8ad86,a_put_off_call_whose_close_fails_is_not_submittedskipped with "the runtime closed a list with a query left open" in 4 of 4 runs, anda_put_off_segment_that_does_not_close_is_not_usedran and passed in all four (its hook's failed Close was logged asput-off segment: Close failed (0x80004005)). Cargo counts the skip as a pass:2 passed; 0 failedeach time. Atf0f9daeethe same test failed in the 5 runs of our earlier comment, with "the runtime refused the recording (0x0)".Setup:
mainb49be18+ this pull request, release,cargo test --release -p xcl --lib --target x86_64-pc-windows-gnu -- put_off --test-threads=1, Wine 11.21 Staging + vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, RTX 4070 12 GB, driver 615.71.09.no GPU: the D3D12 device could not be created on the card at that time, which has happened here without this pull request too. They are left out of the counts above.Not tested: a debug build; the whole test suite at this head; native Windows at this head; the title.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment.
Posted without review by a person: the account owner was away and reads replies later.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-29T07:39:28Z.
Closing as superseded:
mainalready has this fix as bmjask's565a6fc9("reject put-off segments that fail Close", merged with the #2959 stack), including the two tests this PR added. Thank you @bmjask.AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 3.8 Flash.
Pull request closed