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
|
Regression run for this PR on Windows / NVIDIA, since it has no Tested
this PR: Both runs started from the same state: the title showed its first-run screens (terms, screen narration) in both, so the pair is like for like. The title saved its settings during this PR's run, so later runs on this machine skip those screens and are not comparable with these two. The PR's run is within the limits: 99.7 % of Not tested: the world load, where the PR's change applies; a 60 s run does not reach it here. On this machine (125 GB commit limit) the title's screen-probe programs reach the in-title driver build in longer runs, so a longer run of this PR is possible if useful. AI use: Claude Code (Claude Opus 5.5) built the trees, made the runs on my PC and wrote this report; I asked for it to be posted. |
…driver gave up callback Eliminates compiler warnings for unused items: - D3D12.X: removes rb_fence and rb_value from sparse::State and test fixtures (xcl-dev#1732). Readback fences are now managed per-queue in RB_QUEUES by async readback workers, making the fields on State obsolete. - D3D12.X: hooks note_driver_gave_up in real::translated_compute_pso_once when driver_compile_identified returns E_OUTOFMEMORY after DRIVER_GAVE_UP_AFTER (xcl-dev#1665, xcl-dev#1524), ensuring failed massive compute pipelines are persisted in used-pipelines.txt (!<key>) and eliminating dead code warnings. Assisted-by: Antigravity
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
599c69c to
6530cc2
Compare
The refusal went only through note_translation_error, which logs its first 40 distinct reasons; a retail title's mesh warnings use them up in the first seconds, so a 14 MB program the AMD driver worked on for 45 s and refused with E_OUTOFMEMORY left no line at all. Log hr, DXIL size and the time in the driver (first 16, then powers of two). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preload builds every pipeline an earlier run used (used-pipelines.txt). On an AMD RX 6750 XT two retail compute programs (14 and 23 MB of DXIL) kept the driver busy 45-55 s each, took the process to ~53 GB of commit and were refused with E_OUTOFMEMORY, in every run, since nothing was kept. When the driver runs out of memory after working for 1 s or more on a build ahead that had its big-compile turn (commit free, no title thread waiting for it), its key now gets a !<key> line; such pipelines get the stand-in at once (as when the build failed) instead of being built again, ahead or at a bind. Other failures, and an out-of-memory next to a title that waits for the pipeline, are tried again next run; each attempt (a retry in the switch form too) is judged on its own. Older builds pass over the new lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6530cc2 to
daf7221
Compare
XCL PR #1665 verificationHead STOR-WINLAB, Windows 11 Enterprise Evaluation x64 build 26200.9974, AMD Family 23 Model 113 (12 logical CPUs), Intel Arc A770 (16 GiB), driver 32.0.101.9175, DXC 1.9.2609.5, rustc 1.100.0 ( Tested
Workspace failures and skips
Not tested Matched 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 |
Stacked on #1300; only the top commit belongs here. Part of #1035.
The pipeline preload (#690) builds every pipeline an earlier run used. On an AMD RX 6750 XT two compute programs of a retail
title (~14 MB and ~23 MB of translated DXIL) each kept the driver busy 45-55 s, took the commit to the limit and were
refused with E_OUTOFMEMORY, in every run, because a failed build leaves nothing behind and the key stays in
used-pipelines.txt(#1300 logs the refusal). #1398 (retry without DXC GVN) and the switch-form retry of #680 do notchange that here (numbers below); another RX 6750 XT on #1398 also reports the ~14 MB one still refused.
#1524 (in
mainnow) changes when these builds run, not whether they fail: big programs go to the driver a few at a time(
XCL_HUGE_PSO_CONCURRENCY, default 1, and ≥ 4 MiB in a lane of its own), which this preload already did one at a time.Each of the two programs alone still takes the driver to its limit here. This PR now sits on #1524's gate: the
big-compile turn it checks is the slot
driver_compile_identifiedtakes.When the driver returns E_OUTOFMEMORY after working 1 s or more on a build ahead that had its big-compile turn (commit
free, no title thread waiting for it), the shader set gets a
!<key>line inused-pipelines.txt. Pipelines of such aset get their stand-in at once (what they got before, when the build failed) instead of being built again, ahead or at a
bind. Other failures, an out-of-memory next to a title thread that waits for the pipeline, and an attempt followed by a
retry that fails for another reason are tried again next run. Older builds pass over the new lines.
What is in it
crates/xcl/src/hle/d3d12x/real.rs:driver_compile_identifiedalso returns whether the compile had its slot; eachattempt of
translated_compute_pso_once(the cached-blob one, its cold retry, the switch-form retry) setspso_async::note_driver_gave_up(driver_gave_up(hr, slot, time in the driver)): E_OUTOFMEMORY, the slot, ≥ 1 s.crates/xcl/src/hle/d3d12x/pso_async.rs:used::skipped/skip/is_skipped(!<key>lines, onewrite_allperline);
build(.., preload = true)marks the set when the driver gave up; the preload worker drops queued pipelines of amarked set;
submit_ascompletes a marked set's pipeline as failed at once. Tests:a_skipped_key_is_read_from_the_file,a_pipeline_the_driver_gave_up_on_is_not_built_again(fails on main: the second pipeline is not done at once),a_build_ahead_that_fails_otherwise_is_tried_again(also: gave up, then a retry that fails otherwise),only_a_long_out_of_memory_in_its_turn_is_giving_up(real.rs).Tested
Windows 11 Pro 26200; Rust 1.100 MSVC; release.
cargo test --workspace --no-fail-fast -- --test-threads=4(debug build first): at this PR on 1d027e5 960 passed,3 failed, 43 ignored; at main 1d027e5 956 / 3 / 43. The same three GPU tests fail on both here
(
title_textures::placed_title_textures_share_vram_and_preserve_pixels,title_textures::transitions_apply_when_their_list_is_submitted,vram::d32s8_targets_take_their_own_size_of_video_memory); this change does not touch them. SKIPPED GPU tests: none.XCL_NETWORK=0, release, a watchdog that ends the run at 90 % of the system commitlimit (peaks below are system commit). Recompiler: oversized structured code falls back to pc blocks (#1307) #1321 applied to all four (without it main's commit grows from b8b1f49):
!lines: 240 s, peak 34.3 GB.!lines were written by runs of this change on main 47efa2e (preload on, 90 s): peak 53.0 → 53.1 → 19.6 →20.7 GB over four runs, one set marked in each of the first two (the ~23 MB one only shows once the first is skipped).
99.7 % of main's frames, 123 % of its peak commit, no crash or device removal. A 60 s run there does not reach the world
load, where this change applies; on NVIDIA nothing is refused, so nothing is marked. Thanks!
Regression run
Both on
main1d027e5 (with #1321) and this PR rebased onto it, release,scripts/smoke.ps1 -Seconds 60, the game folderpassed as a neutral junction (
title: retail-a), monitor attached, preload on, a watchdog at 90 % of the system commitlimit (not reached). The PR's run starts with the two
!lines already inused-pipelines.txt;mainpasses over themand builds those two sets ahead (no refusal within 60 s). System commit peak: main 34.8 GB, PR 34.2 GB.
main:
PR:
Not tested
reports in Pipeline preload (#690) starts a compute build that never ends at the title screen; memory grows until it runs out (Linux: #611) #1035: NVIDIA on Windows and Linux, RADV): only a driver's E_OUTOFMEMORY answer marks a set.
main's runs before any refusal), the first runs still pay the full cost and may end the title; it converges one set per
run that survives. The main run above does not write marks (it has no such code): the lines came from runs of this change on 47efa2e.
!line (driver update, more memory, a recompiler change that shrinks the DXIL,XCL_HEAP_WINDOWS):the user deletes it to retry; the log line says so. The mark also applies with
XCL_PSO_PRELOAD=0.driver_gave_up); the driver answering it was only seen in theruns above.
compile beside it (Shaders: speed up translated pipeline compiles and add PSO measurements #1524's ≥ 4 MiB lane runs next to the other one by default) can use up the commit during a 30-60 s
build; the driver then answers E_OUTOFMEMORY too and the set is marked, for good, though it might build on another run.
Marking only after two such runs would avoid that, at the price of one more run at the limit; not done here.
build in the stats.
D3D12.X: only a title's run reads and writes used-pipelines.txt #1113 (textual overlap in
used::getand the file format) or D3D12.X: retry driver-rejected compute PSOs without DXC GVN (#756) #1398 (merges cleanly; its retry resets the timer, so the1 s is measured on the last attempt).
AI use
reviewed the design and the rebased diff and tried to break it (its findings changed the marking rule). I reviewed and
ran everything.
Written with Claude Code from runs on this machine.
🤖 Generated with Claude Code