Repository navigation
fix(agc): prioritize demanded shader preparation - #4404
oneandonlydean merged 1 commit into
Conversation
|
Windows test (MinGW GCC 15.2, Release, Windows 10, RTX 4080 SUPER). Built on main
Not tested: no game run. The batch was built once, not per PR; nothing failed, so no bisect was needed. AI-assisted (Claude Code). |
|
Tested on Windows with Black Myth: Wukong (PPSA23226). This PR fixes a hang there. Without it: the title never presents a frame. With a warm shader cache, queue 0 stops executing after 173 submissions, at about 167 s. The queue worker is parked in With this PR:
The title now presents frames, the first at 45.6 s. Queue 0 executes 343 submissions, and Unreal reaches level and game-mode setup. There is no GameThread timeout. It runs until an unrelated crash at 262 s.
|
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
c5eceec to
68c2b0f
Compare
|
Rebased cleanly onto main |
What
Lost Soul Aside (PPSA26358) can stop during startup with
LastObjectNotReadyForFinishDestroy is NULLwhile a game task waits inAwaitRegisteredPreparation. The registration pool processes jobs in FIFO order, so a shader needed immediately can sit behind hundreds of unrelated preparation jobs even with a warm disk cache.Tag registration jobs with their prepared-state identity and move the requested job to the front when a caller waits for it. Record demand before consulting the queue, so a request arriving between snapshot publication and job submission also receives priority. Existing running jobs complete normally; queued work is retained, each job executes once, and preparation failures still propagate. Shader instruction semantics are unchanged.
Tested
Windows 11, GCC 15.2 Release, RTX 5070 (12 GB, driver 617.14), Ryzen 7 7800X3D, 32 GB RAM. Branch based on main
fc1f063f5; head68c2b0f74.agc_driver_prepared_publicationpasses without skips in 0.66 s. The regressions verify that demanded work runs first without duplication, both after enqueue and when demand arrives before enqueue.demanded preparation waited behind background work or ran twice. Restoring it passes.No game run was repeated for this rebase. Earlier title tests used the integration described in #4401, including unmerged rendering/ancillary/IR-memory/direct-memory fixes. This branch contains only the scheduling change and its regression tests. Level loading still exhausted available commit headroom and the memory guard stopped the game; gameplay and complete compatibility are not claimed. Rendering and startup audio are separate from this scheduling fix.
tools/check_conventions.py --base origin/mainandgit diff --checkpass. Linux, console hardware and collaborator-triggered full CI were not run.Checklist
main; no other open PR implements this demand-priority behavior. Related perf(agc): resolve static shader ABIs on the background pool #2589 moves static ABI preparation to the background pool; this change prioritizes existing registration jobs.