Skip to content

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

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
Amoenus:codex/native-depth-allocation-retirement
Oct 15, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
Amoenus:codex/native-depth-allocation-retirement

Conversation

@Amoenus

@Amoenus Amoenus commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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 feat(agc): sample native multisampled depth attachments #5496's draw-feedback/contradictory-clear controls.
  • Rebase preserves both allocation liveness (active) and main fix(libSceAgcDriver): retire a depth surface once another writer covers its memory #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 (feat(agc): sample native multisampled depth attachments #5496 merged)
  • Unblocks: PPSA99902 Sonic Unleashed Recompiled (PPSA99902): initial gameplay on fork and remaining work #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

@Amoenus
Amoenus force-pushed the codex/native-depth-allocation-retirement branch 2 times, most recently from 7825e81 to 8be3710 Compare October 13, 2026 23:42
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@Amoenus
Amoenus force-pushed the codex/native-depth-allocation-retirement branch from 8be3710 to 30351dc Compare October 14, 2026 01:02
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@Amoenus
Amoenus force-pushed the codex/native-depth-allocation-retirement branch 2 times, most recently from 37ad8ed to 5c7d04b Compare October 14, 2026 03:18
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@Amoenus
Amoenus force-pushed the codex/native-depth-allocation-retirement branch from 5c7d04b to ce30547 Compare October 14, 2026 12:28
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@Amoenus
Amoenus force-pushed the codex/native-depth-allocation-retirement branch 2 times, most recently from 0e8f8c6 to 7b9a9b0 Compare October 14, 2026 18:49
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@Amoenus
Amoenus force-pushed the codex/native-depth-allocation-retirement branch from 7b9a9b0 to 9b39480 Compare October 14, 2026 20:38
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@Amoenus
Amoenus force-pushed the codex/native-depth-allocation-retirement branch from 9b39480 to d7f476b Compare October 15, 2026 00:13
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 15, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 15, 2026
Track successful releases cumulatively across the complete depth and HTILE ownership ranges. Preserve color retirement and share its single callback; keep retired image contents alive through sampled views and recorded work. Add registry, partial/failure/protection, remap and mixed teardown regressions. Depends on native depth sampling in PR5496 and its descriptor prerequisite PR4820.
@Amoenus
Amoenus force-pushed the codex/native-depth-allocation-retirement branch from d7f476b to da9fe3c Compare October 15, 2026 10:30
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 15, 2026
@adriadam10 adriadam10 self-assigned this Oct 15, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

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.

@adriadam10
adriadam10 merged commit fdea36b into boykopovar:main Oct 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants