Skip to content

Activity: the local video memory budget, and a warning within XCL_VRAM_HEADROOM_MB of it - #1515

Draft
oishigeso wants to merge 1 commit into
xcl-dev:mainfrom
oishigeso:vram-budget-log
Draft

oishigeso wants to merge 1 commit into
xcl-dev:mainfrom
oishigeso:vram-budget-log

Conversation

@oishigeso

Copy link
Copy Markdown

The activity memory line showed local video memory in use but not the budget DXGI gives the process, so going past it (the driver then moves resources to system memory, and frames slow down) did not show. The line now carries (budget N MB), and a warning is logged, at most once a minute, when use comes within XCL_VRAM_HEADROOM_MB (default 1024) of the budget. Related: #646.

What is in it

  • crates/xcl/src/host.rs: the budget in the memory line, the warning
  • crates/xcl/src/hle/d3d12x/real.rs: video_memory also returns the local budget (DXGI_QUERY_VIDEO_MEMORY_INFO::Budget)

Tested

  • AMD Radeon RX 6700 XT (driver 32.0.21030.2001), Ryzen 5 3600, Windows 10 Pro 19045, rustc 1.100.0, release
  • Logging only; in every test run of a retail title on this PC for a day

Regression run

main:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: AMD Radeon RX 6700 XT
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 373 (PresentX 374)
presents per 2 s (last 3): 0 28 60
device removals: 0
crashes: 0
peak commit: 19259 MB

PR (this PR's head commit; the title is run through a folder named RetailTitle):

xcl-smoke v1
commit: 285228bfb1316fb36fb1a5e8549d30b116d9538d
gpu: AMD Radeon RX 6700 XT
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 574 (PresentX 575)
presents per 2 s (last 3): 44 60 60
device removals: 0
crashes: 0
peak commit: 18821 MB

Not tested

  • NVIDIA, Intel; Linux / Wine

AI use

  • Claude Code (Claude Opus 5.5) wrote the change and this description, and ran the tests and runs above on my PC at my direction.

🤖 Generated with Claude Code

…M_HEADROOM_MB of it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@gut0to gut0to left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for including the paired smoke runs. CONTRIBUTING.md also requires the full workspace GPU suite and its pass/fail/ignored plus skipped-test details. The Tested section has no workspace-suite result for this head; please add it before merge. AI-assisted review; I checked the report against the guide.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

@rrrarrra9

Copy link
Copy Markdown

A second data point for the budget field from a Windows GTX 1650 (4 GB). With local logging at e1c920e6c5b759e06ea2d9e26c6b78fdd0cfab58 (based on b7aa9f3), the DXGI local budget was 3,344 MiB while sampled local usage reached 13,876 MiB shortly before 0x887a0005. The same sample showed 4,969 MiB non-local usage against a 15,289 MiB non-local budget. Logging both segment budgets helped compare the runs in #1702, which moved texture heaps to system memory.

Not tested This PR head and its warning threshold. These measurements come from the independent local logging build.

AI use OpenAI Codex with GPT-6.2-Sol summarized the local logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants