fix(agc): size multisample guest guards by fragment blocks #4199
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4199"
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 sanxchep on 2026-10-12T01:08:50Z.
What
Size the guest-memory guard for a multisampled
RenderTargetusing 64 KiB blocks whose pixel dimensions account for fragment count. The oldmax(single-sample CB bytes × samples, raw pixel bytes × samples)bound can cover a neighboring allocation. For example, a 1920×1080 RGBA8 4× target occupies0x1fe0000bytes with fragment-aware blocks, while the previous guard spans0x21c0000bytes.Keep the conservative bound for other tile modes. Add guard regressions for tiled 2× and 8× targets, a layout check for the 1920×1080 case, and document that console layout equivalence has not been measured.
This is independent of custom sample-location support in #2169. PR #2132 computes the same block dimensions for color-memory fills; if it merges first, this guard can reuse its footprint helper during integration.
Tested
Linux, Release, GCC 13.3:
agc_driver_graphics— passed (3.40 s)agc_multisample_guest_access— passed (1.20 s)python3 tools/check_conventions.py --base origin/main— passedgit diff --check— passedA title was run with the patch and reported working by the PR author. Console layout equivalence was not separately measured.
Checklist
main; no other open PR changes the guest-read guard.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T01:13:44Z.
The conventions run (check 114622799227) fails because the PR template’s AI-assisted field is unanswered. Please mark
AI-assisted: yesornoin the checklist/body so the required template check can pass.Imported from boykopovar/AnyPS5. Originally posted by sanxchep on 2026-10-12T01:16:17Z.
done
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T12:28:13Z.
Rebase handoff — this branch was ~347 commits behind
main(only a trivialTechnicalDebt.mdunion conflict). Rebased onto currentmain, authorship unchanged; both doc entries kept.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpassesTo pick it up:
Head is
5ab79cd51. (This PR also passed an earlier independent pre-review at its previous base — full suite was green there too.)Imported from boykopovar/AnyPS5. Originally posted by sanxchep on 2026-10-12T15:35:59Z.
done
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T17:15:32Z.
Independent verification of your rebase — the new head builds and passes the full local suite on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV): 957/957, conventions green. From my side this is merge-ready.Imported from boykopovar/AnyPS5. Originally posted by sanxchep on 2026-10-12T18:16:56Z.
@MarcZX100 should be ready to merge
Imported from boykopovar/AnyPS5. Originally posted by kr4y4 on 2026-10-12T18:57:47Z.
Windows run, to go with the Linux runs above.
Setup: Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, CI configure flags, an RTX 4070 Laptop GPU and an Intel Raptor Lake-S iGPU. The head cff1f68d5 merged into
main2a5eca11c, with no conflicts.agc_multisample_guest_accessandagc_driver_graphics(with the newColorTargetLayoutcheck) pass on both GPUs with--repeat until-fail:3.main'sMultisampleTarget.cppand the new tests,agc_multisample_guest_accessfails on both GPUs:a CPU read of 0x…90000+0x40 overlaps multisampled color target 0x…80000+0x40000 (4 samples), whose samples are only on the host: guest access to it is not implemented.ctest --timeout 120 --parallel 4): 973 of 973 on the RTX 4070. On the iGPU 972 of 973; the one failure,agc_driver_f32_dot2_rounding, fails the same way onmain(noshaderFloat64, #4528).This touches
guard()inMultisampleTarget.cpplike #4474, so whichever lands second will need a rebase there.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T00:59:13Z.
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/MultisampleTarget.cppL195-196core/libs/prx/libSceAgcDriver/tests/Recorder.cppL4661-4662