Repository navigation
Conversation
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Code review on
Remaining before merge: |
|
NVIDIA half of the dual-vendor check, exact head The lib suite doesn't finish.
This PR's own CI run (Windows, no GPU) shows the same thing: that test fails, then the process exits without finishing. A likely cause, from reading the code (not isolated yet): step (h) of that test calls Other runs on this head:
(Edited: I've dropped the A/B I had queued here. tiagonleal's run on an RTX 5070 Ti covers it: 8 of 10 parallel runs abort at this head, 7 of 7 pass at AI-assisted (Claude Code). Synthetic tests only. |
|
Verification on NVIDIA RTX 5070 Ti (Windows 11), head Tested
Not tested
AI use
Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5). |
Command lists that call SetPredicationBufferX lazily allocate a PC ID3D12Resource predication buffer. When list_x::on_release removed a released list or list_x::on_create overwrote an entry at a reused command-list address, dropping that pred_buf synchronously inside COM Release could destroy the resource while previously submitted GPU command lists still referenced it. Extend late_release with hold_pc_resources (sealing immediately when queues is empty) so list_x::on_release and on_create defer pred_buf drops outside the LISTS lock until every known queue has passed the batch fence, and update the synthetic pred_buf lifecycle unit test to drain late_release before checking the final refcount.
4fb33c7 to
1f8b821
Compare
|
Rebased onto current
Re-tested on
|
When a console command list calls
SetPredicationBufferX, XCL creates a dedicated PC buffer (pred_buf) on the fly to hold the predicate value during recording. Previously, when that command list was released (on_release) or another command list was created at the same memory address (on_create), the old tracking entry and itspred_bufCOM reference were dropped synchronously on the CPU — even if earlier GPU submissions referencing that buffer were still in flight.This change defers dropping those PC-owned
pred_bufresources behind GPU completion fences usinglate_release, matching the lifetime guarantee already enforced for title-owned resources: once retired outside the command-list tracking lock,pred_bufstays alive until every known GPU queue has passed a signalled batch fence, and then drops outside theHELDlock (dropping immediately when no queues are active or whenXCL_LATE_RELEASE=0).What is in it
crates/xcl/src/hle/d3d12x/late_release.rs: extendHeld/Batchwithopen_pc/dead_pc(Vec<ID3D12Resource>), addHeld::drain_all(sealing immediately without waiting onSEAL_EVERYwhenqueues.is_empty()), extractensure_thread, addpub(super) unsafe fn hold_pc_resources, releasegone_pcoutsideHELDindrain_known, and add GPU/unit testsheld_pc_resources_wait_until_the_queue_is_past_their_batchandwithout_queues_held_pc_resources_go_at_oncecrates/xcl/src/hle/d3d12x/list_x.rs: addretire_pred_bufand passold.pred_buf.take()fromon_createandon_releaseoutside theLISTSlock, updateset_predication_buffer_state_transitions_and_lifecyclestep (h) to drainlate_releaseuntilfake_resreaches 0 (withAcqRel/Acquireordering and safe timeout handling under parallel queue tests), and add GPU teston_release_and_on_create_retire_pred_buf_until_queue_passesTested
rustc 1.100.0 (0ef1bc386 2026-11-09)--test-threads=1):hle::d3d12x::late_release::tests4 passed / 0 failed / 0 ignored;hle::d3d12x::list_x::tests35 passed / 0 failed / 0 ignoredcargo test -p xcl --lib hle::d3d12x -- --test-threads=4: 10/10 passed (220 passed, 0 failed, 2 ignored each, 0 aborts)cargo test --workspace --no-fail-fast -- --test-threads=4: 1266 passed, 2 failed (only pre-existinggpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599 reproduced on unmodifiedorigin/main06c9f550, tracked in DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115 / Direct DXIL: geometry mode, MSAA loads and directed f32 rounding #1679), 46 ignored across 23 test result summaries (debug build)SKIPPEDtests: gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)); shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D); test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll; heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows; uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))cargo build --release -p xcl) and 60 s retail title run (5ec87c56) completed cleanly with 0 device removals and 0 crashesRegression run
Not tested
SetPredicationBufferX, NVIDIA GPUs, Intel Arc GPUs, wave32-only GPUs, and Linux/WineAI use
late_releasefor owned PC resources, wiringlist_x::on_create/on_releaseretirement outside the lock, diagnosing and fixing the parallel-test drain/lifetime race, running the test suites and smoke runs, and drafting this description. All builds, tests, and regression runs were executed locally on the hardware above.