nix: use Microsoft's Linux DXC release so the DXC helper builds #650
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/650"
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 brcly/TuxBox. Originally posted by gtb-sbe on 2026-12-02T11:49:20Z.
What changes
The flake's dev shell provided nixpkgs'
directx-shader-compiler, which tracks the 1.10 preview (1.10.2605.37) and ships onlybin/andlib/. That has two effects on Nix hosts:project_tuxbox/persistent_dxc.py). It needs a whole release withinclude/dxc/dxcapi.handlib/libdxcompiler.sobesidebin/dxc, and is checked only with 1.9.2609, so every prep prints "Not using the DXC helper, so shaders compile more slowly" and runs thedxccommand line once per program, with the full pass list.docs/PROJECTSCARLETT.mdandexamples/lanes/README.mdadvise against.The flake now fetches Microsoft's Linux release 1.9.2609 (
linux_dxc_2026_09_28.x86_x64.tar.gz, pinned by hash), patches it withautoPatchelfHook(it needs only zlib and libstdc++), and puts it in the shell in place of nixpkgs' package. It is also exported aspackages.dxc. The release keeps its own layout, sofind_dxcresolvesbin/dxc, the helper findsinclude/andlib/next to it, anddxvcomes from the same release. The Lanes README's Nix note says so.Effect
In the new shell:
dxc --version:libdxcompiler.so: 1.9(5512-01b62ad4)(1.9.2609.5)build_helper()buildsbuild/dxc-helper/<key>/dxc-worker; a ProjectScarlett prep runs a pool ofdxc-workerprocesses instead of onedxcper request, and no longer prints the "Not using the DXC helper" line.Switching compilers changes the DXIL store's toolchain key, so the first prep after updating reuses no stored DXIL.
There's one more effect of moving from 1.10 back to 1.9. A linked-pipeline request (
.link) keeps the pixel program's DXIL from the run that recorded it. If that was compiled by the 1.10 preview, 1.9'sdxvrefuses it withValidator version in metadata (1.10) is not supported; maximum: (1.9), so the request fails in every prep. On my machine, 342 of 50,497 requests failed this way in the first prep after the switch. The same requests compile with 1.10's tools, and the release fails the same way without the helper, so it's the validator version, not the helper. New link requests recorded under 1.9 carry 1.9 DXIL and compile normally. A fresh setup never sees this.Checks
nix build .#dxc,nix developon NixOS (x86_64).python tuxbox.py check --no-gpu: 12 passed, 1 failed. The failure isGuestWatch(tests/test_stage_baseline.py), which fails the same way on unchangedmainon NixOS: the test linksrealpath(sys.executable), which in the dev shell is thepython3.withPackageswrapper, so the guest'scommis the real interpreter's name.tests.test_repository_hygiene,tests.test_check: pass.checkin this shell on an RX 9060 XT (RADV, Mesa 26.3.1, GE-Proton11-15): 14 of 17 groups pass, D3D12 regression controls included. Three fail:GuestWatchonly, as above.texture-publicationonly. That's #625, fixed onmainby #647 after this branch's base.alu, 23 of 362 instructions wrong, all of them NaN payloads through multiply-add (v_mad_f32,v_fma_mix_f32and similar give0x7fc00001where the console gives0x7f800001). It isn't this change:alualone with nixpkgs' 1.10 on the same commit fails with the same 23 results, value for value, and the DXIL for those shaders is identical under both compilers.AI use
I made this branch with an AI coding agent (Claude Code, following
AGENTS.md). The agent traced why the helper was never used here (missing headers, version gate), wrote the flake change and the README sentence, built the package, checked the helper builds and is used by a prep, and ran the checks listed above on my machine.