perf(agc): lower the batched label flush deadline to 100 us #22800
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22800"
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 slopezjur on 2026-11-18T10:04:16Z.
What
With batched label submission, a pending label batch was recorded or submitted only once it was 1000 us old. Anything that polls a label in guest memory (a title spinning on its async-compute completion labels, another queue's
WAIT_REG_MEM) could wait up to that deadline for a label that was already decoded. The batched default is now 100 us (DeferredLabels.cpplabelFlushDeadline).APS5_LABEL_FLUSH_USstill overrides it, and the unbatched default stays 250 us. TheENVIRONMENT.mdrow is updated.Tested
Windows 11, RTX 4080 SUPER (NVIDIA 621.24), Ryzen 7 7800X3D, Ghost of Yōtei (PPSA26344). Yōtei needs the bindless heap to get past the intro on
main, so the build ismaincb28e72762+ #20018 + #20519 + #21501 + #22424 + #21303 (plus local log-only diagnostics, off in these runs) withAPS5_BINDLESS_IMAGES=1 APS5_BINDLESS_LAZY=1. The arms differ only inAPS5_LABEL_FLUSH_US=100(this PR's default) against unset (main's 1000 us), interleaved, one process per run, 330 s each, warm caches.main(1000 us)mainrun5 runs for
main, 5 for this PR in the intro and 4 on the DLC screen (load crashes excluded; they happen on both arms).tools/trace_digest.pysummaries, DLC screen (APS5_TRACE_SECONDS=270:5):main: 26 presents, frame p50 199.3 / p90 204.6 / p99 206.2 ms, GPU busy 136.0 ms per presentSummary lines (
aps5-summary.jsonl), DLC screen withAPS5_TRACE_SECONDS=270:5.mainalone does not reach this screen in Ghost of Yōtei, so both arms are clean builds of the same local test stack (maincb28e72762plus the open Yōtei PRs):2c8544cf0dis the stack andba33b7712bis the stack plus this commit, with the same switches. Second run of each arm on a warm shader cache:On this screen the change is within noise (frame p50 191.8 vs 191.1 ms, GPU busy 133.4 vs 135.5 ms per present), in line with the table above; the gain is in the intro segments.
Traces attached.
aps5-trace-c6410e05e8b2-10600.json.gz
aps5-trace-2c8544cf0dbb-6204.json.gz
aps5-trace-ba33b7712bfa-24996.json.gz
GPU tests:
ctest -R "^(agc_|shader_)" -Vonmain9b262cc4eeand on this branch, same machine and GPU, withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(Vulkan SDK 1.4.363 layer). 2002 tests each; the layer was inserted 1805 times in each log, nowas not found but was requestedline, 0VUID-lines in either.mainfails 3 and does not build 1 (agc_driver_stencil_plane_memory,agc_driver_store_over_untracked,agc_driver_msaa_dcc_unwatch;agc_driver_upload_cache_read_only_flushdoes not compile on Windows); this branch fails 2 of those 3 (agc_driver_store_over_untrackedpassed) and nothing else.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)🤖 Generated with Claude Code