shader cache: schedule independent live translations concurrently #54
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/brcly--TuxBox!54
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/54/head"
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?
@Valdi320 on GitHub · 2026-11-24 13:11 UTC · original
Valdi320:work/scarlett-parallel-shader-requests→main· +1218 −69 · 13 files · 1 commits · merged 2026-11-24 19:49 UTCChange
Schedule independent on-demand shader translations concurrently (default four, configurable 1–8), retain same-key serialization without hash-bucket collisions, and share still-published requests after a guest timeout. Publish failures before removing the source so the next generation cannot be confused with the prior failure. Bounded active jobs, ordered mixed request types, graceful drain, and no persistent refusal for transient tool errors.
Measured results
Ryzen 5 5600X / Bazzite, same xshader and DXC/DXV, synthetic compute corpus. Five repeats per configuration: 64 cold requests median 0.881 s serial, 0.300 s with four jobs, 0.229 s with eight. 170 timed batches, 6,350 responses, identical output hashes across corresponding variants; zero timeouts. Four jobs chosen to balance CPU/memory cost. Warm host-side burst median 0.074 -> 0.096 s; single cold request ~0.065 s. These are not retail game loading measurements.
Validation
Limits
Synthetic inputs, no authorized retail shader corpus/gameplay tested. Cross-process/cross-session deduplication is not claimed; only per-game-process same-key serialization. Numerical sampler-specific validation remains outside this change. AI-assisted contribution.
@DrArroway on GitHub · 2026-11-24 18:07 UTC · original
Independent check of
#54(ff033aa84) on CachyOS Linux (7.3.6-1-cachyos), AMD Ryzen 9 7900X + Radeon RX 6900 XT (1002:73bf, Mesa RADV26.3.1-arch3.4, Proton Experimental1794497090 experimental-11.0-20261112-x86_64):1. Unit & Build Checks
.venv/bin/python -m unittest tests/test_runtime_shader_workers.py tests/test_runtime_shader_links.py -v: 14 tests OK (0.078 s).venv/bin/python -m unittest discover -s tests -q: 130 tests OK (0.601 s)cargo check --locked --offline --target x86_64-pc-windows-msvc -p tuxbox-d3d12: OKd3d12_xs.dll(build.py d3d12) andxshader.2. Host Worker Latency Benchmark (
tools/benchmark_scarlett_worker.py, 3 rounds × 64 synthetic shaders)Tools:
xshader+ DXC1.9.2609.5+dxv. Zero failures and zero timeouts; all 18 phase runs (1,152total shader outputs) matched SHA-256 identically acrossjobs=1, 4, 8:--jobs10.773,0.753,0.750)40.277,0.276,0.270)80.207,0.215,0.209)3. Rebuilt
d3d12_xs.dllGPU/Proton Checks (1002:73bf)10/10passed viatuxbox.py verify:d3d12-exports,d3d12-features,d3d12-draw,d3d12-mesh,d3d12-tables,d3d12-queues,d3d12-queries,d3d12-indirect,d3d12-stream,lanes-xbox-replay.(Note:
tools/check_live_shader_worker.pywas not run here becausexvfb-runand Windowsdxcompiler.dll/dxil.dllare not installed on this host.)Synthetic/homebrew inputs only; no game data. AI-assisted.