Scripts: stop shader precompile at a private commit budget #1746
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1756"
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?
Imported from ivall/xcl. Originally posted by NemesisDawn on 2026-11-24T20:17:10Z.
Add an opt-in Windows wrapper for offline shader precompilation. It samples the XCL process’s private commit every 100 ms and stops it at a user-set threshold. Completed cache files stay available for the next run. Part of #1657.
What is in it
scripts/precompile-budget.ps1launches and monitors XCL. The README shows how to use it, andscripts/precompile-budget.tests.ps1exercises it with a native test process.Tested
f86b011,scripts/precompile-budget.tests.ps1passed on Windows PowerShell 5.1 and PowerShell 7.6.9. A normal child preserved its arguments and exit code. A child allocating memory stopped with exit code 4 at a 74 MiB sample with a 48 MiB budget, leaving a completed fixture cache file intact.Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:14:35Z.
Tested exact head
f86b011, script tests only, since this PR has no test report yet.Tested
powershell.exe -NoProfile -File scripts/precompile-budget.tests.ps1at the head: exit 0,Both precompile budget checks passed.(it prints the stop message:XCL precompile stopped at 74 MiB private commit (limit 48 MiB)).266b845): not applicable:precompile-budget.ps1is new in this PR, so main has nothing for the test to run.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:04:41Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by anes66 on 2026-11-25T15:18:00Z.
Independent Windows 10 CPU-only check of exact head
f86b01177dee524b4382232efb3f220b6bbd2841: the checked-in synthetic wrapper tests passed in Windows PowerShell and PowerShell 7.Tested
git archive; both extracted file hashes match the Git blobs at this commit. The fixture was compiled with the installed .NET Framework C# compiler.powershell.exe -NoProfile -ExecutionPolicy Bypass -File <scripts/precompile-budget.tests.ps1>and the equivalentpwsh.execommand: both exit 0 and printBoth precompile budget checks passed.Not tested
Real XCL, a shader pack, cache reuse by XCL, a title, GPU execution, Cargo suite, cancellation/error cleanup paths or a hard memory ceiling. The 74 MiB sample with a 48 MiB threshold confirms the documented sampling overshoot; it is not a hard commit cap.
Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T18:06:39Z.
Tested cancellation at
f86b01177dee524b4382232efb3f220b6bbd2841on Windows 11 (26100.9711), using the unmodified wrapper and a small synthetic .NET child. The child wrote a completed cache sentinel and its PID, then slept for up to 15 seconds. I verified the live process's executable path before stopping the calling PowerShell pipeline.Both runspaces reported
Stopped. In both shells the normal short-lived fixture returned its exit code 23, and the missing-input and missing-executable cases returned path errors before launching the child. This checked ordinary pipeline cancellation below a 256 MiB threshold. No live XCL process, shader pack, GPU, retail game, forced host termination or memory-pressure run. OpenAI Codex (GPT-6) ran these checks and wrote this report.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:40:20Z.
Triage (#1607) – head
f86b011#1804 ("Part of #1657" too) works on the same memory problem inside
shaders.rs(skips reloading cached PSO blobs); this PR wraps the precompile in an external watchdog instead. Different approaches, not a duplicate.#1657 was closed on 2026-11-24 after the growth was traced to #1307 and fixed on main (#1321, #1748), so the README's motivation for this wrapper may no longer hold; worth confirming with a run on current main.
precompile-budget.tests.ps1assigns to$input, which is a PowerShell automatic variable; a different name avoids surprises. The PR conflicts with main's README.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.