fix(agc): track DCC storage images with more than one mip as one unit #7579
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7579"
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 LeoFeitosa on 2026-10-18T15:28:35Z.
What
StorageTexturetracks a storage image whose descriptor has DCC metadata and more than one mip as one unit again, instead of as 64 KiB blocks.With block units, the main menu of RoboCop: Rogue City - Unfinished Business (PPSA28329) is drawn wrong: only its blurred light layer shows, and the city and the character never appear. On
main2083bc700purple and black tiles also covered the top of the screen. I narrowed it down with a temporary filter onblockUnits(not part of this change):main)APS5_NO_BLOCK_TRACKING=1)The surfaces in the last row are three 1920x1080 surfaces with six mips (format 71, tile mode 7) and one 960x544 surface with two. Storing them whole in
StorageTexture::writeBack(thewholerule extended to them) also fixes the menu, but on2083bc700it cost about a quarter of the in-game frame rate, since they are then stored whole several times per frame. Tracked as one unit, as before block units, they cost nothing measurable (below).I did not find which step of the block path loses their results. Each of these was switched off on its own and none fixed it: the drop of pending units on a clear-key flip, the key-flip keep, the alias borrow, the unit shadow, partial fills, the fill discard of units, and the partial windows of block write-backs. The debt file records the gap.
#6280 and #7085 change the same line; they add
geometry.imageLevels == descriptor.mipCount, which is independent of this condition. #6280 alone does not fix the menu.Tested
Windows 11 (build 26200), NVIDIA GeForce RTX 5070 Ti, driver 617.42, WinLibs GCC 15.2.0 r7, Release,
main9caecfd2d. The same build tree with and without the change, runs alternating, the title relinked by that build, shader cache warm.Main menu, screenshot about 90 s after start: wrong 3 of 3 without, right 3 of 3 with. Same result in 2 + 2 runs on
9caecfd2dwith #6308, and on2083bc700with #6308.In game, first mission:
APS5_TRACE_SUMMARY_EVERY=10, median of each run's last 15 intervals. The frame rate swings between about 2.3 and 4.5 FPS from run to run in both builds, with no consistent difference:The runs marked as stopped early ended soon after the save loaded; the one log kept shows an access violation. In 8 more runs (4 + 4) of the menu, the load and 4 minutes in game, neither build stopped.
ctest -R "agc|storage|texture|write_watch|dcc"(711 tests): passed, exceptagc_driver_address_passes, which fails the same way without the change, andagc_shader_disk_cache_large_file, which failed once in the parallel run and passes alone.python tools/check_conventions.py --base origin/main: passes.Not run on AMD: on
main2083bc700, the Radeon iGPU here does not get past the title's first load (see the bring-up thread).Rebased onto
3f4a7f3b2after testing. The debt file conflicted and was resolved by hand;Texture.cppmerged cleanly.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T15:30:26Z.
The A/B title evidence is useful, and the broader Windows suite is green. I could not find a test that directly exercises this new
blockUnitscondition: the current CTest run does not assert that multi-mip DCC surfaces use whole-unit tracking while no-DCC or single-mip surfaces retain block tracking. Could you add a focused regression for that eligibility decision, or point me to an existing test that covers it? That would keep the reported DCC/mip rule from being silently removed later.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T15:46:42Z.
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.
main)core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppL1376Some 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.
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/include/TextureTiling.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureTiling.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/include/TextureTiling.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureTiling.cppcore/libs/prx/libSceAgcDriver/tests/TextureTiling.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T18:06:19Z.
AMD run of the tests, since the description lists AMD as not run. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON. Build:mainc3591adf9with #7623, #7612, #7611, #7603, #7579, #7563 and #7541 merged together (each merge clean, built once).agc_driver_address_passesandagc_shader_disk_cache_large_filepass 3 runs of 3. No title was run.AI-assisted
Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-18T21:53:08Z.
Windows regression check on an Intel UHD 770 and an AMD RX 9070 XT: no change in the full CTest results.
Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, withVkCacheemptied first. This head96770813cmerged intomainf3059421f.This PR adds no test. Full CTest (
--parallel 4, 1513 tests) with this head merged fails the same failures asmainalone on this machine: the five image-table tests (#6647) andagc_driver_sample_multisample_target(#6957) on the UHD 770,agc_driver_quad_pixel_mask(#6255) andagc_driver_layered_volume_vertex_no_gpl(#4768) on the RX 9070 XT.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, #7535, #7533, #7474, #7462, #7050, #7048, #7650). Neither GPU showed a failure beyond
main's own, except #7650's new test.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by LeoFeitosa on 2026-10-19T03:26:23Z.
Added in
0c7573e95. The eligibility check is nowTracksBlockUnitsinTextureTiling.cpp, andRunTextureTilingTestschecks it on a 1920x1080 R64KBX surface with six mips: tracked as blocks without DCC, as one unit with DCC, as blocks with DCC and one mip, and as one unit off a 64 KiB boundary or when linear. With the DCC/mip condition removed,agc_driver_graphicsfails ona DCC surface with more than one mip must be tracked as one unit.ctest -R "agc|storage|texture|write_watch|dcc"on this head (714 tests): onlyagc_shader_disk_cache_large_filefailed, in the parallel run, as before.Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-19T05:26:01Z.
I checked #7579 at
0c7573e95773, includingTracksBlockUnitsand its direct eligibility regression, against #6280 candidate0e1f2ab53b59. Your DCC/multi-mip exclusion and #6280'sgeometry.imageLevels == descriptor.mipCountexclusion address different cases.The combined condition must retain the
LayerTrackingEnabled/BlockTrackingEnabledswitches, your helper's eligibility conditions, and the physical-chain equality. That equality can remain at the call or move into the helper if both controls survive. A no-DCC overdeclared chain must still avoid block tracking; a fully represented multi-mip DCC surface must still avoid it for your separate reason.For the shared implementation line, I propose #6280 first and then your rebase retaining both exclusions and controls. That order is pending, and there is no standalone build dependency or combined execution result. If the reverse order is preferable, I can carry your helper into the cap rebase and rerun the composed controls. The verified #6280 update stays in draft while the shared-line and codec order is coordinated.
AI-assisted: yes (Codex)
Imported from boykopovar/AnyPS5. Originally posted by whamre on 2026-10-20T06:38:40Z.
SILENT HILL: The Short Message (PPSA10112, #7305) stops at its title intro on
mainsince this change. The write-back of a color target throws:Bisected over last night's first-parent merges, same machine and dump, one change per build:
mainat252cbc29b(before #6701)a01b3287c(#7432 merged, before this PR)053034f41(this PR merged)d0ac490cb(currentmain)d0ac490cbwith only053034f41revertedMy reading, not verified: tracking these DCC surfaces as one unit makes the unit span memory that is only partly write-watched, and a pending result in it then has neither the watch nor saved guest bytes. That's the case #7048 addresses for block units, but #7048 doesn't cover this one; it still stops on top of current
main. I can test a fix on this title.Windows 11 (26300), RTX 2080 SUPER, NVIDIA 616.92, WinLibs GCC 15.2.0, Release.
AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by LeoFeitosa on 2026-10-20T06:42:16Z.
Thanks for the bisect and the revert check, that pins it to this change. I'm looking at the write-back path that throws for a one-unit surface whose range is only partly write-watched, and at what #7048 does for block units there, to keep the RoboCop menu fix without this stop. I'll post a branch here for you to run on Silent Hill before anything is opened.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by LeoFeitosa on 2026-10-20T07:39:18Z.
Opened #8265 to revert it. The same refusal reproduces in
agc_storage_pending_after_unwatch(with #7048 merged) once every surface is one unit, so this is the one-unit path #7048 does not cover rather than something specific to the title. I'll look for the RoboCop menu fix in the block path instead.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by whamre on 2026-10-20T13:13:02Z.
Ran
fix/dcc-mip-store-pending(201cb328b) on SILENT HILL: The Short Message (PPSA10112), 3 runs, and its basemaine9a5a0c84, 3 runs, alternating, same machine and dump. Theoutside the write watch without the guest bytes savedstop does not come back on your branch (0 of 3), andmaindoesn't show it either (0 of 3).Both builds then hit a separate stall while the title loads its first level, unrelated to this change: frames grow to 20–30 s and Unreal's 120 s render-thread check ends the run. That happened in 3 of 3 runs on your branch and 2 of 3 on
main. It's a race we see onmaintoo, so with 3 runs I can't tell your branch frommainpast that point. I'm looking at that stall separately.Windows 11 (26300), RTX 2080 SUPER, NVIDIA 616.92, WinLibs GCC 15.2.0, Release.
AI-assisted: yes.