launcher: run DXC -O0 fallback through helper with simplifycfg and warm-cache fast paths #479
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/479"
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 glovepost on 2026-11-29T14:25:08Z.
Summary
Route the DXC
-O0fallback through the persistentdxc_workerhelper and eliminate avoidable launcher/cache-prep I/O overhead so large shaders compile faster and warm launches skip redundant work:-O0compilation +-simplifycfg:tools/dxc_worker.cppnow accepts-O0and runs LLVM-simplifycfgon-O0DXIL bitcode before attachingWaveSizemetadata and assembling the container, reducing branch bloat on unoptimized fallbacks. Inproject_tuxbox/runtime_shaders.py,-O0sources route through the persistent helper with-O0 -opt-disable debug-nops(plus-fdisable-loc-trackingwhen the source exceeds 1 MiB) and fall back cleanly through CLI tiers if flags are unsupported. On a 1.06 MiBcs_6_6-O0compilation, this reduced DXILbr labelbranches from10023(3.13 s) to5029(2.39 s) withdxvclean.project_tuxbox/dxil_store.pyandproject_tuxbox/runtime_shaders.pyadd copy-on-write reply cloning (fcntl.FICLONEfor replies >= 64 KiB), single-pass DXC/DXV digesting, early release of loaded source/pixel byte buffers, removal of the duplicateportable_stagecheck inreuse_content, andos.scandirinordered_requests.project_tuxbox/scarlett_prep.pyschedules largest requests first, capsprep_jobsagainstMemAvailable(~1.5 GiB per worker, ceiling 32), and writes a stat-keyed.prep-verified.jsonmanifest so warm runs skip re-validating unchanged shaders (TUXBOX_SHADER_PREP_VERIFY=1forces full verification, documented indocs/ENVIRONMENT.mdanddocs/PROJECTSCARLETT.md).project_tuxbox/vkd3d_cache.pymerges.cache.writeusing read-onlymmapspans instead of copying full byte arrays.tests/test_dxc_worker.py(exercising realdxc/dxv),tests/test_runtime_shader_links.py,tests/test_scarlett_prep.py, andtests/test_shader_pack.py, plus the five shader Lanes suites run on both NVIDIA and AMD.Drafted with AI assistance and verified with the CPU suite and dual-GPU Lanes runs listed below.
Tested
Run the checks relevant to this change.
GPU, driver and backend:
10de:1e84), NVIDIA driver620.73.04, GE-Proton11-14 + vkd3d-proton1002:13c0), Mesa26.3.1-arch3.5(RADV RAPHAEL_MENDOCINO), GE-Proton11-14 + vkd3d-protonCommands run and their results:
Checks
CI runs the Python unit tests, the shader compiler, DXBC, and XG layout tests, and a Windows typecheck of
tuxbox-d3d12.If this pull request changes evidence JSON, regenerate the results table and the progress map and include both files: