perf(agc): upload a storage image spanning two host imports on the GPU #3949
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3949"
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 CnRJay on 2026-10-11T19:40:35Z.
What
A storage image upload with no DCC keys goes through the host import of its memory when one import covers the whole surface. A surface that straddles two registered allocations has no single import (
HostImportForfails), soStorageTexture::uploadfell back to the CPU path:GuestMemory::ReadCommittedof the whole surface (which first waits for the GPU writers of that memory), a staging copy, and a waited batch.PPSA28416 (STAR WARS: Galactic Racer, UE5) has 3840x2160 surfaces (formats 36 and 56) that cross from a 2 MiB allocation into the 848 MiB heap right after it. At the main menu that is ~54 uploads and ~1.5 s per 10 s on the CPU path.
When every part of the surface is served by an existing import, each import's piece is now copied into one device buffer and detiled from there, recorded in the open batch like the single-import path: shadows published, stores flushed, the pending read noted, the image kept until the batch completes. When any piece has no import, the CPU path runs as before.
APS5_NO_GATHERED_UPLOAD=1turns the new path off.Tested
Windows 11, WinLibs GCC 15.2.0, Release, RTX 4080.
add_test_executabletargets oflibSceAgcDriverthat build on Windows: all pass.VK_LAYER_KHRONOS_validation(~3000 uploads through the new path) reports no errors from it.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:19:31Z.
Could you add a test for the gathered path: a storage surface that crosses two registered allocations, uploaded with host imports on, its texels compared, and a check that the upload did not go through the CPU path? No test in the tree reaches the new branch of
StorageTexture::upload.Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-12T13:20:08Z.
Yea I'll do that
Pull request closed