Repository navigation
perf(agc): leave a lazily registered shader's resolved ABI to its first use - #7644
Conversation
|
This pull request is labeled |
|
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.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
@EagleBearerYS here's Astro's Playroom (PPSA01325) with
Playroom shows no saving here. I don't have Resident Evil Village, so this doesn't test the ~4.5 GB in the description. |
CnRJay
left a comment
There was a problem hiding this comment.
The memory result is clear and repeats (menu private memory down 4,489 and 4,119 MB across two pairs, 21.4-21.9 GB against 25.6-26.5 GB), the cold-cache control shows it isn't the shader cache, and the test compares the lazy end state with eager preparation entry by entry.
What the PR does not show is the price. The preparation does not go away; it moves from boot to a shader's first draw or dispatch, on the queue worker.
- Both Village pairs are at the static menu, at about 40 s per frame (one present in 530 s per arm). The description says they can't resolve a frame-time difference, and that is true, but it also means nothing here measures the case this change affects: the frames in which many shaders are drawn for the first time (entering the first area). Please capture the transition from menu into gameplay, warm shader cache, with and without the change, and post the worst frame times and the time to the first stable gameplay frame. If entering an area now hitches by the preparation of hundreds of ABIs, the memory is paid for with stutter.
- "Two threads making the first use at once may each prepare an entry." That's two compiles of the same ABI on the hot path. Use a once-per-ABI flag so the second thread waits for the first, and say what the test shows about it.
- The
[shaders] deferred ABIscounter is diagnostics that prints to stderr every minute for everyone. Put it behind a profile switch, or keep it out of the PR. - It carries #6366's three commits first. Rebase once that merges so only this PR's commits show, as the title says.
adriadam10
left a comment
There was a problem hiding this comment.
Thanks, the lazy-vs-eager end-state test is a good check. Before this can merge:
- Conflicts with
main, and the history. #6366 is merged, so please rebase ontomainso only this PR's commits remain (no merge commits, per CONTRIBUTING). - The cost isn't measured. The memory saving is clear on Resident Evil Village, but the preparation moves to a shader's first draw/dispatch on the queue worker. Both pairs are at the static menu (~40 s per frame), so nothing covers the frames where many shaders are drawn for the first time. Please capture the menu → first gameplay transition on a warm shader cache with and without the change, and post the worst frame times and the time to the first stable gameplay frame (same ask as @CnRJay's review).
- Duplicate preparation on the hot path. "Two threads making the first use at once may each prepare an entry" means two compiles of the same ABI. Make the first use once-per-ABI (the second thread waits) and add a test that exercises it.
- Counter output. The
[shaders] deferred ABIs: ...line goes to stderr every minute for every user (ShaderRegistry.cpp, the newfprintf(stderr, ...)). Put it behind a profile switch or drop it from this PR. - Evidence beyond one title. @fma-rc's Astro's Playroom run shows no saving with this head (16.4 GB vs 16.1 GB at 600 s). Please state which workloads this helps, so the switch's benefit isn't read as general.
Driver::PreparedEntries returns how many artifacts the registered header of a shader holds prepared, after its pending registration preparation settles, so tests can tell a prepared shader from one left to its first use.
…st use Under APS5_LAZY_SHADER_PREPARE=1 registration prepares nothing, but ResolveShaderAbi still planned and prepared every compute or pixel stage whose ABI the title resolved, so a title that resolves every shader's ABI prepared them all at boot whether they ever drew. With lazy preparation ResolveShaderAbi now plans the stage with the ABI's state (its register and entry-point checks, as lazy registration keeps them), records the ABI key, and queues the ABI's context and primitive registers on the shader. The shader's first draw or dispatch plans and prepares the queued ABIs with that state before it looks for its artifact, so a shader that never draws or dispatches stays unprepared and one that does gets the entries eager resolution would have made. A stage whose plan fails is deferred as before. Without the switch nothing changes; graphics-stage ABIs are still prepared when they are resolved. Test: agc_driver_lazy_resolved_abi resolves the ABI of four lazily registered shaders and draws two. None holds prepared entries after resolution, the two that never drew still hold none, and a drawn one draws the same bytes as with eager preparation in a child process.
…he switch agc_driver_lazy_resolved_abi spawns itself with --eager-reference to draw the reference bytes with eager preparation, and only sets APS5_LAZY_SHADER_PREPARE for itself after the child returns. Run with the switch already exported, as a CI run of the whole suite with lazy preparation does, the child inherited it, prepared nothing at its ABI resolution and failed with "eager preparation left the resolved shader unprepared". The test now removes the variable before it spawns the child. agc_driver_lazy_resolved_abi_switch_set runs it with the switch exported.
…he files with eager preparation agc_driver_lazy_resolved_abi compared only the bytes one lazily resolved shader drew with eager preparation's. Both processes now run the same scenario, and the lazy one compares what it ends with against the eager one's report: - five synthetic pixel shaders, four resolved with empty ABI registers and one with its draw's own context and primitive registers, three of them drawn; - each drawn shader's prepared entries, fingerprinted by the SPIR-V content hash and the source key, equal what eager resolution and the draw made: a draw with the ABI's state finds the ABI's entries, a draw with another state adds its own. Entries eager registration alone made for a state no ABI names are left out, as lazy registration makes none; - the shaders that never drew hold no entries, and nothing is prepared or prebuilt at resolution; - the pipeline libraries built, after the prebuild pool has drained, equal eager preparation's, so the first use prebuilds the registration module's library as resolution did; - both runs share one shader disk cache, and the lazy run writes no file the eager run did not. Driver::PreparedEntryHashes and Driver::PrebuiltLibraries expose the fingerprints and the library counts to the test. Each check fails when its part of the first-use preparation is removed: without the prebuild device the libraries differ (eager 1 2 2 1, lazy 1 1 1 1), and without the ABI's context registers the shader drawn with them holds other entries.
…paration agc_driver_lazy_resolved_abi's eager/lazy comparison now also covers the ways the state a deferred ABI keeps could differ at its first use: - the ABI's context and primitive register arrays are overwritten after resolution and before any draw; - one shader is resolved with two ABIs, the registered state and its draw's, before any use; - a second header is registered for a shader whose ABI is queued, a draw uses it, then the first header is registered again and drawn. Each drawn shader still ends with the entries eager resolution and its draws made: drawn with the ABI's state it finds them, the second header prepares its own, and the re-registered header finds its queued ABI's.
agc_driver_prepared_shaders_abi_deferred_compute resolves the ABI of a compute shader whose s_swappc_b64 calls a user-data pointer and requires the resolution to attempt its front end once. Under APS5_LAZY_SHADER_PREPARE=1 the resolution only plans the stage and leaves the attempt to the first dispatch, so with the switch exported the test failed on that expectation before reaching the dispatch. With the switch set the test now requires that neither resolution builds a front end, and still requires the dispatch to run both callees. agc_driver_prepared_shaders_abi_deferred_compute_lazy runs it so: the first dispatch logs the queued ABI's failure once, links the callees and writes 3 * (5 + 64) in every lane.
Under APS5_LAZY_SHADER_PREPARE=1 a shader's first draw or dispatch prepares the ABIs ResolveShaderAbi queued on it, then looks for its own artifact. Whether that artifact is among the entries the queued ABIs just prepared decides whether the queued preparation is the use's own work or extra. Each first use that prepared queued ABIs now counts as found when the artifact it uses is among the entries that preparation added, or as own when it prepares its artifact itself. Entries prepared from queued ABIs are marked, and the first lookup that matches one counts it, so the entries no use ever matched are counted too. The counters are relaxed atomics touched only by a lookup that matched or prepared. On the first change and then at most once a minute stderr shows [shaders] deferred ABIs: N prepared at first use, F found their artifact there, O prepared their own; U of the E entries prepared from them never matched a use Driver::DeferredAbiUses returns the same counts. Test: agc_driver_lazy_resolved_abi checks that its two draws whose state differs from the resolved ABI count as own with every queued entry unmatched, and resolves a fifth shader's ABI with its draw's context and primitive registers, whose draw counts as found and matches one entry.
…at once The first use of a shader whose ABI was deferred swapped the deferred list out and prepared it unlocked. A second queue reaching the shader meanwhile found the list empty and no entry yet, so it prepared an artifact of its own under the lock, and the first use then matched that artifact instead of the one its preparation made. Mark the shader while its deferred ABIs are prepared and have other uses wait on the settled condition until the entries are published. The entries of all deferred ABIs are published together under the lock. agc_driver_prepared_shaders_abi_deferred_concurrent_lazy submits the first dispatches of one deferred ABI from four queues at once and requires one first use that found its artifact, no own preparation, every front-end build and entry to come from the deferred ABI, and all four dispatches to use the same entry of it.
The deferred ABI line went to stderr in every run that resolved an ABI at its first use. Print it through the profile output, like the [rescache] and [gpu] lines, and only when APS5_PROFILE_DRAW is set. The counters keep counting either way.
40e0d96 to
1ba2206
Compare
|
@adriadam10 @CnRJay, thanks for the reviews. 1ba2206 is a rebase onto History. The branch is rebased onto
Once per ABI (4eeeeb6).
The counter line (1ba2206) prints only under Which workloads. The saving is the memory of entries prepared for resolved ABIs that a title never draws or dispatches with. Resident Evil Village (PPSA01556) resolves every shader's ABI at boot, and saves ~4.1 to 4.6 GB at the menu. @fma-rc's Astro's Playroom (PPSA01325) run shows no saving. Without The cost at first use. A Resident Evil Village pair across the transition from the menu into first gameplay is queued, on a warm shader cache, with and without this head, both under |
|
@adriadam10 @CnRJay, here's the Resident Evil Village (PPSA01556) transition pair from the menu into first gameplay, as promised: one matched pair, without and with this PR. Setup
Results
Per frame over the frames above 2 s, counted where a phase is among the frame's eight largest:
"First lit gameplay frame" is the end of the opening scene's fade-in. Gameplay then runs at about 0.1 fps on this machine, so there's no stable frame rate to time. Reading: there's no measurable difference in the time into gameplay or in the worst frames. With the change, the shader disk cache was asked for half as many entries, which fits the entries it leaves unprepared. But both runs are memory-bound: page-ins run at about 5,000 to 45,000 a second, and An earlier warm-up run with the change used the other host-import mode, which turns up on any tree, so it isn't compared here. The first gameplay summary line of each run, and the digest of the first minuteWithout (
With this PR:
{"commit": "63d541433884", "dirty": false, "env": {"APS5_HOST_IMPORT_MIB": "6400", "APS5_LAZY_SHADER_PREPARE": "1", "APS5_NO_GPL": "1", "APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_DIR": "<path>", "APS5_TRACE_SUMMARY_EVERY": "1"}, "gpu": "NVIDIA GeForce RTX 3070 Laptop GPU", "driver": "NVIDIA 617.42", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 9 5900HS with Radeon Graphics", "cpu_threads": 16, "memory_mib": 15776, "title_id": "PPSA01556", "title": "Resident Evil Village", "content_version": "01.210.000", "resolution": "3840x2160", "window": {"spec": "summary_every 1", "first_present": 3492, "ms": 7753.104}, "interval_start_s": 2081.053, "interval_end_s": 2088.806, "presents": 1, "frame_ms": {"p50": 7753.104, "p90": 7753.104, "p99": 7753.104, "max": 7753.104}, "gpu_busy_ms_per_present": 227.673, "worker_busy_pct": {"queue worker 0x0": 99.82, "queue worker 0x38": 0.279, "queue worker 0x28": 99.29, "queue worker 0x20": 79.593}, "top_phases_ms_per_frame": {"Driver.Packet": 21628.011, "Driver.Packet.memory_wait": 11854.178, "Driver.Packet.dispatch": 4528.933, "Driver.Dispatch": 4505.071, "Resources.Complete": 4217.389, "Driver.Packet.draw": 3613.669, "Driver.Draw": 3611.741, "Graphics.Draw": 3085.413}, "trace_dropped": false, "trace": ""}
{"commit": "074e31acbeb2", "dirty": false, "env": {"APS5_HOST_IMPORT_MIB": "6400", "APS5_LAZY_SHADER_PREPARE": "1", "APS5_NO_GPL": "1", "APS5_PAD_INPUT_FILE": "<path>", "APS5_TRACE_DIR": "<path>", "APS5_TRACE_SUMMARY_EVERY": "1"}, "gpu": "NVIDIA GeForce RTX 3070 Laptop GPU", "driver": "NVIDIA 617.42", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 9 5900HS with Radeon Graphics", "cpu_threads": 16, "memory_mib": 15776, "title_id": "PPSA01556", "title": "Resident Evil Village", "content_version": "01.210.000", "resolution": "3840x2160", "window": {"spec": "summary_every 1", "first_present": 4767, "ms": 11413.624}, "interval_start_s": 2078.238, "interval_end_s": 2089.651, "presents": 1, "frame_ms": {"p50": 11413.624, "p90": 11413.624, "p99": 11413.624, "max": 11413.624}, "gpu_busy_ms_per_present": 449.682, "worker_busy_pct": {"queue worker 0x0": 99.83, "queue worker 0x38": 0.256, "queue worker 0x20": 76.712, "queue worker 0x28": 93.779}, "top_phases_ms_per_frame": {"Driver.Packet": 30869.398, "Driver.Packet.memory_wait": 17299.51, "Resources.Complete": 6567.612, "Driver.Packet.draw": 6277.76, "Driver.Draw": 6274.592, "Graphics.Draw": 5530.823, "Graphics.Draw.draw_and_resource_release": 5488.717, "Driver.Packet.dispatch": 5138.133}, "trace_dropped": false, "trace": ""} |
|
Overlap note from PR #9626: I added a process-private-memory admission check to the non-lazy registration path, so it touches the RegisterShader branch changed here. To avoid conflicting sequencing, I marked #9626 as depending on #7644 and will adapt the guard after this PR’s disposition. If you prefer a different order or think these changes should be integrated together, please let me know. I have not changed your branch. |
|
Update on my earlier overlap note: I moved the memory admission check into |
|
Checked the interdiff against each point of the previous review:
Shader output is unchanged (only when entries are prepared), so there is nothing for the hardware oracle to measure; merged. |
What
Under
APS5_LAZY_SHADER_PREPARE=1, registration prepares nothing. ButResolveShaderAbistill planned and prepared every compute or pixel stage whose ABI the title resolved. A title that resolves every shader's ABI therefore prepared them all at boot, whether they ever drew.Resident Evil Village (PPSA01556) is such a title. Its prepared shaders take a large part of its private memory at the menu: this PR saves ~3 to 4.5 GB there (see Tested), more than the ~2–3 GB we had estimated from per-program holders of ~0.5 MiB across ~6,000 programs.
With lazy preparation,
ResolveShaderAbinow:Then the shader's first draw or dispatch plans and prepares the queued ABIs with that state, before it looks for its artifact.
Concurrent first uses. The first use of a shader with deferred ABIs marks the shader while it prepares them, then publishes all their entries together under the shader's lock. A use from another queue that arrives meanwhile waits on the shader's existing condition until they're published, then matches the published entry, so each ABI is prepared once. If no entry matches (its preparation failed, or the use's state differs), each use prepares its own entry, as without deferral. After the first use, the lookup reads one more flag under the lock it already holds.
Which workloads it helps. The saving is the memory of entries prepared for resolved ABIs that a title never draws or dispatches with.
mainat 600 s.APS5_LAZY_SHADER_PREPARE=1.Cost at first use. The preparation moves from resolution to a shader's first draw or dispatch, on the queue worker. The Village pairs below are at the static menu, so they can't show it. A Resident Evil Village pair across the transition from the menu into first gameplay, on a warm shader cache, with and without this PR (comment, and Tested): 24:11 from Yes to the first lit gameplay frame with it, against 24:00 without, and the worst frames within the same range (85.5 s against 133.0 s at the top). On that memory-bound machine, a first-use cost smaller than its paging stalls wouldn't show.
The commits:
Driver::PreparedEntriescounts a registered shader's prepared entries, for the test.The change.
test(agc): the lazy resolved ABI test's eager reference runs without the switch.test(agc): a lazily resolved ABI's entries, libraries and cache files are compared with eager preparation's.test(agc): stale-state cases of a deferred ABI are compared with eager preparation.test(agc): a deferred compute ABI is checked under lazy preparation.Commits 3 to 6 came from an adversarial review. They're described under Tested.
A counter for whether a deferred ABI's first use finds its artifact among the queued entries. It tells whether the queued preparation is the use's own work or extra, through
Driver::DeferredAbiUsesand a[shaders] deferred ABIs: ...line.fix(agc): a deferred ABI is prepared once when queues make its first use at once (above).fix(agc): the[shaders] deferred ABIsline prints only underAPS5_PROFILE_DRAW, through the profile output the[rescache]lines use.Where the end state can differ from eager preparation, with no wrong state:
Tested
agc_driver_lazy_resolved_abiruns one scenario with eager and with lazy preparation, and compares the lazy run's end state with the eager run's.agc_driver_lazy_resolved_abi_switch_setruns it withAPS5_LAZY_SHADER_PREPARE=1exported.agc_driver_prepared_shaders_abi_deferred_compute_lazyresolves a compute ABI under the switch. Neither resolution builds a front end, and the first dispatch links both callees and writes the expected value in every lane.agc_driver_prepared_shaders_abi_deferred_concurrent_lazy(commit 8):ShaderRegistry.hppandShaderRegistry.cppas before commit 8, in 20 of 20 runs: "four queues making the first use of one deferred ABI at once did not prepare it once (2 front-end builds, 2 prepared entries, 1 first uses, 0 found, 0 own, 0 entries used)". Green in 20 of 20.The profile line (commit 9): without
APS5_PROFILE_DRAW, no[shaders] deferred ABIsline. With it:[shaders] deferred ABIs: 1 prepared at first use, 1 found their artifact there, 0 prepared their own; 1 of the 2 entries prepared from them never matched a use.Linux, CI's configuration (a cloud worker), at the head:
agc_driver_lazy_resolved_abi,agc_driver_lazy_resolved_abi_switch_set,agc_driver_prepared_shaders,agc_driver_prepared_shaders_abi_deferred_compute_lazyandagc_driver_prepared_shaders_abi_deferred_concurrent_lazypass 20 runs in a row.^agcpasses 795 of 797 (57 skipped). The two failures also fail onmain:agc_driver_sgpr_pattern_fill_keysfails under the sweep's parallel load, andagc_driver_storage_read_during_idle_storefails in about 1% of runs on that machine (alone: 4 of 360 runs at the head, 3 of 360 at the base).Resident Evil Village (PPSA01556), Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU, one run each. Both runs use our test tree (
mainwith fix(agc): leave a stage the title's pipeline ABI cannot prepare to its first use #6366 and other open PRs of ours) plus perf(agc): release unused registered shader resource plans #6178, withAPS5_LAZY_SHADER_PREPARE=1, heap counters on (APS5_PROFILE_HEAP=1) and GPL on. Private memory at the menu:APS5_RELEASE_SPIRV=1) was at 21,485 MB at menu + 1.Resident Evil Village (PPSA01556), a second pair with traces, on the same two trees: without the change (964a4ea473) and with it (174358bd0d). Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42),
APS5_LAZY_SHADER_PREPARE=1, GPL on, no heap counters, a warm shader cache in both (an untraced boot filled it first), one run each, menu only. The GPU was at P0 for 100% of the samples in both runs (mean 1,293 and 1,294 MHz); clocks weren't locked.Private memory at the menu: 25,629 / 26,236 MB without the change and 21,510 / 22,072 MB with it at + 1 / + 10 min, −4,119 / −4,164 MB. That's the same saving as the first pair.
Frame times at the static menu, minutes 5 to 15: 13 presents in 530 s without the change (0.0245 fps, median frame 38.9 s) and 12 in 531 s with it (0.0226 fps, 42.6 s). One frame either way at ~40 s a frame, so this pair can't resolve a frame-time difference; the change is to memory.
The summary line from the middle of each arm's menu window, without and then with the change:
{"commit":"964a4ea47335","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"900:60","APS5_TRACE_SUMMARY_EVERY":"1"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 1","first_present":5769,"ms":38512.704},"interval_start_s":1958.049,"interval_end_s":1996.562,"presents":1,"frame_ms":{"p50":38512.704,"p90":38512.704,"p99":38512.704,"max":38512.704},"gpu_busy_ms_per_present":360.658,"worker_busy_pct":{"queue worker 0x0":99.955,"queue worker 0x38":0.013,"queue worker 0x28":99.489,"queue worker 0x20":98.163},"top_phases_ms_per_frame":{"Driver.Packet":114619.989,"Driver.Packet.memory_wait":75600.232,"Driver.Packet.draw":37624.408,"Driver.Draw":37621.748,"Driver.Draw.draw_and_resource_release":23173.020,"Graphics.Draw":22491.874,"Graphics.Draw.draw_and_resource_release":22366.853,"Resources.Complete":15706.836},"top_phases_calls_per_s":{"Driver.Packet":198.895,"Driver.Packet.memory_wait":2.571,"Driver.Packet.draw":21.707,"Driver.Draw":21.707,"Driver.Draw.draw_and_resource_release":21.655,"Graphics.Draw":24.408,"Graphics.Draw.draw_and_resource_release":24.408,"Resources.Complete":16.981},"trace_dropped":false,"trace":""} {"commit":"174358bd0df9","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"900:60","APS5_TRACE_SUMMARY_EVERY":"1"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 1","first_present":3728,"ms":49551.654},"interval_start_s":1962.416,"interval_end_s":2011.967,"presents":1,"frame_ms":{"p50":49551.654,"p90":49551.654,"p99":49551.654,"max":49551.654},"gpu_busy_ms_per_present":366.125,"worker_busy_pct":{"queue worker 0x0":99.981,"queue worker 0x38":0.023,"queue worker 0x28":99.621,"queue worker 0x20":98.978},"top_phases_ms_per_frame":{"Driver.Packet":147961.349,"Driver.Packet.memory_wait":98183.273,"Driver.Packet.draw":49127.480,"Driver.Draw":49124.666,"Driver.Draw.draw_and_resource_release":25133.673,"Graphics.Draw":23956.698,"Graphics.Draw.draw_and_resource_release":23835.429,"Shader.DrawStage":20213.190},"top_phases_calls_per_s":{"Driver.Packet":154.707,"Driver.Packet.memory_wait":1.998,"Driver.Packet.draw":16.871,"Driver.Draw":16.871,"Driver.Draw.draw_and_resource_release":16.831,"Graphics.Draw":18.970,"Graphics.Draw.draw_and_resource_release":18.970,"Shader.DrawStage":52.713},"trace_dropped":false,"trace":""}tools/trace_digest.pyon those two lines:2 intervals, 1958.0 to 2012.0 s, 2 presents
NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 3840x2160, commit 964a4ea47335
commit, environment, GPU, driver or OS changed at interval 2
The two traces are on this fork release. Their 60 s windows (
APS5_TRACE_SECONDS=900:60) fell in the intro, about 6 to 7 minutes before the main menu, since these trees take ~23 minutes to reach it.Resident Evil Village (PPSA01556), a third pair on this head (1ba2206), menu only, one run each. Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU; clocks weren't held, and no GPU timing is claimed.
main1ff5c8a with fix(agc): put a retired import's unchanged ranges back in the write watch #8926's fix (63d5414), which Resident Evil Village needs on thatmainto get through its intro. One has this PR on top, and one doesn't.APS5_LAZY_SHADER_PREPARE=1, GPL on,APS5_HOST_IMPORT_MIB=6400, a warm shader cache, no profiling, no input.Resident Evil Village (PPSA01556), the menu → first gameplay transition on this head (1ba2206), one matched pair (comment, with the summary lines and digests). Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU; clocks weren't held (P0 at 1,290 MHz in the slow intervals).
main1ff5c8a with fix(agc): put a retired import's unchanged ranges back in the write watch #8926's fix (63d5414), with and without this PR.APS5_LAZY_SHADER_PREPARE=1,APS5_NO_GPL=1(with GPL on, this PC doesn't load past the menu),APS5_HOST_IMPORT_MIB=6400andAPS5_TRACE_SUMMARY_EVERY=1. Warm shader cache, the same route and the same host-import mode.A harness on a cloud worker (Linux, lavapipe):
The adversarial review (a cloud worker). Its question: can a deferred preparation run with different state from what eager resolution would have used? The answer is no.
agc_driver_lazy_resolved_abi_switch_set).GitHub's runners at 1ba2206 (run): the five tests above pass 5 runs in a row on Linux. On Windows they need Vulkan and skip. The libc and libkernel suites pass on both.
Checklist
mainf47c856, rebased, and it merges cleanly with currentmain; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)