Repository navigation
fix(agc): retire a depth surface on a storage write only when the write covers a whole plane - #7050
Conversation
|
Thanks @SP4C3B4R-8, the partial-overlap fix looks right: the PPSA15304 view no longer retires the scene depth. One change requested before merge, plus a heads-up about #7044. Full-plane writes at non-block-aligned extents no longer retire (regression vs main)
The effect is that after a whole-plane overwrite in another format or layout, the plane's sampled view returns the stale depth image again, which is the pre-#454 behaviour, now limited to block-aligned planes. Ask: count the edge blocks as covered when the written view reaches the plane's extent (for example in Heads-up: conflict with #7044 #7044 and this PR merge cleanly as text but don't compile together: both add After the fix we'll run full CI on the new head and the usual game checks. |
|
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.
|
|
AMD / Windows run of this PR at 25c6bb0: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release.
AI-assisted: yes (runs made on the device above). |
|
@SP4C3B4R-8 Ran it at the same spot. PPSA15304, start position of the first area after loading the save, frame dumps (
So this PR fixes the darkening, consistent with the 2848x1600 scene depth no longer being retired; the scene is lit as in our builds with #454 reverted (92.5 to 96.6 there). Both runs used Ubuntu 24.04, kernel 7.0.0, NVIDIA GeForce RTX 5080, driver 595.99.02, Release build. AI-assisted: yes |
…te covers a whole plane Since boykopovar#454 a written storage image retires every depth surface its described size overlaps, and a retired surface reads guest memory, which never received the depth image. PPSA15304 writes storage views that overlap the scene depth without covering it (the largest reaches 0x11e0000 of its 0x12b0000 depth plane), so the whole depth was thrown away and the scene came out almost black. A written storage view now retires a surface only when the bytes its written level holds, per array layer or depth slice (CoveredMipBytes, whole tile blocks, no padding), cover the surface's whole depth or stencil plane; a partial overlap leaves the surface alive, as before boykopovar#454. Thick 3D views hold no whole block per slice and retire nothing. agc_driver_depth_storage_reuse now checks that a half-width write keeps the surface sampled from the depth image and that a write over the whole plane retires it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GN8FJFTedayRXLHythXkZ4
|
@oneandonlydean thanks, both done in a714d1b (rebased onto main ed01d79). Full-plane writes at non-block-aligned extents: a written view now also retires a plane when it reaches the plane's extent with the same block layout: same base address (per written layer), same bytes per element, 64 KiB blocks with the depth block's extent (128x128 for 32-bit, 256x128 for 16-bit, 256x256 for stencil), the same blocks per row, and width and height at least the plane's ( Test: #7044: it merged first, so this PR now uses its Local: 37 depth/storage ctests and the agc suite pass (RTX 5070 Ti, Windows 11); |
25c6bb0 to
a714d1b
Compare
|
Intel and AMD Windows data: Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
I also ran full CTest with this PR and the 14 other open AGC PRs I tested in the same batch merged together (#7647, #7641, #7630, #7627, #7603, #7600, #7591, #7579, #7535, #7533, #7474, #7462, #7048, #7650). Neither GPU showed a failure beyond AI-assisted: yes (Claude Code) |
What
Since #454 a written storage image retires every depth surface its described size overlaps, and a retired surface reads guest memory, which never received the depth image. ee6aba54 reported on #454 that PPSA15304 writes storage views that overlap the scene depth without covering it (the largest reaches 0x11e0000 of the 0x12b0000 depth plane), so the whole depth was thrown away and the scene came out almost black; they keep #454 reverted on their branch.
CoveredMipBytes: whole tile blocks, rows without padding), cover the surface's whole depth or stencil plane. A partial overlap leaves the surface alive, as before fix(libSceAgcDriver): retire a depth surface once another writer covers its memory #454.DepthSurfaceOverlaps), so a written storage view that touches no depth surface does not describe its layers.By ee6aba54's descriptor table this keeps the 2848x1600 scene depth alive and still retires the 512x512 surface whose planes the 4 MiB views cover.
Tested
Windows 11 Pro (26300), MinGW-w64 GCC 15.2.0, Release, Ryzen 7 7800X3D, RTX 5070 Ti.
agc_driver_depth_storage_reusenow checks, for D32, that a half-width storage write keeps the surface sampled from the depth image (0.5), and that a 128x128 R32 write over the whole 64 KiB plane retires it (0.25 from memory). With the old retire on any overlap it fails ("depth reuse returned the wrong GPU value at lane 0").-R "depth|agc_storage|storage_one_slice|storage_write_back|storage_cache|resource_cache_storage") pass.tools/check_conventions.py --base origin/mainpasses.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
https://claude.ai/code/session_01GN8FJFTedayRXLHythXkZ4