feat(agc): toggle runtime switches in alternating phases of one run #8160
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8160"
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?
Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-20T00:56:48Z.
What
Comparing a driver switch across two runs mixes its effect with the drift between the runs (camera position, streaming, GPU clocks), which on Ghost of Yōtei (PPSA26344) is often larger than the effect itself. This lets one run alternate two settings in phases, so neighbouring phases see nearly the same scene.
APS5_AB=<seconds>:<switch>[+<switch>...]alternates phase A (switches as the environment sets them) and phase B (the listed switches toggled together). Phases change at a flip packet, after the draw pipeline drained, under the GPU mutex, at the first flip at least<seconds>after the phase began.APS5_AB_START(flip count or<n>s) delays the first phase;APS5_AB_SETTLE(default 2 s) marks when reports stop mixing both settings. Each change prints an[ab]line through ProfileOutput.RuntimeSwitches, one relaxed atomic each, starting as the environment sets it. A name is listed only when every read of it is exact under either value at any moment. The first isAPS5_NO_BARRIER_BATCH: each elision is decided per barrier from the covered access, which is tracked either way.APS5_ABnothing changes.#8161, stacked on this one, adds
tools/ab_split.pyto split the periodic reports by phase.Tested
main4b1a9a3b2f, -DBUILD_TESTING=ON: the new tests and 5 neighbours (barrier batch, flip, flip compute, profile output, env reference) 7/7 with--repeat until-fail:3; full ctest not run.agc_runtime_switchesandagc_runtime_switches_refused(parsing and refusals, the phase schedule, switch values and[ab]lines across A, B, A). They don't build onmain; with phase B not toggling, the first fails.VUID-errors inagc_driver_fliporagc_driver_flip_compute.APS5_AB=60:APS5_NO_OWNED_PROOFS, presents per 10 s climbed from 5.5 to 8.6 across the A phases, yet B minus neighbouring A stayed at -0.61 ± 0.06 (SE, 9 pairs). A change two separate runs had put at -9 % measured -0.09 ± 0.15 in one A/B run.main: the same tests and #8161's 8/8.Checklist
main; 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)