Repository navigation
perf(agc): eliminate DCC register clear fallback during color metadata pass - #5560
Conversation
|
|
|
Windows test of #5560: Windows 10 (19045), MinGW-w64 GCC 15.2, Release, AI-assisted (Claude Code). |
|
Ran this on PPSA21564 against Which scene and save give the 34 to 51 fps in the description? The world map isn't in our sequence. The two points from the earlier review still need an answer before this goes in. |
942664d to
a5d38e7
Compare
|
Thanks @oneandonlydean for testing on the RTX 4090 and for the thorough review.
I have updated the PR description using the repository template to reflect this accurate scope. |
|
Rebased onto main: kept both sides of the agc test list in |
a5d38e7 to
2061625
Compare
|
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.
|
What
In titles issuing color metadata passes for fast-clear elimination (such as Astro Bot, Title ID
PPSA21567), packet0x0 DRAW_INDEX_AUTOinvokesVulkanDevice::ColorMetadataPass->RunColorMetadataPasson targets withDccKeys::ClearRegister.clearToTexelcallsStorageTexture::FillClear, which previously refused with"keys pending"because the DCC keys for the clear register had pending writes recorded in the current batch. This causedRunColorMetadataPassto fall back tostoreClearTexels(context, color, texel), triggeringGuestMemory::Writeacross the 16.7 MB color buffer (1920x1080 RGBA16F). InsideGuestMemory::Write,FlushGpuWritesdetected overlapping in-flight GPU passes on Queue 0x0 and calledSync(), causing synchronous CPU stalls of ~15–22 ms whenever fast-clear elimination occurred.This change adds
allowRegisterCleartoStorageTexture::FillClear, allowingRunColorMetadataPassto asynchronously clear the resident Vulkan image directly on the GPU usingvkCmdClearColorImage. This eliminates the CPU fallback, the 16.7 MB CPU copy, and the synchronous GPU sync stall.Tested
Differential Unit Test:
Added pinned test in
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp(metadataPassTests, registered asagc_metadata_passin CTest):ClearRegisterclears the resident Vulkan image (texels[0] == 0x77retained in host memory, zero CPU write-back, andStorageTexture::FindPending != nullptr) and marks keys uncompressed.mainbefore this PR:FillClearrefused (keys pending), fell back tostoreClearTexels, and overwrote host memory.Empirical Telemetry (Astro Bot -
PPSA21567, Intro 3D Logo / Space Sequence):Measured across alternating runs booted with
-sequence product -mode producton NVIDIA GeForce RTX 5060 Ti (Linux) and verified on RTX 4090 (Linux, @oneandonlydean):DRAW_INDEX_AUTOstore syncs: 821 onmain(2.2 s total stall on RTX 4090; 184 syncs / 3.5 s stall on RTX 5060 Ti) -> 0 with this PR (-100% eliminated).python3 tools/check_conventions.py(0 errors).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