Shaders: under Wine, at most 4 DXC compile threads by default #2127

Open
github-bot wants to merge 1 commit from github-bot/gh-2127 into main AGit
Owner

@⁠St5sz2Jk on GitHub · 2026-11-25 05:26 UTC · original
St5sz2Jk:dxc-threads-wine → main · +39 −1 · 1 files · 1 commits · open

Under Wine, compile_threads() now defaults to at most 4 DXC threads instead of every core but one. XCL_DXC_THREADS still 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 cs into an empty cache for 120 s:

DXC threads (one process) DXIL written in 120 s
1 11.8 MB
2 19.5 MB
4 19.5 MB
8 17.8 MB
16 12.8 MB

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. With XCL_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 --processes would help --precompile here too.

The same count also bounds the xcl-pso-N pipeline 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 most WINE_COMPILE_THREADS = 4 under Wine), used by compile_threads() when XCL_DXC_THREADS is unset, with one info line when the cap applies. Unit test wine_caps_the_default_compile_threads.

Tested

  • RX 9070 XT 16 GB (RDNA4), Mesa RADV 26.3.1, Ryzen 9 5950X, 128 GB, CachyOS kernel 7.3.5-2-cachyos, Wine 11.22, vkd3d-proton ec207194 (DXVK dxgi). Rust cross-build for x86_64-pc-windows-msvc, debug for the tests, release for the runs. Head 0e84e74 on main 6020a33.
  • cargo test --workspace -- --test-threads=4 under Wine (cargo's runner set to wine), on this head and on main 6020a33:
    • -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_validation calls dxgi.dll.DXGID3D10CreateDevice, which DXVK's dxgi does not export, and Wine aborts the whole binary there (on main too).
    • the integration tests: 50 passed, 6 failed, 20 ignored, the same on main.
    • The 56 failures are the same tests on both commits (Wine/RADV ones: texture uploads, sparse VRAM, several GPU tests), so none comes from this change.
    • SKIPPED GPU tests (both): 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 cs with XCL_DXC_THREADS unset logs DXC: 4 compile threads under Wine (XCL_DXC_THREADS to choose) and precompiling … (4 compile threads; …).
  • The thread scan and the title runs in #1269 used XCL_DXC_THREADS=4 on a stacked tree (main + #684, #871, #433, #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 second main run gave 1370 frames. I can't make a clean pair here: on this RDNA4 / Wine 11.22 machine, main stops at start-up without #871 (0x80000003 at +0x2478b7b after an E_INVALIDARG, 2.7 s in; reported on #871).

main:

xcl-smoke v1
commit: 6e1e2befc7430126b1e7b98b5c3fe93813c866b6
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1368 (PresentX 1368)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

this PR:

xcl-smoke v1
commit: 0e84e7406356f8b7d6d60021a81d014a7c77d06b
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1356 (PresentX 1356)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

Under Wine peak commit reads 0 MB, so these blocks do not check memory.

Not tested

  • A regression pair on AMD (see above), native Windows (no change expected: the cap applies only under Wine), Wine versions other than 11.22 and Proton Experimental 11.0, thread counts between 4 and 8 in a title run, and a cold DXIL cache in the smoke runs (where the count matters most).

AI use

  • Claude Code (Claude Opus 5.5) wrote the change and the test, ran the measurements and the test suites, and wrote this description.

🤖 Generated with Claude Code

**@⁠St5sz2Jk** on GitHub · 2026-11-25 05:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/2127) `St5sz2Jk:dxc-threads-wine` → `main` · +39 −1 · 1 files · 1 commits · open Under Wine, `compile_threads()` now defaults to at most 4 DXC threads instead of every core but one. `XCL_DXC_THREADS` still chooses. Part of #1269 ([measurements](https://git.gtahub.st/github/xcl-dev--xcl/issues/1269)). 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 cs` into an empty cache for 120 s: | DXC threads (one process) | DXIL written in 120 s | |---:|---:| | 1 | 11.8 MB | | 2 | 19.5 MB | | 4 | 19.5 MB | | 8 | 17.8 MB | | 16 | 12.8 MB | 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. With `XCL_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 `--processes` would help `--precompile` here too. The same count also bounds the `xcl-pso-N` pipeline 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](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2127)). 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 most `WINE_COMPILE_THREADS` = 4 under Wine), used by `compile_threads()` when `XCL_DXC_THREADS` is unset, with one info line when the cap applies. Unit test `wine_caps_the_default_compile_threads`. **Tested** - RX 9070 XT 16 GB (RDNA4), Mesa RADV 26.3.1, Ryzen 9 5950X, 128 GB, CachyOS kernel `7.3.5-2-cachyos`, Wine 11.22, vkd3d-proton `ec207194` (DXVK `dxgi`). Rust cross-build for `x86_64-pc-windows-msvc`, debug for the tests, release for the runs. Head `0e84e74` on `main` `6020a33`. - `cargo test --workspace -- --test-threads=4` under Wine (cargo's runner set to `wine`), on this head and on `main` `6020a33`: - `-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_validation` calls `dxgi.dll.DXGID3D10CreateDevice`, which DXVK's `dxgi` does not export, and Wine aborts the whole binary there (on main too). - the integration tests: 50 passed, 6 failed, 20 ignored, the same on main. - The 56 failures are **the same tests on both commits** (Wine/RADV ones: texture uploads, sparse VRAM, several GPU tests), so none comes from this change. - SKIPPED GPU tests (both): `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 cs` with `XCL_DXC_THREADS` unset logs `DXC: 4 compile threads under Wine (XCL_DXC_THREADS to choose)` and `precompiling … (4 compile threads; …)`. - The thread scan and the title runs in #1269 used `XCL_DXC_THREADS=4` on a stacked tree (`main` + #684, #871, #433, #1692), not this branch. **Regression run** The two blocks are @⁠JoaoPauluu's ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2127)): 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 second `main` run gave 1370 frames. I can't make a clean pair here: on this RDNA4 / Wine 11.22 machine, `main` stops at start-up without #871 (`0x80000003` at `+0x2478b7b` after an `E_INVALIDARG`, 2.7 s in; reported on #871). main: ``` xcl-smoke v1 commit: 6e1e2befc7430126b1e7b98b5c3fe93813c866b6 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1368 (PresentX 1368) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` this PR: ``` xcl-smoke v1 commit: 0e84e7406356f8b7d6d60021a81d014a7c77d06b gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1356 (PresentX 1356) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` Under Wine `peak commit` reads 0 MB, so these blocks do not check memory. **Not tested** - A regression pair on AMD (see above), native Windows (no change expected: the cap applies only under Wine), Wine versions other than 11.22 and Proton Experimental 11.0, thread counts between 4 and 8 in a title run, and a cold DXIL cache in the smoke runs (where the count matters most). **AI use** - Claude Code (Claude Opus 5.5) wrote the change and the test, ran the measurements and the test suites, and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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 (#1269). XCL_DXC_THREADS still
chooses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:19:56 +00:00
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-25 06:12 UTC · original

