D3D12.X: gate texture uploads on OOM back-off and commit headroom (XCL_UPLOAD_BACKOFF=1) #3037
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3037"
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 Decodere on 2026-11-27T15:19:17Z.
What is in it
Ports the
C5OOM back-off and commit-headroom upload admission gate from Vice-Tay commit57deba5c4c752b97a8286bdbd80b96517f0988fc(crates/victory-gpu/src/residency.rs, GPL-3.0; credit toTaynanGT,codec_d(codec-d),avatarmanz/VIctory-7900XTX, andVIctorycontributors) ontonvidia-devbehind an opt-in environment variableXCL_UPLOAD_BACKOFF=1(default OFF).crates/xcl/src/hle/d3d12x/residency.rs(with GPL-3.0 §5a modification notice and matchingVice-Tayprovenance row inTHIRD_PARTY.md):XCL_UPLOAD_BACKOFF=1(default OFF; disabled path is a complete no-op with zero extra syscalls or log output).500 msE_OUTOFMEMORYupload cooldown (UPLOAD_RETRY_MS = 500), armed byresidency::allocation_error(hr).32 mscachedGlobalMemoryStatusExavailable-commit sampling (COMMIT_SAMPLE_MS = 32) serialized under a leafMutex<CommitSample>: fresh staging growth grants debit the cached available-commit headroom immediately and hold an in-flightGrowthReservationuntil allocation completes so concurrent calls or sample refreshes cannot double-spend headroom below the1024 MiBgrowth floor.512 MiBupload reserve (UPLOAD_RESERVE_BYTES) keeping pooled staging buffer reuse open under moderate pressure, and1024 MiBstaging growth reserve (GROWTH_RESERVE_BYTES) gating freshCreateCommittedResourceupload allocations.upload_deferred_during/note_upload_deferred) and aggregate-only exit counters (deferrals,oom_cooldowns,growth_denials,free_trims/ MiB), logged once inreport::write_finalonly whenXCL_UPLOAD_BACKOFF=1.crates/xcl/src/hle/d3d12x/texture_upload.rs: preservesE_OUTOFMEMORYviaSubmitError { Deferred, Oom, Failed }(from_win/from_win_in); reuses pooledFREEstaging jobs down to the512 MiBfloor; reserves fresh upload heap growth withreserve_staging_growth_withagainst the1024 MiBreserve; drops idleFREEstaging buffers (trim_free) and declines re-pooling ingive_backwhen pressure denies admission orE_OUTOFMEMORYoccurs.crates/xcl/src/hle/d3d12x/title_textures.rs:reclaim_completed_uploads, preservingON_QUEUE -> FREElock order) before checking upload admission inupload_alland before checking admission for a non-emptyRETRYqueue inretry_failed, so completed staging buffers return toFREE(or drop under low commit) without waiting for a later successful submit.windows::core::Errorthroughupload_queueand maps queue-creation errors viaSubmitError::from_win("upload queue", e)soE_OUTOFMEMORYon a compute/copy queue's first upload arms the500 mscooldown and stops after one batch while queueing all remaining batches for retry.residency::admit_upload()before batches whenXCL_UPLOAD_BACKOFF=1; onDeferred/Oom, forgetsknownhashes for the failed batch and remaining queued items so nothing is lost, queues deduplicated retry entries keyed by(res, Entry::seq)with the backoff delay, trims idleFREEbuffers, and stops spinning in the current submit pass.retry_failed/retry_failed_atprunes retired or registration-mismatchedRETRYentries even while upload admission is closed, preventing retry-queue growth under streaming churn and avoiding spurious rescheduling when a resource address is reused. Default-OFF behavior is unchanged.crates/xcl/src/hle/d3d12x/sparse.rsandcrates/xcl/src/hle/d3d12x/vram.rs: callresidency::allocation_error(e.code().0)on 64 MiB sparse/texture-page pool and arenaCreateHeapfailures so GPU heap OOM immediately pauses staging growth.crates/xcl/src/hle/d3d12x/mod.rsandcrates/xcl/src/report.rs: exposepub mod residency;and emit the opt-in aggregate exit summary inwrite_final.ullAvailPageFile) andE_OUTOFMEMORYfailures rather than DXGI local-VRAM budget. On Windows / WDDM hosts with ample RAM, titles can exceed local VRAM budget cleanly via non-local spill without hitting OOM (as also observed in @Anon64's 300 s RTX 3060 12 GB + 64 GB RAM run); deferring texture uploads on local VRAM budget without active eviction risks texture starvation and belongs in separate eviction/residency work.58ff61c2): Addresses all four pressure-path findings raised by @thehollowedone (non-blocking completed-upload reap,upload_queueHRESULT preservation, debited/reserved 32 ms growth-budget accounting, and(res, Entry::seq)retry identity with closed-admission pruning).hle::d3d12x::residency::tests(disabled no-op, 500 ms OOM cooldown + expiry, dual reserve floors, 32 ms commit-sample cache, debited growth budget + in-flight reservation across sample refresh, thread-local deferral propagation).hle::d3d12x::title_textures::tests(upload_backoff_defers_without_dropping_dirty_or_pending_textures,upload_queue_oom_arms_cooldown_stops_after_one_batch_and_queues_all_retries,retry_prunes_retired_while_closed_and_ignores_same_address_replacement) plus live GPU fence reap verification ingpu_an_upload_still_running_is_kept_when_its_wait_times_out.hle::d3d12x::texture_upload::tests(gpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recovers) exercising warm pool creation, pooled reuse at 768 MiB commit headroom with bit-exact GPU readback, 2 MiB fresh-growth deferral +FREEtrim + deferral observation, 500 msE_OUTOFMEMORYcooldown, disabled-mode no-op, and post-expiry recovery with bit-exact GPU readback.Part of #2688
Refs #3011
Tested
Tested locally on Windows 11 (
26200), Intel Core i5-11400F, 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (Ada, Wave32, driver32.0.16.2114),rustc 1.100.0, DXC1.9.2609.5, PR head58ff61c296bda172c636a007ff102324c5c5d6f3(fast-forward ontoac52410957a909952e54647e719dcf954cce66bb) offnvidia-dev(d1be8103644791b7a65f068954324e93d4b1b565):cargo clippy --tests -p xcl -- -A clippy::approx_constant -A clippy::while_immutable_condition:exit 0,0new warnings in any touched or new file (residency.rs:0warnings; the-Aflags suppress only pre-existingnvidia-devdeny-by-default lints outside this diff).cargo build --release -p xcl:exit 0,0new warnings in touched files.58ff61c2(3xDebug +3xRelease,--test-threads=1 --nocapture,0GPU test skips):hle::d3d12x::residency:::6 passed; 0 failed; 0 ignored(3xDebug,3xRelease).hle::d3d12x::texture_upload::tests::gpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recovers:1 passed; 0 failed; 0 ignored(3xDebug, live RTX 4060 D3D12 upload + readback).hle::d3d12x::texture_upload::(full module, live RTX 4060 GPU tests):9 passed; 0 failed; 0 ignored(3xRelease,0skips).hle::d3d12x::title_textures::(including live GPU fence testgpu_an_upload_still_running_is_kept_when_its_wait_times_outand all 3 backoff/retry unit tests):32 passed; 0 failed; 0 ignored(3xDebug,3xRelease,0skips).ac524109(unchanged filessparse.rs,vram.rs,report.rs,mod.rs) also passedhle::d3d12x::sparse::(66 passed; 0 failed; 1 ignored),hle::d3d12x::vram::(22 passed; 0 failed; 1 ignored), andcargo test --release --lib -p xcl -- --test-threads=4(1706 passed; 0 failed; 28 ignored).0upload backofflines inxcl.logwhen unset) and opt-in aggregate exit summary (D3D12.X: upload backoff summary (XCL_UPLOAD_BACKOFF=1): deferrals=0, oom_cooldowns=0, growth_denials=0, free_trims=0 (0 MiB)) on the live 60 s RTX 4060 runs below.Regression run
Quiet 60 s retail smoke runs (
scripts/smoke.ps1 -Seconds 60,XCL_NETWORK=0,title: 29640639, NVIDIA GeForce RTX 4060). Includes a same-daymain(81693f020768ec47dbfe9eefba5eec0ab9aeda6c,XCL_PREPARE=0) baseline forscripts/pr_check.py, thenvidia-devtarget base (d1be8103644791b7a65f068954324e93d4b1b565), the updated PR head (58ff61c296bda172c636a007ff102324c5c5d6f3,XCL_PREPARE=0set, no-op onnvidia-dev) with default settings (XCL_UPLOAD_BACKOFFunset), and the updated PR head withXCL_UPLOAD_BACKOFF=1:mainbaseline (81693f02,XCL_PREPARE=0, forpr_check.py):nvidia-devtarget base (d1be8103):PR head (
58ff61c2, defaultXCL_UPLOAD_BACKOFFunset;0upload-backoff log lines):PR head (
58ff61c2, opt-inXCL_UPLOAD_BACKOFF=1; aggregate summarydeferrals=0, oom_cooldowns=0, growth_denials=0, free_trims=0 (0 MiB)):Not tested
<1024 MiBavailable commit) or real driverE_OUTOFMEMORYduring a retail game session: on this 32 GB RAM / 8 GB VRAM host, available commit remained above the1024 MiBreserve floor throughout the 60 sXCL_UPLOAD_BACKOFF=1smoke (deferrals=0, oom_cooldowns=0, growth_denials=0, free_trims=0). The low-commit deferral, pooled-reuse-between-floors, non-blocking fence reap, debited/reserved growth budget,upload_queueOOM cooldown,(res, Entry::seq)retry pruning,FREEtrimming, and recovery paths are verified deterministically by the unit tests and live RTX 4060 D3D12 GPU tests.XCL_SAMPLE_*game-data tests andtest_title_runs_and_game_folder_is_untouched.texture_upload::tests::some_ranges(tracked separately by #2771; passes in--release).C5residency slices (active VRAM eviction / residency background worker) and DXGI local-VRAM budget deferral, which are intentionally out of scope for this commit-headroom / OOM back-off PR.AI use
Google Antigravity (Gemini 4 Neon) was used to port, adapt, fix review findings, test, and document this change under human supervision; all edits, unit/GPU tests, clippy checks, and quiet 60 s RTX 4060 regression smokes were executed and verified locally on this machine.
Imported from ivall/xcl. Originally posted by throny on 2026-11-27T16:25:44Z.
Merge status (I have been asked to prepare merges of PRs with several independent tests; the bar is: no open critical finding or performance regression, a fresh check of the merge result against today's
main, and green required checks. Each merge is still confirmed by a person.)This is against
nvidia-dev, whereBuild and testis red on every open PR because of the branch's own test run, so nothing there can go in until that is fixed. It is in my test queue for a world run on an RTX 4080 16 GB (with and withoutXCL_UPLOAD_BACKOFF=1); the machine has 64 GB, so it will show "no harm" rather than the low-memory benefit, which needs an 8 GB card or a small-RAM machine.AI use: Claude Code (Claude Fable 5.2).
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-27T16:55:08Z.
Independent Windows/RTX 3080 Ti (621.35) check of head
ac524109. The newgpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recoverstest passed on this card (cargo test --offline --locked -j 4 -p xcl --lib hle::d3d12x::texture_upload::tests::gpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recovers -- --exact --nocapture: 1 passed, 0 failed, 0 ignored/skipped). The fiveresidency::testspassed. The Windows CI device removal occurs in the existing sparse test on the sharednvidia-devbase; #3039’s CI shows the same 256-byteMapfailure. That does not clear #3037’s CI gate.One pressure-path issue needs attention before the opt-in path is relied on: completed staging jobs remain in
ON_QUEUE[*].in_flightuntil a successful later submit callsreclaim. At 768 MiB commit headroom, a matching completed job can therefore be unavailable inFREE; a fresh staging allocation is denied by the 1,024 MiB growth reserve, so subsequent retries cannot reach that reclaim call. The collapsed candidate below scans completed fences without waiting before upload admission and before a nonempty retry queue checks admission. It preserves the currentON_QUEUE→FREElock order. The adapted GPU fence test passed 1/1 on the RTX 3080 Ti: it held an upload behind a fence, then confirmed the helper released it after completion. This verifies the reap helper; I did not simulate a low-commit retail run.Three additional source-only cases need targeted regressions; I did not measure them on a live low-memory system:
upload_queueconvertsCreateCommandQueueerrors toString, then the new call maps them toSubmitError::Failed. On a copy/compute queue's first upload, anE_OUTOFMEMORYhere misses the 500 ms cooldown and the batch path uses the old 100 ms retry. Preserve the HRESULT throughupload_queueand useSubmitError::from_win; inject queue-creation OOM with two batches and verify one attempt plus both retries queued.allow_staging_growth_withreuses one 32 ms available-commit sample for successive fresh allocations. For example, two 32 MiB grants from 1,072 MiB can leave 1,008 MiB, below the stated 1,024 MiB floor. Serialize an uncached headroom query with fresh staging allocation, or reserve each grant against a shared budget that cannot be reset by a concurrent sample; test two grants within one sample window.RETRYholds raw resource addresses. Retirement removes an entry fromTEXTURESbut leaves its retry entry, and denied admission returns before pruning it. Under streaming churn this grows retry scans; address reuse can schedule a replacement texture on recovery. Bind retries to registration identity and prune retired entries even while admission is closed; test retirement and same-address replacement.cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 --quietgave the same result and failing test names on untouched head and the local reap candidate: 1,827 passed, 12 failed, 48 ignored, 26 GPU skip notices. The candidate is uncommitted. Not tested: retail low-commit behavior, paired smoke, AMD or Intel. AI use: Codex (GPT-6.2 Sol) checked the paths, wrote and ran the local candidate and tests; Codex (GPT-6.2 Astra) independently reviewed the memory and retry invariants.Nonblocking reap candidate and fence-test diff
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-27T17:12:09Z.
RTX 3060 12 GB (NVIDIA),
ac524109withXCL_UPLOAD_BACKOFF=1, a retail title for 300 s: the gate never acted. Its summary wasdeferrals=0, oom_cooldowns=0, growth_denials=0, free_trims=0while local video memory reached 16 802 MB on a 12 GB card.Release build,
XCL_ACTIVITY=1, A pressed every 4 s from 20 s. The run exited 0x0 with 1 927 frames and no device removals or crashes. Presents stopped at ~205 s after the first frame. Peak commit was 41 210 MB, with 5 916 MB non-local.On this card the title goes past the VRAM budget without ever getting an out-of-memory error. So, as far as this run shows, the OOM back-off has nothing to react to. The commit-headroom check never fired either, at 41 GB of process commit on a 64 GB machine. Whether the gate should also look at DXGI's local budget, not only at failures and commit, is for you to judge.
No base comparison: on base
d1be8103both runs ended before the title started. In the one I can account for, my RAM watchdog ended it: less than 4 GB of RAM was free during that build's shader preparation. So the run is mine to redo, not a finding about the PR.RTX 3060 12 GB (driver 581.80), i9-14900KF, 64 GB RAM, Windows 11 26200.
AI use: Claude Code (Claude Opus 5.5) built the PR, ran the title and wrote this report.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T18:20:04Z.
Thanks @thehollowedone for the thorough pressure-path review and RTX 3080 Ti verification, and thanks @Anon64 for the 300 s RTX 3060 12 GB + 64 GB RAM no-harm run (
1927frames,0removals/crashes,deferrals=0).Pushed fast-forward commit
58ff61c2ontoac524109addressing all four findings from @thehollowedone:title_textures.rs): Addedreclaim_completed_uploads()(reclaim(q, u64::MAX, 0), preservingON_QUEUE -> FREElock order) and called it before upload admission inupload_alland before checking admission for a non-emptyRETRYqueue inretry_failed(plus trimming newly reclaimed idle buffers when admission is closed). Updated the live GPU fence testgpu_an_upload_still_running_is_kept_when_its_wait_times_outto verifyreclaim_completed_uploads()neither blocks on a gated queue nor leaves completed jobs stuck inON_QUEUE.CreateCommandQueueHRESULT (title_textures.rs,texture_upload.rs): Changedupload_queueto returnwindows::core::Result<ID3D12CommandQueue>and mapped it inupload_allviaSubmitError::from_win("upload queue", e)(withSubmitError::from_win_in+handle_batch_errorshared with the test harness). Addedupload_queue_oom_arms_cooldown_stops_after_one_batch_and_queues_all_retriesverifying that injectedE_OUTOFMEMORYon batch 1 of 2 arms the 500 ms cooldown, stops after 1 attempt, forgets both batches'knownstate, and queues both att + 500 ms(while non-OOME_INVALIDARGkeeps the 100 ms per-batch retry without cooldown).residency.rs,texture_upload.rs): Replaced the split commit-sample atomics with a leafMutex<CommitSample>(next_sample,available,pending_growth) and RAIIGrowthReservation. Each granted fresh staging allocation immediately debitsavailableand holdspending_growthacrosstake_in's allocation syscalls so neither a second allocation within the 32 ms window nor a concurrent sample refresh across the window boundary can double-spend headroom below the1024 MiBgrowth floor. Addedstaging_growth_debits_cached_sample_and_holds_in_flight_reservation(testing two32 MiBgrants from1,072 MiBwithin one window, concurrent refresh while in flight, and recovery on a subsequent window).title_textures.rs): ThreadedEntry::seqontoDueand keyedRETRYentries on(at, res, seq)(push_retryalso drops any olderseqforres), and updatedretry_failed/retry_failed_atto prune retired orseq-mismatched entries even whileadmitted == false. Addedretry_prunes_retired_while_closed_and_ignores_same_address_replacementverifying both retirement pruning under denied admission and same-address replacement immunity when admission reopens.On DXGI local-VRAM budget (@Anon64): Keeping DXGI local-VRAM budget deferral out of scope for #3037 intentionally — as your 300 s RTX 3060 12 GB + 64 GB RAM run showed, WDDM spills cleanly past local VRAM budget without hitting OOM when system commit is plentiful, so gating texture uploads on local VRAM budget without active VRAM eviction would risk texture starvation on healthy high-RAM hosts. Local-VRAM budget management belongs in dedicated residency/eviction PRs, while #3037 focuses strictly on OS commit headroom and
E_OUTOFMEMORYrecovery.Verification on
58ff61c2(RTX 4060 8 GB, driver32.0.16.2114, Windows 11,rustc 1.100.0):cargo clippy --tests -p xcl -- -A clippy::approx_constant -A clippy::while_immutable_condition:0new warnings in touched files (residency.rs:0).3xDebug +3xRelease (--test-threads=1 --nocapture,0GPU test skips):hle::d3d12x::residency:::6 passed; 0 failed; 0 ignoredhle::d3d12x::texture_upload:::1/0/0Debug (gpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recovers),9/0/0Releasehle::d3d12x::title_textures:::32 passed; 0 failed; 0 ignored(including live GPU fence reap test)title: 29640639,XCL_NETWORK=0,XCL_PREPARE=0):exit 0x0,1612frames (60 60 60),0removals/crashes,peak commit: 14707 MB,0backoff log lines.XCL_UPLOAD_BACKOFF=1:exit 0x0,1572frames (61 60 60),0removals/crashes,peak commit: 14627 MB,deferrals=0, oom_cooldowns=0, growth_denials=0, free_trims=0 (0 MiB).@throny — branch is updated fast-forward to
58ff61c2cleanly onnvidia-dev(d1be8103), ready whenever the sharednvidia-devCI gate is unblocked.AI use: Google Antigravity (Gemini 4 Neon) implemented the fixes, added the regressions, and ran all local tests and 60 s smokes on this RTX 4060.
Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-27T18:35:41Z.
Verified current production head
58ff61c296bda172c636a007ff102324c5c5d6f3on Linux/Wine11 + physical NVIDIA RTX4060 Laptop8GiB (590.48.1),16GiB host RAM. Local checkoutxcl-pr3037-revisedhas test-only changes: mandatory real NVIDIA for the existing backoff GPU fixture, plus a completed-upload/no-new-submit readback fixture. No production changes.10 passed /0 failed /0 ignored,1.46s tests after fresh33.30s intended-worktree compilation:
residency::testsincluding cached-headroom debiting and an in-flight growth reservation across sample refresh;ON_QUEUE, call productionreclaim_completed_uploads()with no further upload, require empty in-flight deque/zero queue bytes, then read back all4096 texels correctly. No artificial queue stall, device removal or low-memory condition was induced.Command:
XCL_UPLOAD_BACKOFF=1 DXVK_CONFIG='dxgi.hideNvidiaGpu = False' XCL_SOURCE_DIR=$PWD/xcl-pr3037-revised /usr/bin/bash .compat-tools/cargo-xcl-wine.sh test --locked --target x86_64-pc-windows-msvc -p xcl --lib -- residency::tests:: upload_queue_oom_arms_cooldown_stops_after_one_batch_and_queues_all_retries retry_prunes_retired_while_closed_and_ignores_same_address_replacement gpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recovers lab_completed_upload_is_reaped_without_another_submit --nocapture --test-threads=1, run through the lab's bounded scope/resource runner.Evidence:
.compat-runtime/logs/verify-xcl3037-revised-admission-20261127T183305Z/(console, result, resource samples). Sampled GPUpeak166MiB/min availableRAM9139MiB/min availabledisk11.443GiB. Scope9GiB+512MiB swap and external6000MiB GPU/2048MiB availableRAM/10GiB disk limits unchanged.Limits: diagnostic-relaxed-vtable vkd3d-proton3.2.0
2576c0b4adfae4a+, not stock-runtime certification. Synthetic commit/error injections are not Wine's real pressure behavior or a hard Linux/cgroup RAM budget. Reaping1MiB of completed staging does not prove it was returned to the OS: the free pool can retain it. The deliberately blocked-queue owner fixture was not run; no pending GPU work was freed. No matched-parent, aggregate-RAM, loading-stutter, title/Game-Init fence, or gameplay claim.Useful next gate: matched measured loading on a separately runtime-cleared stack with real admitted/deferred/reclaimed bytes, preserving producer-fence completion and distinguishing idle-pool capacity from resident RAM. This passes the changed bookkeeping/data-recovery mechanisms, not that runtime gate.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T00:13:39Z.
merge-check
base:
d1be810364head:
58ff61c296merge: clean (head fast-forwards from this base)
build: cargo build --offline --locked --workspace -> ok
tests: cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 -> 1,833 passed, 9 failed, 48 ignored, 26 explicit GPU skips on the clean head; the exact base produced 1,823 passed, 9 failed, 48 ignored, 26 skips. All nine failed instances have the same names on both revisions.
review: Not yet. At 768 MiB available commit, a 1 MiB pooled buffer can upload a small texture, while a larger request cannot grow staging under the 1,024 MiB floor. The growth denial in
take_inthen callstrim_free_in, discarding that reusable 1 MiB buffer. The next small upload is denied too and keeps retrying until headroom rises above the growth floor, although it needed no new commit. A test extension on the unmodified head failed 0/1 withDeferred("texture upload: staging growth deferred under low commit headroom"). Removing the trim on growth denial and retaining the buffer made the GPU test pass 1/1 with bit-exact small-texture readback; a low-commit control at 256 MiB still deferred and trimmed the buffer. This is a local, uncommitted candidate, not a full-suite or title result for the modified tree.performance: default-off path adds no per-upload OS query. With the opt-in path, this correction avoids repeated deferral and reallocation of smaller staging buffers after a larger growth denial. Sustained frame-time and low-commit retail behavior were not measured.
verdict: not yet: retain reusable pooled buffers when only fresh growth is denied; rerun the GPU regression and required checks on the corrected head.
hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti 12 GiB (621.35), DXC 1.8.2502.11; Codex (GPT-6.2 Sol) traced the paths, ran the exact-head/base suites and GPU regression, and drafted this check.
Local candidate and GPU regression diff
Imported from ivall/xcl. Originally posted by razormontana on 2026-11-28T00:49:38Z.
Independent native validation of
58ff61c296bda172c636a007ff102324c5c5d6f3ond1be8103644791b7a65f068954324e93d4b1b565. Windows 11 Pro build 22631, Core i7-10700K, RTX 3070 8 GB with NVIDIA 617.42, Rust 1.100.0 x64 MSVC.Tested
cargo +stable-x86_64-pc-windows-msvc test --offline --locked -j 1 -p xcl --lib --no-runpassed. Each test was selected by its fully qualified name with-- --exact --test-threads=1 --nocapture.gpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recoversfixture also passed. It simulated available commit, the cooldown clock, and the allocation HRESULT. The actual D3D12 copies after reuse and recovery read back byte-for-byte. A separate native probe verified the default hardware adapter as the RTX 3070.Not tested
Sustained OS commit pressure, actual allocation failure, the full suite, or retail behavior.
AI use
Codex GPT-6.2 ran the focused validation, checked the results, and prepared this report.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T04:55:05Z.
I checked one Windows accounting boundary for the headroom predicate at head
58ff61cusing a disposable child in a Job Object with a 204 MiB per-process commit limit.GlobalMemoryStatusEx().ullAvailPageFile, the field used by the predicate, reported 41,575 MiB both before and after imposing the process limit. In that child, a 4 MiBVirtualAllocsucceeded, while a 256 MiB allocation failed with Win32 error 1455. The sampled system headroom would clear the PR's 1,024 MiB reserve and admit that growth.This shows that system-wide available commit does not capture a tighter job/process commit limit. The probe did not allocate a D3D12 heap or test XCL's failure cooldown, so it does not establish a GPU failure or retail impact. A follow-up could check the relevant job limits if supporting constrained processes is in scope.
AI use: OpenAI Codex with GPT-6.2 Astra built and ran the probe; Codex reviewed and prepared this report.
Imported from ivall/xcl. Originally posted by upipibi on 2026-11-28T09:11:05Z.
Test report for #3037 on NVIDIA: the whole workspace suite on this PR merged onto today's
nvidia-devand onnvidia-devalone, and the PR's own tests 3 times by name.Tested
nvidia-dev54225f5884a94cd23b7aab3f703a7c975070aa77. Head:58ff61c296bda172c636a007ff102324c5c5d6f3(its merge-base with this base isd1be8103).git merge --no-ffof the head onto the base: clean, no conflicts (mod.rs,sparse.rs,texture_upload.rsandtitle_textures.rsauto-merged); the merge (3a6961a2, local) differs from the base by 8 files, +1069/-49.XCL_UPLOAD_BACKOFFnot set.cargo build --workspaceandcargo build --workspace --tests: both exit 0 on both trees, 9 and 10 warnings, the same count as the base.cargo test --workspace --no-fail-fast -- --test-threads=4, once on each tree. On both trees thexcllibrary binary stopped partway through, before printing its result. It exited with code 130088963 (0x7C10003) afterD3D12.X: coherent window could not be restored at ... (268435456 bytes, got 0x0, Windows error 487) after CreateCommandQueue: ... (0x8007000E); stopping before guest memory is used, which auma_drivermixed-window test prints. The other 39 result lines:SKIPPEDlines;SKIPPEDlines; the same per-binary results as the merge.FAILEDlines on each tree. On the merge: the 4title_texturestests below plushle::d3d12x::title_textures::tests::gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released. On the base: the same 4 plushle::d3d12x::list_x::tests::mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares, which passed in the base's 3 library re-runs and 3 of 3 times alone, and passed in the merge's run.cargo test -p xcl --lib -- --test-threads=4 --skip hle::d3d12x::uma_driver::tests::a_refused_gpu_upload_segment_becomes_custom --skip hle::d3d12x::uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment:SKIPPEDlines, the same in 3 runs;SKIPPEDlines, the same in 3 runs.hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels,…stream_recheck_keeps_the_whole_upload_baseline_over_partial_uploads,…stream_recheck_partial_upload_without_an_entry_queues_a_whole_upload,…stream_recheck_schedule_catches_late_writes_and_resets_milestones,hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memoryand…gpu_retire_queue_holds_heap_until_blocked_queue_passes_mark. Three panic on0x8007000E(E_OUTOFMEMORY) from a D3D12 call, and the other threestream_recheck_*ones on aPoisonErrorafter those panics.hle::d3d12x::title_textures::tests::gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released. It panics attitle_textures.rs:3020:106, the test'sCreateCommandQueueof a COMPUTE queue, with0x8007000E(E_OUTOFMEMORY). It failed in 4 of 4 parallel runs on the merge (the workspace run and the 3 library re-runs) and passed in 4 of 4 on the base.--exact --test-threads=1), all 7, plus the base-onlylist_xone, pass 3 of 3 times on both the merge and the base: 8 passed, 0 failed each run.SKIPPEDlines are the same on both trees: 21 "no wave64", 3 f16/f32 per-lane forms refused after #1426, 1 "no heap windows", 1 "cannot disable the driver cache".nvidia-devand the 3e2etitle tests pass on both trees;gpu_heap_flat_reads_match_guarded_and_root_outputis not innvidia-dev's test list.cargo test -p xcl --lib -- <the 11 names> --exact --test-threads=1 --nocapture. 11 passed, 0 failed, 0 ignored in each of the 3 runs, 0SKIPPEDlines. The log showsbackend 'real' – NVIDIA GeForce RTX 3070 (8017 MiB VRAM), and with noXCL_ADAPTERset the upload GPU fixture uses the default adapter.hle::d3d12x::residency::tests::commit_sample_is_cached_for_32ms_and_refreshes_afterhle::d3d12x::residency::tests::disabled_mode_is_a_complete_noophle::d3d12x::residency::tests::oom_arms_500ms_cooldown_and_expires_cleanlyhle::d3d12x::residency::tests::reserve_floors_keep_pooled_reuse_open_while_gating_fresh_growthhle::d3d12x::residency::tests::staging_growth_debits_cached_sample_and_holds_in_flight_reservationhle::d3d12x::residency::tests::upload_deferral_reaches_enclosing_observationhle::d3d12x::texture_upload::tests::gpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recovershle::d3d12x::title_textures::tests::retry_prunes_retired_while_closed_and_ignores_same_address_replacementhle::d3d12x::title_textures::tests::upload_backoff_defers_without_dropping_dirty_or_pending_textureshle::d3d12x::title_textures::tests::upload_queue_oom_arms_cooldown_stops_after_one_batch_and_queues_all_retrieshle::d3d12x::title_textures::tests::gpu_an_upload_still_running_is_kept_when_its_wait_times_out(changed by the PR)Not tested
xcl-smokeblock: no title was run.XCL_UPLOAD_BACKOFF=1in the suite: every run here had the switch unset.E_OUTOFMEMORYoutside the tests.AI use: Claude Code (Claude Opus 5.5) ran the tests above on the hardware named and wrote this report.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-28T10:50:49Z.
Ran the upload-backoff tests at
58ff61c2on an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
The two failures are
pieces_hold_the_texels_of_their_levelsandgpu_parts_of_a_texture_go_up_and_the_rest_stays, both panicking withattempt to multiply with overflowattexture_upload.rs:1137. The PR description documents pre-existing debug-only overflows in that file, so I am not attributing them to this change. The newgpu_upload_backoff_reuses_pooled_buffer_defers_growth_and_recoversGPU test passes here, as do all sixresidencytests. The thread has runs on RTX 4060, RTX 3080 Ti, RTX 3060 and Wine, but no desktop 5070 Ti.Not tested: sustained OS commit exhaustion, a paired smoke run, the full workspace suite, release profile, AMD and Intel GPUs, native wave64 hosts, a retail title, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-28T11:08:53Z.
Tested
Exact
58ff61c296bda172c636a007ff102324c5c5d6f3on thenvidia-devPR, Windows 11 x64 build 26200.9974, Ryzen 7 3800X, and Rust 1.100.1 MSVC. I verified 17 byte-exact ranges fromresidency.rs, then reran the pinned standalone CPU harness with injected samples.The failed refresh at tick 132 retained 1,040 MiB of cached availability and scheduled the next sample at tick 164. The 32 MiB request was denied. Releasing the 16 MiB reservation left 32 MiB pending without restoring its cached debit. A successful sample at tick 164 followed by a new 32 MiB grant reached the exact 1,024 MiB floor. One additional byte was denied. Later refreshes and releases restored the full sample and admitted 64 MiB again. The fixture recorded five queries and two denials.
2 passed, 0 failed, 0 ignored, 0 runtime skips. Both processes exited 0 with one test filtered out each.
Not tested
OS memory telemetry, real memory pressure, staging or D3D12 allocations, runtime scheduling, GPU or WARP, retail, CI, and the workspace suite.
AI use
T3 Code through the Codex harness (
gpt-6.2-sol) verified the source and executable, reran both tests, checked the trace, and wrote this report.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:23:39Z.
Triage (#1607) – head
58ff61cNo open or merged PR makes the same change (an opt-in commit-headroom and E_OUTOFMEMORY gate on texture upload staging). No correctness problem found in what I read (residency.rs, the texture_upload.rs and title_textures.rs changes); the off path keeps the old retry behaviour.
It conflicts with main: main's
title_textures::Entryno longer has theseqfield that the new(res, seq)retry identity andDue::seqrely on, so the rebase needs more than textual fixes. At 1069 lines it is also well over the size limit; the residency module and its wiring could be split.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:53:30Z.
Review (head
58ff61c2, diff read, not a merge-check; conflicts with main):title_textures.rsconflict: main replacedEntry::seqwithgeneration, and34273586(generation-keyedRETRY/requeue_generations) already covers part of this PR's retry-identity fix. The smoke and test results are from annvidia-devbase, and CI hasn't run since it was retargeted to main.texture_upload.rs~886-890 also throws away the reusable pooled buffer, so small uploads that could use it stay stuck, and the test asserts that (~1527).vram.rs~161, ~532,sparse.rs~1254) starts a cooldown on system-RAM staging uploads, so textures stop updating without freeing GPU memory.ullAvailPageFile(residency.rs~42-45), which ignores a job's commit limit (andrewDoing's probe).dxc::wait_for_memory6 GB,big_compile_commit_free3 GB) and share no accounting with them.GlobalMemoryStatusExhelper.retry_failed_atdrops pending or mismatched entries early, andpush_retrydeduplicates.residencymodule, then the wiring, then the error hooks and summary log.Fine: off is really off (every call checks
enabled()), the lock order holds, and the counters and tests are deterministic. Every run so far showeddeferrals=0, so the deferral path is untested in a title.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T07:51:45Z.
Closing this PR to keep the backlog focused.
Thanks to @thehollowedone, @Foniass, @pickles976, and @JJAutoCompare for the detailed reviews and verification. Since this was opened against
nvidia-dev,mainhas landed34273586(Entry::generationand generation-keyedRETRY/requeue_generations), superseding the retry-identity part of this branch, while the remaining upload-backoff path would need a full redesign and multi-PR split onmain(over 800 lines, retaining reusable pooled staging buffers on fresh-growth denial, coordinating commit-headroom accounting withmain's existing DXC commit gates and the async download pool). Every retail title run so far also recordeddeferrals=0, so it is better to revisit this as a clean, small design onmainonly if a concrete low-RAM commit-exhaustion repro requires it.(AI use: Antigravity (Gemini 4 Neon) reviewed the current
maindiff and drafted this closing note.)Pull request closed