d3d12_compile_pool_test: the graphics-only worker wakes the general one for a PSO's held-back job (TEST-COMPILE-POOL-GRAPHICS-WAKE) #2505
No reviewers
Labels
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2505
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2505"
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?
@qhukz13 on GitHub · 2026-11-27 21:21 UTC · original
qhukz13:cont/compile-pool-graphics-wake→main· +30 −1 · 1 files · 1 commits · merged 2026-11-29 01:05 UTCClaimed in the coordination issue as TEST-COMPILE-POOL-GRAPHICS-WAKE: #1608
Follow-up to #2233, a test for the case named in its review: with
LEONIDA_COMPILE_THREADS=1, a PSO's job that is not graphics waits while a graphics build of that PSO runs on the graphics-only worker, and must go when that build returns.What
test_the_graphics_worker_wakes_the_general_one_for_its_psos_jobinruntime/test/d3d12_compile_pool_test.cpp:Test only; no runtime change.
Tested
GPUs tested: NVIDIA GeForce GTX 1050 Ti 4 GB desktop (profile S), driver 582.66, Windows 10 19045. Every number below is MEASURED on that machine (n=1 per run unless given); no game files were used.
GTX 1050 Ti 4 GB, NVIDIA 582.66, Windows 10 19045, MSVC RelWithDebInfo:
ctest -R compile_pool: passes; the test executable 20 runs in a row: 0 failures.runtime/shims/d3d12_pipeline_compile.h,PipelineCompiler::run:wake_.notify_all()): fails at the new test and attest_a_finished_job_wakes_the_idle_workers;if (!graphics_only) wake_.notify_all();): fails at the new test only; every other test in the file passes.check_no_game_data.pyon the file,git diff --check: clean.AI-assisted: yes (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
@Tyrannys on GitHub · 2026-11-27 21:39 UTC · original · approved these changes
Independent verification of head
a3452751don profile M: RTX 4070 SUPER 12 GB, NVIDIA 621.01, Windows 11, Ryzen 7 9800X3D. Built onmain39f52f39cwith this PR and #2507 merged; the two PRs touch different files. MSVC RelWithDebInfo.build\RelWithDebInfo\d3d12_compile_pool_test.exe, 5 runs in a row: 5/5PASS d3d12_compile_pool.d3d12_compile_pool_test.cpp:407!pool.has_compile_waiter(). That is intest_a_checkpoint_sees_a_demand_that_started_during_it, an existing test this PR does not change. The same check (:379) also failed once onmain's copy of the test under the same load (1 of 64 runs). So it is an older flake, not this PR. The new test never failed.PipelineCompiler::runwithif (!graphics_only) wake_.notify_all();fails only the new test, at:259log.wait_finished(3, 3s), in 3 of 3 runs. Every other test in the file passes. With the source restored, all tests pass again.Clean. Approving. No game files used.
AI-assisted (Claude Code).
@timbot103 on GitHub · 2026-11-28 02:02 UTC · original
Reviewed at head
a3452751don Windows 11 (MSVC 202219.44).Verification
d3d12_compile_pool_test.d3d12_compile_pool_test(5 consecutive runs): 5/5 passed.Notes (non-blocking)
d3d12_compile_pool_test.cpp:117-123,236-261,545-556) directly exercises thewake_.notify_all()liveness path ind3d12_pipeline_compile.h:651. (Disjoint from#2510's checkpoint fix.)d3d12_compile_pool_test.cpp:74-93,253-260):Log::finishruns inside the busy callback before the general worker re-enters the pool loop, so if the general worker is delayed >100 ms before parking inwake_.wait, a mutant withoutnotify_all()could still pass when the predicate sees the unlocked job immediately; also the 3 s wait timeout has tighter margin under heavy load than the file's usual 10 s. Non-blocking.Approve.
AI-assisted review + local MSVC verification.
@zmasi on GitHub · 2026-11-28 10:22 UTC · original
#2505 | head
a3452751de(merged cleanly with main33db04a701) |ctest --test-dir runtime/build -C RelWithDebInfo -R "^(d3d12_compile_pool|d3d12_pipeline_workers)$" --output-on-failure(LEONIDA_VK_VALIDATION=1) | red check: mutatingd3d12_pipeline_compile.hso the graphics-only worker omitswake_.notify_all()failsd3d12_compile_pool_test(d3d12_compile_pool_test.cpp:259: log.wait_finished(3, 3s)), confirming the regression test is non-tautological | green on PR+main:2/2CTests pass (d3d12_compile_poolin1.86s+10/10consecutive stress runs, andd3d12_pipeline_workerson RTX 3090 in4.56swithLEONIDA_VK_VALIDATION=1and0Khronos validation errors);check_no_game_data.py0violations | Windows 11, RTX 3090 (610.88), Vulkan SDK 1.4.363.1 | AI-assisted: yes@OreoFR on GitHub · 2026-11-28 22:03 UTC · original
Verified by OreoFR
c1ecf04ed+ PR heada3452751d; green run in a merge package of 2 PRs, no new ctest failure vs mainctest -R "^d3d12_compile_pool$"AI-assisted (Claude Code, Claude Opus 5.5).
@enlight3d on GitHub · 2026-11-29 00:46 UTC · original
Run of #2505 (
d3d12_compile_pool): green at the PR head, and a behavioural red with a mutant of the runtime (the PR is test-only, so there is no non-test change to revert).a3452751de(base39f52f39c). Current main:1bc055e6c2.git merge-tree --write-tree main <head>merges cleanly.runtime/shims/d3d12_pipeline_compile.his identical on main and at the PR head, so the new test runs against main's runtime logic unchanged.Commands (in a vcvars64 shell, build folder inside the worktree):
Green (PR head):
d3d12_compile_poolPassed (1.8 s). The test executable run 20 times in a row: 0 failures.Red (behavioural, mutants of
PipelineCompiler::runinruntime/shims/d3d12_pipeline_compile.h, each reverted afterwards; same ctest):if (!graphics_only) wake_.notify_all();): Failed atd3d12_compile_pool_test.cpp:259: log.wait_finished(3, 3s), which is the new test's last wait.log.wait_started(3, 3s), another test).This matches what the description says: the first mutant is caught by the new test only. Not a "header missing" red: the file builds in all cases.
Link check: merged into main
1bc055e6c, gta6rt.exe builds and links (RelWithDebInfo, MSVC 19.44); no new imports vs main.@MoonEyes on GitHub · 2026-11-29 01:05 UTC · original
Merged after enlight3d (Thib)'s red/green run (RUN, RTX 3090, driver 621.40, Windows 11: green with this PR, red without it, and
gta6rt.exestill links) and a re-check here: no conflict withmaindcbcd4216, same head as run,no-game-datagreen, and the only ctest failures in the Windows/macOS CI jobs are tests this diff does not touch (known onmainor Vulkan: vk_xdxr_postbuild_readback vk_bindless_dimensions d3d12_compile_pool xbox_present ).AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.