A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with main (1356 here; 1368 and 1370 on the two main runs). The cap is reached: the log has DXC: 4 compile threads under Wine (XCL_DXC_THREADS to choose) at 3.95 s. The new test wine_caps_the_default_compile_threads passes under Wine.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 0e84e74 as it is (based on 6020a33) and main 6e1e2be, no uncommitted changes. Retail title 1.0.2.1, scripts/linux/smoke.sh (#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main.

Regression run

main (first run):

xcl-smoke v1
commit: 6e1e2befc7430126b1e7b98b5c3fe93813c866b6
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1368 (PresentX 1368)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

this PR:

xcl-smoke v1
commit: 0e84e7406356f8b7d6d60021a81d014a7c77d06b
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1356 (PresentX 1356)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

The second main run: 1370 frames, exit: 0x0, no device removal, no crash. Under Wine, peak commit reads 0 MB, so these blocks do not check memory.

Not tested

  • the whole test suite on this head, a cold DXIL cache (where the thread count matters most), the compile-time effect, native Windows (no cap there).

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
**@⁠JoaoPauluu** on GitHub · 2026-11-25 06:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2127#issuecomment-7154547879) A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with `main` (1356 here; 1368 and 1370 on the two `main` runs). The cap is reached: the log has `DXC: 4 compile threads under Wine (XCL_DXC_THREADS to choose)` at 3.95 s. The new test `wine_caps_the_default_compile_threads` passes under Wine. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `0e84e74` as it is (based on `6020a33`) and `main` `6e1e2be`, no uncommitted changes. Retail title 1.0.2.1, `scripts/linux/smoke.sh` (#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main. **Regression run** main (first run): ``` xcl-smoke v1 commit: 6e1e2befc7430126b1e7b98b5c3fe93813c866b6 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1368 (PresentX 1368) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` this PR: ``` xcl-smoke v1 commit: 0e84e7406356f8b7d6d60021a81d014a7c77d06b gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1356 (PresentX 1356) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` The second `main` run: 1370 frames, `exit: 0x0`, no device removal, no crash. Under Wine, `peak commit` reads 0 MB, so these blocks do not check memory. **Not tested** - the whole test suite on this head, a cold DXIL cache (where the thread count matters most), the compile-time effect, native Windows (no cap there). **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 06:32 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 06:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2127#issuecomment-7154897374) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠voiceovarian1-max on GitHub · 2026-11-25 08:07 UTC · original

Data for "Not tested: Proton's Wine, NVIDIA": with XCL_DXC_THREADS=4 a retail title's world load no longer runs this 31 GB machine out of memory (3 of 3 runs; default: 0 of 10). Here the gain is not DXC: the pipeline workers take the same count.

Not this branch: XCL_DXC_THREADS=4 on a local stack (main 9e3831e + #1315/#1316 + #867 + #871 + #877 + #1321 + #684 + #640 + #605 + #495 + #1420 + #1368's line). Of the ten default runs, two were on main 930e8b4 + #867 + #871 + #877 and the same five PRs, the others on that stack with or without its last two items.

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 + scripts/linux/vkd3d-proton-xcl.patch. Release, x86_64-pc-windows-gnu. Retail 1.0.2.1, XCL_PSO_WAIT_MS=10 XCL_COHERENT_MB=1024 XCL_PAGE_BUDGET_MB=4096. The DXIL of every compute program the title uses was already on disk (--precompile), so DXC hardly ran in these runs. A script ends a run when the system has under 3.5–4 GB available.

pso_async starts compile_threads() workers (xcl-pso-N) beside the 4 preload workers, so the cap also bounds how many pipelines are in the driver at once:

runs ended by the memory guard least memory available
default (27 → 28 + 4 workers) 10 10 (at 125–195 s) 1.8–3.9 GB
XCL_DXC_THREADS=4 (4 + 4 workers) 3 0 6.8, 8.4, 11.4 GB

What the default run does at world load (XCL_THREAD_DUMP_AT, and the process's anonymous mappings every 5 s):

t workers inside a winevulkan call anonymous mappings of 8–64 MiB resident
165 s 3 190, 7,370 MiB
170 s 7 214, 8,825 MiB
175 s 32 242, 10,599 MiB

The new mappings are 64 MiB rw-p ones at 0x7f…: glibc arena heaps, i.e. native allocations of the driver's compiler, one pile per worker. XCL's own counters (target pages, arenas, sparse pools) stay flat through it. MALLOC_ARENA_MAX=4 with the default workers does not help (guard at 125 s).

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.

**@⁠voiceovarian1-max** on GitHub · 2026-11-25 08:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/2127#issuecomment-7156634159) **Data for "Not tested: Proton's Wine, NVIDIA": with `XCL_DXC_THREADS=4` a retail title's world load no longer runs this 31 GB machine out of memory (3 of 3 runs; default: 0 of 10). Here the gain is not DXC: the pipeline workers take the same count.** Not this branch: `XCL_DXC_THREADS=4` on a local stack (`main` `9e3831e` + #1315/#1316 + #867 + #871 + #877 + #1321 + #684 + #640 + #605 + #495 + #1420 + #1368's line). Of the ten default runs, two were on `main` `930e8b4` + #867 + #871 + #877 and the same five PRs, the others on that stack with or without its last two items. **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 + `scripts/linux/vkd3d-proton-xcl.patch`. Release, `x86_64-pc-windows-gnu`. Retail 1.0.2.1, `XCL_PSO_WAIT_MS=10 XCL_COHERENT_MB=1024 XCL_PAGE_BUDGET_MB=4096`. The DXIL of every compute program the title uses was already on disk (`--precompile`), so DXC hardly ran in these runs. A script ends a run when the system has under 3.5–4 GB available. `pso_async` starts `compile_threads()` workers (`xcl-pso-N`) beside the 4 preload workers, so the cap also bounds how many pipelines are in the driver at once: | | runs | ended by the memory guard | least memory available | |---|---|---|---| | default (27 → 28 + 4 workers) | 10 | 10 (at 125–195 s) | 1.8–3.9 GB | | `XCL_DXC_THREADS=4` (4 + 4 workers) | 3 | 0 | 6.8, 8.4, 11.4 GB | What the default run does at world load (`XCL_THREAD_DUMP_AT`, and the process's anonymous mappings every 5 s): | t | workers inside a winevulkan call | anonymous mappings of 8–64 MiB resident | |---|---|---| | 165 s | 3 | 190, 7,370 MiB | | 170 s | 7 | 214, 8,825 MiB | | 175 s | 32 | 242, 10,599 MiB | The new mappings are 64 MiB `rw-p` ones at `0x7f…`: glibc arena heaps, i.e. native allocations of the driver's compiler, one pile per worker. XCL's own counters (target pages, arenas, sparse pools) stay flat through it. `MALLOC_ARENA_MAX=4` with the default workers does not help (guard at 125 s). 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.
Author
Owner

@⁠GreemSC on GitHub · 2026-11-26 08:17 UTC · original

AMD + Wine data for the memory side of this PR (complements @⁠voiceovarian1-max's NVIDIA numbers above): with XCL_DXC_THREADS=4 the retail title's anonymous memory at 240 s was 2–3 GB lower than with the default (19 here), the driver's native arenas stayed under ~1 GB, and frame pacing was better. Same reach.

Tested

  • RX 7900 XT 20 GB, Mesa 26.2.5 RADV, i7-12700K (20 threads, so the default is 19 workers), 24 GB RAM with the title capped at 16 GB + 1 GB swap, Linux 7.2, Proton-CachyOS Wine 11, vkd3d-proton with dxil-spirv 53aac41.
  • Not this branch: the switch itself on main b49be18 + a Wine stack (#1732 with #867/#871/#877, #684, #1860, #2097, #2404, #2615, #2598, #751 and diagnostics), exe unchanged between the two sides; only XCL_DXC_THREADS differs.
  • Retail title, warm caches, 360 s runs, XCL_DIRECT_DXIL=1, A pressed every 4 s from 22 s; smaps snapshots at 120 and 240 s. Default: 4 runs; XCL_DXC_THREADS=4: 2 runs.
default (19), 4 runs XCL_DXC_THREADS=4, 2 runs
title's anonymous memory at 240 s 13.8–15.4 GB 12.5 / 12.6 GB
at 355 s 14.8–15.7 GB 13.2 / 14.4 GB
native (Unix-side) anonymous mappings at 240 s 1.0–3.6 GB 0.56 / 1.06 GB
1 GB swap full from ~240 s at ~355 s / at the end
peak RAM + swap 16.6–17.0 GB 15.6 / 16.4 GB
last present 349.6–358.4 s 358.3 / 359.6 s
p99 frame time / 1 % low 1.4–1.9 s / 0.2–0.4 fps 1.1–1.2 s / 0.6 fps
crashes / device removals 0 / 0 0 / 0
  • The native mappings that grow are 8–64 MiB rw-p blocks at 0x7f…, the same glibc-arena shape voiceovarian1-max describes; a fifth run with the default worker count (and one compute program refused with XCL_REFUSE_CS) reached 5.0 GB of them at 240 s. MALLOC_ARENA_MAX=2 did not help here either (an earlier run on an older tree).
  • What still grows with 4 workers is on the PE side (title, XCL, vkd3d-proton): about 1–2 GB between 240 and 355 s; XCL's own heap stays under 1 GB.

Not tested: this branch's head (the cap through its default rather than the variable), more than 2 runs with the cap, counts other than 4 and 19, Windows.

AI use: Claude Code (Claude Opus 5.5) ran the runs, read the smaps and wrote this report.

**@⁠GreemSC** on GitHub · 2026-11-26 08:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/2127#issuecomment-7186412402) **AMD + Wine data for the memory side of this PR (complements @⁠voiceovarian1-max's NVIDIA numbers above): with `XCL_DXC_THREADS=4` the retail title's anonymous memory at 240 s was 2–3 GB lower than with the default (19 here), the driver's native arenas stayed under ~1 GB, and frame pacing was better. Same reach.** **Tested** - RX 7900 XT 20 GB, Mesa 26.2.5 RADV, i7-12700K (20 threads, so the default is 19 workers), 24 GB RAM with the title capped at 16 GB + 1 GB swap, Linux 7.2, Proton-CachyOS Wine 11, vkd3d-proton with dxil-spirv 53aac41. - Not this branch: the switch itself on `main` `b49be18` + a Wine stack (#1732 with #867/#871/#877, #684, #1860, #2097, #2404, #2615, #2598, #751 and diagnostics), exe unchanged between the two sides; only `XCL_DXC_THREADS` differs. - Retail title, warm caches, 360 s runs, `XCL_DIRECT_DXIL=1`, A pressed every 4 s from 22 s; smaps snapshots at 120 and 240 s. Default: 4 runs; `XCL_DXC_THREADS=4`: 2 runs. | | default (19), 4 runs | `XCL_DXC_THREADS=4`, 2 runs | |---|---|---| | title's anonymous memory at 240 s | 13.8–15.4 GB | 12.5 / 12.6 GB | | at 355 s | 14.8–15.7 GB | 13.2 / 14.4 GB | | native (Unix-side) anonymous mappings at 240 s | 1.0–3.6 GB | 0.56 / 1.06 GB | | 1 GB swap full | from ~240 s | at ~355 s / at the end | | peak RAM + swap | 16.6–17.0 GB | 15.6 / 16.4 GB | | last present | 349.6–358.4 s | 358.3 / 359.6 s | | p99 frame time / 1 % low | 1.4–1.9 s / 0.2–0.4 fps | 1.1–1.2 s / 0.6 fps | | crashes / device removals | 0 / 0 | 0 / 0 | - The native mappings that grow are 8–64 MiB `rw-p` blocks at `0x7f…`, the same glibc-arena shape voiceovarian1-max describes; a fifth run with the default worker count (and one compute program refused with `XCL_REFUSE_CS`) reached 5.0 GB of them at 240 s. `MALLOC_ARENA_MAX=2` did not help here either (an earlier run on an older tree). - What still grows with 4 workers is on the PE side (title, XCL, vkd3d-proton): about 1–2 GB between 240 and 355 s; XCL's own heap stays under 1 GB. **Not tested:** this branch's head (the cap through its default rather than the variable), more than 2 runs with the cap, counts other than 4 and 19, Windows. AI use: Claude Code (Claude Opus 5.5) ran the runs, read the smaps and wrote this report.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2127/head:github-bot/gh-2127'
git switch 'github-bot/gh-2127'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2127'
git switch 'github-bot/gh-2127'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2127'
git switch 'github-bot/gh-2127'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2127'
git switch 'main'
git merge --squash 'github-bot/gh-2127'
git switch 'main'
git merge --ff-only 'github-bot/gh-2127'
git switch 'main'
git merge 'github-bot/gh-2127'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.