D3D12.X: warn when the title's memory budget is larger than the GPU's (#1337) #1595
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!1595
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1595"
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?
@Gruzzberry on GitHub · 2026-11-24 18:05 UTC · original
Gruzzberry:gz/warn-title-budget-over-vram→main· +62 −2 · 2 files · 1 commits · openLogs one startup warning when the console's default title memory budget (
title_memory_mb = 0: 13,824 MiB Series X, 8,192 MiB Series S) is larger than the adapter's DXGIDedicatedVideoMemory, naming both numbers and thetitle_memory_mbsetting. Nothing is clamped. Today the over-planning shows up only as a death a minute or more into the run (see pickles976's comment, point 2, on #1337).Part of #1337.
What is in it
crates/xcl/src/hle/d3d12x/real.rs:title_memory_over_vram_warning(budget, vram, explicit) -> Option<String>, called once frominit()with the VRAM of the chosen adapter; 4 unit tests. No warning for an explicit budget, enough VRAM, or unknown VRAM (WARP).crates/xcl/src/config.rs:Config::console_title_memory_mb()(the 13,824 / 8,192 choice, moved out oftitle_memory_budget_mb(), same values).Config::resolve()writes the budget intotitle_memory_mb, so the host cannot see whether it was set; "explicit" means "differs from the console default". Someone who sets exactly the default value is warned too.Tested
b7aa9f3.cargo test -p xcl --lib title_memory: 6 passed, 0 failed. Without the function the new tests do not compile (E0432 / E0425).cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on this commit: 774 passed, 0 failed, 41 ignored (mainb7aa9f3: 770 passed, 0 failed, 41 ignored). A first full run hade2e::test_title_runs_and_game_folder_is_untouchedfail while other processes were using the machine; it passes alone and the full run was repeated cleanly (the numbers above).SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64.xcl.logshows the new line:[WARN ] title memory budget 13824 MiB (the console's) is larger than the GPU's 12010 MiB of dedicated video memory: the title may plan its streaming beyond what fits; set title_memory_mb in xcl.toml (e.g. 9007) to lower itRegression run
scripts/smoke.ps1 -Game '<game folder>'(60 s, same title and warm shader/driver cache for both).main
b7aa9f3:this PR's head:
Not tested
DedicatedVideoMemorywith large shared memory would also warn.AI use
🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-24 18:32 UTC · original · edited 2026-11-24 18:35 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
7b81085(on its baseb7aa9f3).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 774 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.the_default_budget_over_the_vram_warns_with_both_numbers_and_the_setting,a_budget_the_user_set_never_warns,enough_or_unknown_vram_does_not_warn,the_series_s_budget_warns_on_a_smaller_gpu_only.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 774 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
@eizispark on GitHub · 2026-11-24 19:08 UTC · original
Hardware test report — commit
7b81085Verified
7b81085a51df9e35b20f56c2d37dba14969133bb(clean merge withmainc160d86ef2efe3a07e4dfb473e4fa72eafb413c0): pass.Tested
16191 MiBdedicated VRAM, native wave32 + wave64, driver32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 x64,rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smokecargo test --workspace --no-fail-fast -- --test-threads=4:774 passed, 0 failed, 41 ignored(GPU tests skipped on this adapter:none)hle::d3d12x::real::title_memory_warning_tests(4/4passed) andconfig::tests::title_memory_is_read_in_any_casepassed; both wave64 GPU tests skipped on NVIDIA (gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware, plusconsole_wave64_compute_through_the_pso_hook_dispatch_and_read_back) ran natively and passed on RDNA4xcl.logcheck on the 16 GB adapter (backend 'real' – AMD Radeon RX 9070 XT (16191 MiB VRAM)): confirmed no over-budget warning was emitted (16191 MiB >= 13824 MiB)Regression run
main(c160d86ef2efe3a07e4dfb473e4fa72eafb413c0):PR (
7b81085a51df9e35b20f56c2d37dba14969133bb):Not tested
< 13824 MiBVRAM GPU (covered on 12 GB in the PR description) or with explicitXCL_TITLE_MEMORYoverrides, Intel GPUs, Wine/vkd3d-proton, gameplay past the menusAI use
@MiharaxD on GitHub · 2026-11-24 19:27 UTC · original
Test report on an 8 GB NVIDIA card, head
7b81085(onmainb7aa9f3), which covers the "AMD / NVIDIA other than the RTX 4070" line with a GPU the warning is meant for.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4(debug) on7b81085: 774 passed, 0 failed, 41 ignored (lib tests 726 / 0 / 21). The fourtitle_memory_warning_testspass.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.xcl.tomlwithtitle_memory_mb = 0: the warning is logged once, at 0.6 s, before the backend line: The numbers match the card (D3D12.X: backend 'real' – NVIDIA GeForce RTX 3070 Ti (8017 MiB VRAM)), and 6012 is 3/4 of 8017.Regression run
scripts/smoke.ps1 -Game <game folder> -Seconds 60(release builds, start screen, no input).mainisc160d86:main:
this PR's head:
Not tested
title_memory_mb(e.g. the suggested 6012) in a real run, and whether the title then streams within it.AI use: Claude Code (Claude Opus 5.5) built the PR, ran the tests and both smoke runs, read the logs and wrote this report; I checked it before posting.
@DavidM1911 on GitHub · 2026-11-24 20:12 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@nikitronick-crypto on GitHub · 2026-11-25 00:39 UTC · original
Data from a 12 GB card, where this warning fires (RTX 3080 Ti, 12084 MiB dedicated, driver 621.24, Ryzen 5 7500F, Windows, release builds). I did not run this PR's head; this is about what the warning suggests, lowering
title_memory_mb.I have a branch that does the lowering automatically (standard budget = dedicated VRAM − 1536 MiB, here 10548 instead of 13824, worked out when the host starts): https://github.com/nikitronick-crypto/xcl/tree/title-memory-fit
Same binary, same title,
scripts/smoke.ps1, 60 s, no input, only the budget differs:heap_window_out_of_memory_falls_back_to_the_switch_form). Not tested: anything past the first minute or with input, 8 GB cards, an integrated GPU on real hardware.Runs were done on my PC; Claude Code (Claude Fable 5.2) analysed the logs and wrote this text, which I reviewed.
@JJAutoCompare on GitHub · 2026-11-25 05:08 UTC · original
XCL PR #1595 — Windows verification
Head
7b81085a51df9e35b20f56c2d37dba14969133bb(clean detached checkout). The diff changescrates/xcl/src/config.rsandcrates/xcl/src/hle/d3d12x/real.rs.Tested
STOR-WINLAB, AMD Ryzen 7 3800X, Intel Arc A770 with driver 32.0.101.9175, Windows 11 Enterprise Evaluation x64 build 26200. Rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). DXC 1.9.2609.5 verified with
dxc.exe --version. Cargo dev and test profiles used debug info and incremental compilation disabled.cargo build --workspacesucceeded.cargo test --workspace --no-runsucceeded and compiled the workspace test binaries.cargo test -p xcl --lib title_memory_warning_tests -- --nocaptureran withXCL_ADAPTER=NONE_CPU_ONLY. The log recorded 4 passed, 0 failed, 0 ignored, 0 explicitSKIPPEDlines, and 743 filtered out. All three commands ran outside the Arc mutex.The four fixtures check that the Series X warning includes the 13,824 MiB budget, the 12,282 MiB adapter value, and the
title_memory_mbsetting. They check that the helper suppresses warnings for an explicit budget and for higher, equal, or unknown VRAM. They also check that the Series S default warns at 6,144 MiB and stays silent at 12,282 MiB.Not tested
Only the focused PR tests and full workspace compilation ran. The full GPU workspace suite was omitted. The fixtures pass numeric inputs directly to the helper, so they leave config-to-warning wiring, real DXGI adapter detection, startup logging, and retail-title smoke tests unverified.
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
pr1595-focused.logand published.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.