Repository navigation
Conversation
…est's heap D3D12CreateDevice gives every test the process's one device. Once another test adopted it (gpu_placed_console_depth_target_with_clear_value and others), the buffer coherent_buffer_sanitizes_console_flags_and_state places on its imported heap is adopted too, and its last Release goes to late_release::hold. While a queue of a test running in parallel still has work, the buffer is held, the heap pins the pages, and VirtualFree fails with ERROR_INVALID_PARAMETER (87). The test now retries VirtualFree for up to 10 s and still asserts that it succeeds. Part of xcl-dev#1487. Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent validation of exact HEAD Environment
Tested
All five PR runs reported 727 passed, 0 failed and 21 ignored. Two explicit hardware skips were included in the passed count in each run:
The real RTX 4060 backend was confirmed in the first run. The worktree remains clean. Review: The change is narrowly scoped to test code. The bounded retry preserves the assertion rather than silently accepting a failed VirtualFree. Limitations: No regressions observed, but the original failure did not reproduce in my baseline runs. I did not independently demonstrate that the retry path was exercised. No retail title tested. AI use: ChatGPT (GPT-6.2) assisted with code review, test commands and reporting. All tests were executed locally on my hardware. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Regression run of Against the limits in CONTRIBUTING.md: 101 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
Empirical test report (5a7307e)Hardware / environment
Commands and results
cargo test -p xcl --lib hle::d3d12x::real::readback_routing_tests::coherent_buffer_sanitizes_console_flags_and_state -- --exact --nocapture
Observed behavior The coherent-buffer fixture passed. DXGI enumeration identified the Intel Arc A770 as adapter 0, which is the default adapter requested by the fixture's direct D3D12 device creation. The fixture emits no retry count, so this run cannot establish whether the first heap release succeeded or a retry was needed. Not tested Coverage was limited to workspace test compilation and the single fixture. The full GPU workspace suite, the parallel-test interaction described in #1487, and game smoke runs were omitted. AI use Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against |
readback_routing_tests::coherent_buffer_sanitizes_console_flags_and_statefails intermittently in parallel runs onassert_ne!(VirtualFree(mem, 0, MEM_RELEASE), 0)(real.rs:5825). This is the failure #1523 lists as still open. Part of #1487; independent of #1520 and #1523.Cause:
D3D12CreateDevice(None, …)returns the process's one device. When another test has adopted it, the placed buffer this test makes on its imported heap is adopted too, so its lastReleasegoes tolate_release::hold. If a queue that another test created still has work, the buffer is held. The heap then pinsmem, andVirtualFreefails with 87. This is the documentedlate_releasebehaviour (a title waits for its memory), so the test now waits too: it retriesVirtualFreefor up to 10 s and still asserts that it succeeds.What is in it
crates/xcl/src/hle/d3d12x/real.rs: inreadback_routing_tests::coherent_buffer_sanitizes_console_flags_and_state, retryVirtualFreeuntil the held release lets the pages go (10 s limit). Test-only, inside#[cfg(test)].Tested
XCL_SAMPLE_*unset.present::note_execute, signal after 200 ms from another thread, and call this test. On main it fails at real.rs:5825:17 (left: 0, right: 0). With this change: 1 passed. The resource was adopted,VirtualFreereturned 0 with GetLastError 87 while the queue was stalled, and returned 1 about 10 ms after the signal.cargo test -p xcl --lib -- --test-threads=16×5 and=32×5: one run failed this test, and one run ended with 0xc0000005 (the Tests: the queue slot 18 test signals a fence object that is complete (#1487) #1523 cause)..\scripts\test.ps1: 776 passed, 0 failed, 41 ignored.gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Regression run
real.rs's#[cfg(test)]module, with no retail smoke run. Please apply thetest-onlylabel after reviewing the diff.Not tested
list_x'swrite_buffer_immediate_on_open_existing_heap_visible_to_cpu(as changed in Tests: stop leaking imported heap resource references #1520) also frees an imported heap's memory right after release, and may hit the same hold. It is not changed here.AI use