Repository navigation
Conversation
…g, DirectStorage, and stream tracking Cherry-picks upstream stabilization improvements across VRAM allocation, pipeline caching, DirectStorage lifetime, descriptor heap indexing, Media Foundation device bridging, and stream PSO tracking: - D3D12.X: reclaim cooling and idle tiles on pool heap OOM (xcl-dev#1663, addressing xcl-dev#1585 and xcl-dev#1668). When CreateHeap returns 0x8007000E (E_OUTOFMEMORY), Pages::take_tile waits on Pages::fence up to 1000 ms to drain cooling tiles or force-evict idle pages rather than failing immediately. (by Nikita Romanovich) - DirectStorage: close a queue when its last reference is released (xcl-dev#1675). Moves queue_close logic into QueueInner::close and invokes it when the final queue reference is released, preventing background workers from writing to freed caller buffers and marking pending entries complete with E_QUEUE_CLOSED. (by eizispark) - D3D12.X: a pipeline the driver gave up on is not built again (xcl-dev#1665). Persists driver E_OUTOFMEMORY refusal state into used-pipelines.txt (!<key>) so giant compute pipelines that the host driver refuses to compile are skipped on subsequent runs. (by zorde23) - Recompiler: access outside heap windows takes a null view without branching (xcl-dev#1669, xcl-dev#680). Replaces conditional branches in XCL_HEAP_WINDOWS=1 (if (xcl_w >= windows)) with a branchless select pointing out-of-bounds accesses to a dedicated null UAV view (MEM_HEAP_NULL). (by milesah3ad) - HLE: bridge ID3D12Device before direct ResetDevice and cache D3D11 companion (xcl-dev#1677). Fixes MFResetDXGIDeviceManagerX in mfplat.rs to bridge ID3D12Device COM pointers and caches multithreaded companion ID3D11Device instances per adapter LUID. (by eizispark) - D3D12.X: route stream graphics PSOs through create_graphics_pso_tracked (xcl-dev#1661, finding XCL-BT-023 from xcl-dev#1489). Ensures stream-created graphics PSOs receive D3D12_PIPELINE_STATE_FLAG_DYNAMIC_DEPTH_BIAS and are tracked in device_x::note_base for CreateDerivedPipelineStateX and RSSetDepthBiasX. (by fixgep) Assisted-by: Antigravity
DirectStorage specifies that IDStorageQueue::Close is invoked automatically when the last reference on a queue is released. queue_release only dropped the channel sender without running close(), so releasing a queue without a prior Close() left closed == false: submitted requests in the channel continued writing into caller buffers after Release() returned, Release() did not wait for in-flight worker activity or wake parallel decompression budget waiters, and pending or remaining status-array entries stayed E_PENDING or completed with S_OK instead of E_QUEUE_CLOSED. Move queue_close's logic (including parallel::wake_waiters) into QueueInner::close and call it from both queue_close and queue_release on n == 0. Assisted-by: Antigravity (Google DeepMind, Gemini 4 Carbon)
66aaced to
47ce44e
Compare
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
NVIDIA test report for Tested
Regression run ( base ( this PR: Not tested: a title releasing a DirectStorage queue with requests in flight without AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it. |
PR #1675 · DirectStorage queue close on final releaseTested clean head Tested
Failures and skips
Not tested Retail-title smoke runs on AI use T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against |
DirectStorage specifies that
IDStorageQueue::Close(IDStorageQueueX::Close) is called automatically when the last reference on a queue is released.queue_releaseonly dropped the channel sender without callingclose(), so releasing the final queue reference without a priorClose()leftclosed == false: remaining submitted requests in the channel continued writing into caller destination buffers afterRelease()returned,Release()did not wait for in-flight worker activity or wake parallel decompression staging-budget waiters, and pending or remaining status-array entries stayedE_PENDINGor completed withS_OKinstead ofE_QUEUE_CLOSED.What is in it
crates/xcl/src/hle/dstorage.rs: movequeue_close's logic (includingparallel::wake_waiters(self)from DirectStorage: decode eligible file requests in parallel #819) intoQueueInner::closeand call it from bothqueue_closeandqueue_releasewhenn == 0.crates/xcl/src/hle/dstorage.rs(tests): addlast_queue_release_closes_pending_and_submitted_work_before_returningverifying that a finalRelease()withoutClose()waits for the active worker item to finish, skips remaining submitted requests without touching caller destination buffers, and marks both submitted and unsubmitted status entries complete withE_QUEUE_CLOSED.Tested
32.0.32015.16001),rustc 1.100.0 (0ef1bc386 2026-11-09), debug and release.cargo test --workspace --no-fail-fast -- --test-threads=4: 890 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 2 –shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is off);heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).cargo test -p xcl --lib dstorage -- --test-threads=4(default andXCL_DSTORAGE_PARALLEL_DECOMPRESS=1): 30 passed, 0 failed on each run (last_queue_release_closes_pending_and_submitted_work_before_returningfailed before the fix becauseReleasereturned while the worker was still active and the submitted request wrote to the destination buffer afterwards).Regression run
main:PR head:
Not tested
Close()first.XCL_SAMPLE_*sample-data tests.AI use
queue_releasevsqueue_closeindstorage.rs, wroteQueueInner::closeand the unit test, rebased onto DirectStorage: decode eligible file requests in parallel #819, and ran the test suite and 60 s smoke check.