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

Closed
ghost wants to merge 1 commit from upstream-pr/1515 into main
ghost commented 2026-11-24 17:10:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ghost on 2026-11-24T17:10:10Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:5476829703 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1515). Originally posted by [ghost](https://github.com/ghost) on 2026-11-24T17:10:10Z. --- 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](https://claude.com/claude-code)
gut0to commented 2026-11-24 18:52:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:52:19Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:ivall/xcl:review:6045373953 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1515#pullrequestreview-6045373953). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-24T18:52:19Z. **Review:** COMMENTED --- 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 commented 2026-11-24 19:07:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:53Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7141305488 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1515#issuecomment-7141305488). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:53Z. --- 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 commented 2026-11-24 21:08:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by rrrarrra9 on 2026-11-24T19:31:12Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7142214244 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1515#issuecomment-7142214244). Originally posted by [rrrarrra9](https://github.com/rrrarrra9) on 2026-11-24T19:31:12Z. --- 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.
Foniass commented 2026-12-01 05:58:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:58:38Z.


Triage (#1607) – head 285228b

Main commit e2716790 (xcl run: say when the process is past its video memory budget) already makes real::video_memory return (local, non-local, budget), adds the budget to the activity memory line and logs a warning every 2 s while local use is over it (real::over_video_budget, host.rs). The only part not on main is the early warning within XCL_VRAM_HEADROOM_MB of the budget; if that is still wanted it would be a small follow-up on top of main's code.
Recommendation: close (superseded by main commit e2716790).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302340245 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1515#issuecomment-7302340245). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:58:38Z. --- **Triage (#1607)** – head 285228b Main commit e2716790 (xcl run: say when the process is past its video memory budget) already makes real::video_memory return (local, non-local, budget), adds the budget to the activity memory line and logs a warning every 2 s while local use is over it (real::over_video_budget, host.rs). The only part not on main is the early warning within XCL_VRAM_HEADROOM_MB of the budget; if that is still wanted it would be a small follow-up on top of main's code. Recommendation: close (superseded by main commit e2716790). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1505
No description provided.