Repository navigation
Shaders: cap the HLSL size --precompile compiles on a cache miss - #1723
PracticalStudios wants to merge 3 commits into
Conversation
0a1c528 to
6e428e9
Compare
|
Offline pass under Wine, CPU only, on We wrote the same limit before this pull request was opened and did not open ours once this one existed: Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging, Ryzen 9 9950X3D, 62 GB RAM. These passes used no card. Release, cross-compiled to Tested
The same limit on our branch, for comparison (each one pass, same machine and limit):
Read
Not tested: the rebased head AI use: Claude Code (Claude Fable 5.2) ran the passes, read the diff and wrote this report. Posted without review by a person: the account owner was away and reads replies later. |
|
Thanks, this is useful, especially the Wine numbers and the cgroup kill without the option. Agreed on both points: I'm making 8 MB the default with AI use: Claude Code (Claude Opus 5.5) wrote this reply. |
|
A whole-pack pass on this branch, the first item under Not tested, on Windows: with Tested
Result
The six refused, as the pass lists them: 147.4, 29.6, 29.5, 12.7, 12.3 and 12.0 MB of HLSL. These are the three screen-probe programs and three of the RT shadow trace programs. That is two more than the four in @LRF17's run with the same 8 MB limit: So, with this cap, the pass that ended in Not tested: the HLSL path's run time against
AI-assisted (Claude Code) |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
--max-source-mb N skips programs not cached yet whose HLSL is over N MB and lists them at the end. Off by default. The few programs over 8 MB take over 12 GB each in DXC and stall the pass (xcl-dev#1269).
Cap on by default where dxc switches to -O0 (xcl-dev#1269, xcl-dev#744); --max-source-mb 0 turns it off.
dacbefc to
fca46d4
Compare
|
Rebased onto AI use: Claude Code (Claude Opus 5.5) wrote this note. |
PR #1723 verificationClean head Tested
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 |
xcl shaders --precompileskips programs not cached yet whose HLSL is over 8 MB (--max-source-mb Nto change it,0for no limit) and lists them at the end. Part of #1269.Why: a few programs over 8 MB take more than 12 GB each in DXC and stop
--precompile --only csfrom finishing (@Sergentval, @LRF17 in #1269).How it relates to
main's other limits:XCL_PIPELINE_MAX_KBcaps the DXIL that--pipelineshands to the driver; this caps the HLSL that DXC is given, earlier, where the >8 MB programs run out of memory. With--used-onlythe cap applies to the programs that filter keeps.What is in it
shaders.rs,dxc.rs,main.rs,README.md: the option; cached programs are still used; refusals are not cached; a bad value exits with code 2.Tested
cargo test --workspace --no-fail-fast -- --test-threads=2onfca46d4: 1165 passed, 1 failed, 46 ignored. The failure (kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory) fails the same way onmainon this machine.xcl shaders shaders.rpf --precompile --only cs --max-source-mb 8, release build of this branch (f0208f3, same tree as6e428e9),XCL_DXC_THREADS=8, empty cache: compiled 2683, refused 6 (147.4, 29.6, 29.5, 12.7, 12.3, 12.0 MB of HLSL), 0 errors, 2028 s, peak commit 3.8 GB.Regression run
.\scripts\smoke.ps1 -Game <retail title> -Seconds 60, no input,main(this PR's base) first, same machine:Not tested
XCL_DIRECT_DXIL, compute programs skip DXC, so the cap does not apply.AI use