Repository navigation
Conversation
Under Wine the DXC workers of one process mostly wait on each other: on a 32-thread Ryzen (Wine 11.22) a cs precompile wrote 11.8 MB of DXIL in 120 s with 1 thread, 19.5 MB with 2 and 4, 17.8 MB with 8 and 12.8 MB with 16. With the default of every core but one, a retail title's world load waited 35-70 s for each compute program it needed (xcl-dev#1269). XCL_DXC_THREADS still chooses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with Tested
Regression run main (first run): this PR: The second Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Data for "Not tested: Proton's Wine, NVIDIA": with Not this branch: Setup: RTX 4070 Ti 12 GB (NVIDIA 620.73.04, 32-lane waves), i7-14700K (28 threads), 31 GB RAM, CachyOS kernel 7.3.5, Proton Experimental's Wine (wine-11.0), vkd3d-proton v3.1 +
What the default run does at world load (
The new mappings are 64 MiB With 4 workers the runs end later for other reasons: the title's watchdog at 165 and 195 s (Series X, as in #505), an access violation in the title at 130 s (Series S). So on NVIDIA under Wine the cap this PR adds also does what #214 aims at. The memory figures may interest #1566 as well; I will put the heap-side numbers there. Not tested: this branch's head, plain Wine, AMD, a count between 4 and 28. AI use: Claude Code (Claude Fable 5.2) ran the runs and wrote this report; posted with the account owner's approval. |
cba6f88 to
0e84e74
Compare
…#2127, xcl-dev#2476, xcl-dev#2479, xcl-dev#2467, xcl-dev#2444, xcl-dev#2447, xcl-dev#2448 Integrates compositor RT tracking fix (xcl-dev#2480), split shader cache budget (xcl-dev#2475), foreign-thread deferred release (xcl-dev#2474), Wine 4-thread DXC cap (xcl-dev#2127), DXIL feature/reload fixes (xcl-dev#2476, xcl-dev#2479), DXC loader cleanup (xcl-dev#2467), console xcl-dev#14 null ppv guard (xcl-dev#2444), root-sig flag stripping (xcl-dev#2447), and two-pass stream canonicalization (xcl-dev#2448). Assisted-by: Antigravity (Gemini 4 Neon)
Under Wine,
compile_threads()now defaults to at most 4 DXC threads instead of every core but one.XCL_DXC_THREADSstill chooses. Part of #1269 (measurements).Under Wine the DXC workers of one process mostly wait on each other, so more threads do not help, and past a point they make it slower. On a 32-thread Ryzen 9 5950X with Wine 11.22,
xcl shaders shaders.rpf --precompile --only csinto an empty cache for 120 s:With the default (31 threads here), a retail title's world load waited 35–70 s for each compute program it needed: the title's loading threads were in
dxc::compile_cached→Receiver::recv, and the driver builds took ≤ 6 s. WithXCL_DXC_THREADS=4, the same load got through and ran the story intro. Several processes do scale (4 × 2 threads: 60.4 MB in 120 s), which shows the lock is per process; #1502's--processeswould help--precompilehere too.The same count also bounds the
xcl-pso-Npipeline workers. On NVIDIA under Proton, @voiceovarian1-max found that this keeps the world load from running a 31 GB machine out of memory: 0 of 10 runs survived with the default, 3 of 3 with 4 (comment).4 rather than 2: the two were equal in the scan, and 4 keeps more slack for compiles that wait on memory or on each other's cache flights. Native Windows is unchanged.
What is in it
crates/xcl/src/gpu/recomp/dxc.rs:default_compile_threads(cores, wine)(every core but one; at mostWINE_COMPILE_THREADS= 4 under Wine), used bycompile_threads()whenXCL_DXC_THREADSis unset, with one info line when the cap applies. Unit testwine_caps_the_default_compile_threads.Tested
7.3.5-2-cachyos, Wine 11.22, vkd3d-protonec207194(DXVKdxgi). Rust cross-build forx86_64-pc-windows-msvc, debug for the tests, release for the runs. Head0e84e74onmain6020a33.cargo test --workspace -- --test-threads=4under Wine (cargo's runner set towine), on this head and onmain6020a33:-p xcl --lib: 1048 passed, 50 failed, 26 ignored (main: 1047 passed, 50 failed, 26 ignored; the one more is the new test). One test is skipped with--skip:hle::mfplat::tests::reset_dxgi_device_manager_with_d3d12_device_and_token_validationcallsdxgi.dll.DXGID3D10CreateDevice, which DXVK'sdxgidoes not export, and Wine aborts the whole binary there (on main too).lower_dxil::tests::f16_programs_on_the_gpu(4: per-lane form refused),f32_programs_on_the_gpu(2: per-lane form refused),shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache).xcl shaders … --precompile --only cswithXCL_DXC_THREADSunset logsDXC: 4 compile threads under Wine (XCL_DXC_THREADS to choose)andprecompiling … (4 compile threads; …).XCL_DXC_THREADS=4on a stacked tree (main+ XG: fix CopyFromSubresource 7-argument ABI and guard destination span #684, Memory: avoid amdgpu userptr stalls under Wine (#175) #871, D3D12.X: sparse readbacks don't wait for a queue held by a later signal #433, Recompiler: compact dispatch can switch in two levels (XCL_COMPACT_NEST) #1692), not this branch.Regression run
The two blocks are @JoaoPauluu's (comment): RTX 3060 12 GB under Proton Experimental 11.0 with #257's vkd3d-proton patch,
scripts/linux/smoke.sh(#257), retail title for 60 s, no input. A secondmainrun gave 1370 frames. I can't make a clean pair here: on this RDNA4 / Wine 11.22 machine,mainstops at start-up without #871 (0x80000003at+0x2478b7bafter anE_INVALIDARG, 2.7 s in; reported on #871).main:
this PR:
Under Wine
peak commitreads 0 MB, so these blocks do not check memory.Not tested
AI use
🤖 Generated with Claude Code