D3D12.X: the log shows what memory is left when video memory is refused #2317
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2317
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2317"
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?
@427001 on GitHub · 2026-11-25 13:53 UTC · original
427001:memory-line-system-commit→main· +42 −7 · 4 files · 1 commits · openWhen a pool heap for title textures is refused, the log says "no video memory for more pages of title textures", and the
XCL_ACTIVITYmemory line gives the process's commit and the video memory in use. Neither says what ran out: the card, the memory the system shares with it, or the system's commit, which a PC charges video memory to as well. The warning and the memory line now also give the system's free commit with its limit, and the video memory budgets. Logging only. Part of #333.Correction (same day): this description and the first commit message said the heap was refused "only when its commit was used up". Runs with a larger page file show that was wrong for this machine. The commit is amended (
c2f4abc→70a26dd: corrected message, and the non-local figures added) and the text below is from the new runs.What the figures show on a 10 GB card with 16 GB of RAM, in three runs to the title's stop at
+0x193e00f(#333): the first refusal comes with 779 MB of commit free in one run and with 31 764 MB and 32 252 MB free in the two others, each time at 12 541 – 12 552 MB of local video memory in use against a budget of about 9.3 GB. So there the commit is not what stops it; before, the log could not tell the two cases apart.What is in it
crates/xcl/src/gpu/uma.rs:system_commit(), the system's free commit and its limit.crates/xcl/src/hle/d3d12x/real.rs:video_memory()returns the budget next to the bytes in use, for local and non-local memory;memory_left()puts the figures into one string for a log line.crates/xcl/src/hle/d3d12x/vram.rs: the warning of a refused pool heap ends withmemory_left().crates/xcl/src/host.rs: the memory line ends with; system commit N MB free of M MB; video memory budgets L MB local, K MB non-local. The start of the line, whichscripts/smoke.ps1reads, is unchanged.Tested
NVIDIA GeForce RTX 3080 10 GB (32-lane waves), driver 616.92; Intel Core i9-10900K; 16 GB RAM; Windows 11 Pro 26200.9974; rustc 1.100.0
stable-x86_64-pc-windows-msvc; tests in debug, runs in release.cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4on70a26dd: 1254 passed, 0 failed, 46 ignored. 27SKIPPEDlines of 17 tests: 20 "no wave64", 3 per-lane f16 forms refused, 1 "no heap windows", 2 without the D3D12 debug layer, 1 that cannot turn the driver cache off (no Developer Mode).The new lines at the stop, retail title 1.0.2.1, Series S profile,
XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PRESS_A_AT=40,55. These runs are not of this head:maindoes not get that far on this profile, so they are of this change applied to a local merge ofmain379725a+ #495 + #615 (runs 1 and 2 with the first version of the change, which had no non-local figures).Run 1, system-managed page file, other programs holding about 15 GB of commit:
Run 2, after a reboot with a fixed 48 GB page file:
Run 3, the same machine state, this head's lines:
The title stops at
+0x193e00fat 145.5 s, 127.4 s and 153.6 s. A run without this change stopped the same way with 12 557 MB of local video memory in use at its last memory line.Regression run
main(379725a):this PR's head (
70a26dd):Both with the Series S profile, after the reboot. 60 s stay in the title's first screens: the memory line is reached (30 times), the warning is not.
Not tested
E_OUTOFMEMORY(CreatePlacedResourceX … a resource of its own (0x8007000e), the sparse pools) are unchanged.AI use
🤖 Generated with Claude Code
@oni-swr on GitHub · 2026-11-25 14:09 UTC · original
CPU-only review and test report for
c2f4abc82c37b70f2c6e873d722e5bfe4bab8a6a(this PR's head), for #1607. GPU tests andscripts/smoke.ps1were not run.Tested
main06c9f55without conflicts (the PR's base is379725a; onlyhost.rsauto-merged).cargo test -p xcl --lib --no-runbuilds, andcargo check --workspace --all-targetsfinishes with no new warning in the changed files.video_memory()has no other caller thanhost.rsandmemory_left().cargo test -p xcl --lib -- gpu::uma::tests hle::d3d12x::real::big_compile_tests --skip gpu_: 23 passed, 0 failed, 0 ignored, noSKIPPEDline. I picked these two modules because they hold the changeduma.rs/real.rscode's neighbours and I checked that none of them creates a D3D12 device. The PR adds no test (logging only), so these show it breaks nothing there, not that the new strings are right.scripts/smoke.ps1still matches the changed line: it readsmemory: N MB committed, and the start of the line is unchanged.Review notes (not blockers)
host.rsprintssystem commit 0 MB free of 0 MBwhensystem_commit()isNone, whilememory_left()sayssystem commit not known.memory_left()makes a DXGI factory on each refused heap. The description reports 170 refusals in one run; that is cheap next to the failedCreateHeap, but it is a call per refusal.Not tested
QueryVideoMemoryInfo. Thexcl-smokeblocks in the description were not checked by me.AI use
@nnonno91 on GitHub · 2026-11-25 14:29 UTC · original
Independent Windows activity-log verification of
70a26dd652a6e2e7d8cd3b5519b42b3240bf2ad6on Radeon integrated graphics and RTX 5090.Tested
cargo build --locked --workspacepassed. I temporarily held the bundled test title for 2.6 s at its normal exit and added an assertion on the activity log to the existing e2e fixture. XCL runtime source was unchanged. Rancargo test --locked -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer -- --exact --nocapture --test-threads=1withXCL_ACTIVITY=1,XCL_NETWORK=0and each adapter selected byXCL_ADAPTER. Each run gave 1 passed, 0 failed, 0 ignored and no skips. Both temporary test edits were restored.3587 MB free of 68630 MBand budgets of15665 MB local, 0 MB non-local. The RTX 5090 reported3016 MB free of 68630 MBand budgets of24086 MB local, 15179 MB non-local.Not tested
A refused heap allocation, a retail title and the full workspace suite.
AI use
OpenAI Codex (GPT-6.2 Sol) adapted the test fixture, ran the checks and wrote this report.
@DavidM1911 on GitHub · 2026-11-25 17:52 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@Lum7nt on GitHub · 2026-11-25 19:01 UTC · original
RX 9070 XT retail verification of exact head
70a26dd652a6e2e7d8cd3b5519b42b3240bf2ad6and currentmain3ceb5507a05355719ff1d7b5c29bc52aff142000.Hardware: AMD Radeon RX 9070 XT, Windows, retail GTA 6 Xbox 1.0.2.1. Built release
xclwith Rust 1.100.0 MSVC and the bundled DXC. Both 60-secondscripts/smoke.ps1runs exited 0 with no device removals or crashes.PR head:
Current main:
The PR log emitted system commit and local/non-local video-memory budgets on this AMD adapter. The 60-second title run did not hit a refused-heap path, so it does not verify the refusal warning itself.
I also ran
cargo test --workspace -- --test-threads=4on the PR head: 1,183 passed, 2 failed, 26 ignored; 7 runtimeSKIPPEDlines. The failures were GPU fuzz seeds 722 and 1599. On current main, the focusedfuzz_validate_and_gpu_run reproduced the same two seeds (2 passed, 2 failed), so these failures are present on the baseline too. The PR test command stopped at-p xcl --liband did not finish the other workspace targets.AI use: OpenAI Codex (GPT-6; exact variant not exposed in this session) ran these checks and wrote this report.
@bmjask on GitHub · 2026-11-25 21:35 UTC · original · reviewed
No concrete source defect found. Commit/DXGI diagnostics fail cleanly and preserve existing log prefixes; current Windows CI is green. Warning-at-head, AMD/Intel, and actual commit-exhaustion scenarios remain untested, but this logging-only improvement appears merge-ready.
@luckyteagirl on GitHub · 2026-11-26 09:07 UTC · original · reviewed
On
70a26dd, the newsystem_commit()helper labelsMEMORYSTATUSEX.ullAvailPageFile/ullTotalPageFileas system commit in the activity and refusal logs. Microsoft documentsullAvailPageFileas the amount the current process can still commit, andullTotalPageFileas the lesser of the process and system limits (MEMORYSTATUSEX). If XCL runs under a tighter Job Object/process commit cap, the log can report nearly exhausted "system commit" while the machine still has substantial headroom, misleading the diagnosis this PR adds.Could this new system-wide diagnostic use
GetPerformanceInfo/K32GetPerformanceInfo(CommitLimit - CommitTotal, multiplied byPageSize), as the Microsoft reference recommends? The existingfree_commit()can keep its process-oriented meaning. A Windows CPU-only fixture in a capped child process could compare the helper withGetPerformanceInfo, allowing for sampling drift. Source/documentation review only; I did not run that capped-process fixture.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.