Repository navigation
Shaders: budget each DXC compile by the size of its source - #1724
PracticalStudios wants to merge 1 commit into
Conversation
A compile reserves 1 GB, or 1 GB per MB of HLSL from 8 MB, instead of a flat 1 GB. A heavy one no longer skips the budget after 60 s or when the title waits: it runs when it fits, or alone. Several of them at once ran --precompile out of memory (xcl-dev#1269).
82e608a to
8e0cb77
Compare
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
XCL PR #1724 verificationClean detached head Tested STOR-WINLAB ran Windows 11 build 26200 on an AMD Ryzen 7 3800X and Intel Arc A770 with driver 32.0.101.9175. DXC reported 1.9.2609.5. Rust was
Workspace failures and skips
Not tested Matched 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 |
|
NVIDIA report, head
AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted). |
|
NVIDIA and AMD full-suite run, to go with the reports above by JJAutoCompare, upipibi, since none of them covers AMD. Tested exact head Tested
Not tested
AI use
|
|
Independent desktop NVIDIA verification of PR #1724 at head Environment
Targeted tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --lib gpu::recomp::dxc:: -- --nocapture (3 consecutive runs) |
27 passed; 0 failed; 0 ignored; 817 filtered out × 3 (0.44s, 0.44s, 0.44s, 0 skipped; includes all 13 new admission_tests:: compile memory-budget tests plus live DXC 1.9.2609.5 version_tests:: and cache_tests::) |
cargo build --release -p xcl |
Clean build (1m 20s, exit 0, 0 new warnings in dxc.rs) |
Paired quiet 60 s retail smoke (title: 29640639)
(Note: scripts/smoke.ps1 at c160d86e predates 9683e7a6 and printed the local folder basename on title:; replaced below with the standard 9683e7a6 title hash 29640639, with all measured fields verbatim.)
Exact parent & merge-base (c160d86ef2efe3a07e4dfb473e4fa72eafb413c0):
xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1533 (PresentX 1533)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14721 MB
PR #1724 (8e0cb77243cf696eec05de67f4092dbd799f0d4b):
xcl-smoke v1
commit: 8e0cb77243cf696eec05de67f4092dbd799f0d4b
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1548 (PresentX 1549)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14712 MB
Limits of coverage
- All
27/27gpu::recomp::dxc::tests (0skipped) — including all13new source-size admission/heavy-compile reservation tests (admission_tests::) and live DXC1.9.2609.5compilation/cache tests — passed3/3. - The 60 s retail smoke runs cleanly (
0device removals,0crashes, steady 60 Hz) on this 32 GB RAM host where cached shaders and ample commit headroom do not hit low-memory heavy-compile throttling; single-run frame/commit delta vs. parent reflects normal startup variance.
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
|
Same problem as #1723 (same author), #1762 and #2950 (#1269), solved differently: here a compile of 8 MB of HLSL or more reserves 1 GB per MB and needs that much physical memory too. #2950 also reserves per job, but in tiers that stop at 1 GB. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
DXC compiles now reserve memory by source size instead of a flat 1 GB, and a heavy compile (8 MB of HLSL or more) can no longer skip the budget. Part of #1269.
Why: programs over 8 MB take more than 12 GB each in DXC; several at once ran
--precompileout of memory (@Sergentval, @LRF17 in #1269).How it relates to #1774 (merged): that one admits driver compiles by DXIL size; this one admits the DXC step before it, by HLSL size.
What is in it
dxc.rs: a compile reserves 1 GB, or 1 GB per MB of HLSL from 8 MB. A heavy one runs when it fits, or alone. A heavy compile the title waits for briefly holds back background compiles so it is not starved. Unit tests for the rules.Tested
cargo test --workspace --no-fail-fast -- --test-threads=2: 870 passed, 1 failed, 42 ignored. The failure (kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory) fails the same way onmainon this machine.Regression run
.\scripts\smoke.ps1 -Game <retail title> -Seconds 60, no input,mainfirst, same machine:Not tested
AI use