fix(agc): retire fully released native depth owners #5524

Merged
Amoenus merged 1 commit from upstream-pr/5524 into main 2026-10-15 11:50:14 +00:00
Amoenus commented 2026-10-13 22:23:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-13T22:23:01Z.


What

Retire native multisample depth owners when successful allocation releases cumulatively cover their complete depth and HTILE ranges. Partial releases, protection changes and failed releases preserve the original refusal. Retired owners leave lookup/metadata routing; held sampled views and recorded work keep their Vulkan images alive.

Keep the shared release observer installed while either color or depth guards remain, and pin registered mappings through owner creation. Main's existing color retirement remains intact.

The native-sampling prerequisite #5496 is merged. Own retirement topic on maina08 is one commit; Depends on: none.

Sonic Unleashed Recompiled PPSA99902 needs this in the conditional native-depth path: a successful full depth/HTILE release was followed by sample-preserving guest publication of native multisample depth is not implemented from the stale owner. Pinned title/control evidence is in #3262, with bring-up #4443. This head has not been replayed on the title.

Tested

Head da9fe3c70, base main a08de6827f217115078660b9f47201edae59668b:

  • Full Windows application/libraries, patched-library validation, conventions and test registration pass.
  • Sixteen selected groups pass once plus five repetitions per NVIDIA/AMD selector:192 executions, no failures/skips, maximum6.29s,30s timeout. Ten runtime fixtures have per-run physical-device evidence per vendor. Other groups are excluded from vendor coverage; the new last-writer fixture chooses the first adapter and reports no identity.
  • Includes native retirement/lifetime, sampling, color sampling, graphics, write-watch/BDA and depth-plane/storage controls, plus merged main's last-writer regression and #5496's draw-feedback/contradictory-clear controls.
  • Rebase preserves both allocation liveness (active) and main #454's logical retirement (retired) predicates. Main's last-writer notification and reactivation remain intact. The clean merge preview into later maine49 is untested as a composition.
  • Cppcheck/clang-tidy parse all three changed translation units. Findings were reviewed: recorder/batch branch invariants and accepted depth-dimension bounds discharge the pointer/alignment concerns; existing diagnostic-format and Context copy advisories are outside this topic.
  • Windows11 Enterprise26200, WinLibs GCC15.2.0 Release, bundled dependencies/SPIRV-Tools enabled. GPU/driver details below.

Historical red controls and title evidence retain their pins. No new title replay, Linux or full-suite result is claimed. The registry regression uses a no-op host-release callback; it does not validate the host unmap backend. Full upstream CI requires maintainer dispatch.

Checklist

  • Based on recent main (testeda08; clean merge previewe49); no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source: n/a, none added
  • Generic behaviour, not specific to one title
  • Depends on: none (#5496 merged)
  • Unblocks: PPSA99902 #4443 (conditional stale native-depth owner stop; not whole-game boot)
  • GPUs tested: NVIDIA GeForce RTX5080, driver610.62/32.0.16.1062; AMD Radeon(TM) Graphics (Ryzen9950X3D integrated), driver32.0.21036.18; both Windows 11 Enterprise 26200
  • AI-assisted: yes, Codex; author reviewed and tested locally
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4850246638 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5524). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-13T22:23:01Z. --- ### What Retire native multisample depth owners when successful allocation releases cumulatively cover their complete depth and HTILE ranges. Partial releases, protection changes and failed releases preserve the original refusal. Retired owners leave lookup/metadata routing; held sampled views and recorded work keep their Vulkan images alive. Keep the shared release observer installed while either color or depth guards remain, and pin registered mappings through owner creation. Main's existing color retirement remains intact. The native-sampling prerequisite #5496 is merged. [Own retirement topic on maina08](https://github.com/Amoenus/AnyPS5/compare/a08de6827f217115078660b9f47201edae59668b...da9fe3c708330f66653cae9ace3ff78e9ebd935f) is one commit; Depends on: none. Sonic Unleashed Recompiled **PPSA99902** needs this in the conditional native-depth path: a successful full depth/HTILE release was followed by `sample-preserving guest publication of native multisample depth is not implemented` from the stale owner. Pinned title/control evidence is in [#3262](https://github.com/boykopovar/AnyPS5/issues/3262), with [bring-up #4443](https://github.com/boykopovar/AnyPS5/discussions/4443). This head has not been replayed on the title. ### Tested **[Head da9fe3c70](https://github.com/Amoenus/AnyPS5/commit/da9fe3c708330f66653cae9ace3ff78e9ebd935f), base main `a08de6827f217115078660b9f47201edae59668b`**: - Full Windows application/libraries, patched-library validation, conventions and test registration pass. - Sixteen selected groups pass once plus five repetitions per NVIDIA/AMD selector:192 executions, no failures/skips, maximum6.29s,30s timeout. Ten runtime fixtures have per-run physical-device evidence per vendor. Other groups are excluded from vendor coverage; the new last-writer fixture chooses the first adapter and reports no identity. - Includes native retirement/lifetime, sampling, color sampling, graphics, write-watch/BDA and depth-plane/storage controls, plus merged main's last-writer regression and #5496's draw-feedback/contradictory-clear controls. - Rebase preserves both allocation liveness (`active`) and main #454's logical retirement (`retired`) predicates. Main's last-writer notification and reactivation remain intact. The clean merge preview into later maine49 is untested as a composition. - Cppcheck/clang-tidy parse all three changed translation units. Findings were reviewed: recorder/batch branch invariants and accepted depth-dimension bounds discharge the pointer/alignment concerns; existing diagnostic-format and Context copy advisories are outside this topic. - Windows11 Enterprise26200, WinLibs GCC15.2.0 Release, bundled dependencies/SPIRV-Tools enabled. GPU/driver details below. [Historical red controls and title evidence](https://github.com/boykopovar/AnyPS5/issues/3262) retain their pins. No new title replay, Linux or full-suite result is claimed. The registry regression uses a no-op host-release callback; it does not validate the host unmap backend. Full upstream CI requires maintainer dispatch. ### Checklist - [x] Based on recent `main` (testeda08; clean merge previewe49); no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source: n/a, none added - [x] Generic behaviour, not specific to one title - [x] Depends on: none (#5496 merged) - [x] Unblocks: PPSA99902 #4443 (conditional stale native-depth owner stop; not whole-game boot) - [x] GPUs tested: NVIDIA GeForce RTX5080, driver610.62/32.0.16.1062; AMD Radeon(TM) Graphics (Ryzen9950X3D integrated), driver32.0.21036.18; both Windows 11 Enterprise 26200 - [x] AI-assisted: yes, Codex; author reviewed and tested locally
adriadam10 commented 2026-10-15 11:13:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T11:13:43Z.


Checked on the PR merged onto main: build and the libSceAgcDriver ctest scope (agc_driver_native_multisample_depth and the new agc_driver_native_depth_retirement pass); with the production changes reverted the new retirement test fails. The active filter is applied on every lookup, the unmap observer stays installed while color or depth guards remain, and the debt entry matches the diff. Merging once the full Build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6190721080 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5524#issuecomment-6190721080). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-15T11:13:43Z. --- Checked on the PR merged onto main: build and the libSceAgcDriver ctest scope (`agc_driver_native_multisample_depth` and the new `agc_driver_native_depth_retirement` pass); with the production changes reverted the new retirement test fails. The `active` filter is applied on every lookup, the unmap observer stays installed while color or depth guards remain, and the debt entry matches the diff. Merging once the full Build is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!5524
No description provided.