Recompiler: a waiter for a shared shader compile makes it wanted (#2608) #2800
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2800
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2800"
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?
@oni-swr on GitHub · 2026-11-26 13:50 UTC · original
oni-swr:t3/xcl-2608-shared-shader-demand→main· +207 −9 · 2 files · 1 commits · draftTwo pipelines can share a translated shader or the same DXC source, and the first build to take the flight compiles while the others block on it. The DXC job captured only the first build's demand, so when the title waited for a pipeline that had joined a background build's compile, the compile stayed unwanted and
wait_for_memorykept holding it back as a background job. A caller that has to wait now registers its demand on the flight, so a compile a title is waiting for counts as wanted.Fixes #2608
Part of #2088 and #2508.
What is in it
crates/xcl/src/gpu/recomp/dxc.rs: both flights are adxc::Flight; waiters register their demand on it, anddxc::demandis wanted while the thread's own build or any waiter of a flight it is in wants it. Two tests, one per flight: a background owner blocked in its compile and a joiner the title then waits for.crates/xcl/src/gpu/recomp/pso.rs: theShaderKeyflight uses it.Tested
cargo test --workspace -j 4 --no-fail-fast -- --test-threads=4on6b6929f6: 1436 passed, 1 failed, 47 ignored, over 37 test binariesgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722), #2115: it fails the same way onmainb49be183(2 of 2 runs) and on this head (3 of 3 runs)f16_programs_on_the_gpu(4 cases,V_MUL_F16/V_PK_MUL_F16),f32_programs_on_the_gpu(2 cases,V_CVT_F16_F32),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)6b6929f6(clean detached checkout, RX 7800 XT driver 32.0.31035.1003, noXCL_ADAPTERset,cargo build --workspacefirst) with the same command: 1436 passed, 1 failed, 47 ignored over 37 test binaries (lib: 1310 passed, 1 failed, 27 ignored), 7 SKIPPED messages, the same seed-722 failure. The counts match the line above.a_waiter_for_a_shared_shader_makes_its_compile_wantedanda_waiter_for_the_same_source_makes_its_compile_wanted, pass. Without the waiters' demand both fail at the demand assertion.Regression run
Same title, 60 s each, same machine, one after the other (RX 7800 XT). Blocks pasted unedited from
scripts/smoke.ps1.main:
PR:
Not tested
AI use
🤖 Generated with Claude Code
@ettehn on GitHub · 2026-11-26 13:54 UTC · original
Independent Windows check of demand propagation across two nested flights on
6b6929f6f095ac2708be14a8ebe250e4022267fe, with one local test added and production code untouched. The probe ran three synthetic PSO jobs on the actual PSO worker pool. The background owner held the source flight. A second job held the shader flight while waiting on that source, and a third job waited on the shader flight. The source owner’s captured demand stayed false untilwant()marked the third job, then became true. After completion both waiter lists were empty and the captured demand returned to false. The nested case also passed in 20 out of 20 fresh test processes.Windows 11 build 26200, Ryzen 9 8945HX, Rust 1.97.1 MSVC debug,
XCL_DXC_THREADS=4:4 passed, 0 failed, 0 ignored, no reported skips. This verifies the demand signal and its cleanup. Memory-pressure admission, GPU execution, a retail title, and the full suite were outside this run.
OpenAI Codex assisted with the probe and verification. The exact model identifier was unavailable in this session.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.