fix(agc): keep the first native multisample depth sampling refusal #6423

Merged
Gashrod1 merged 1 commit from upstream-pr/6423 into main 2026-10-19 01:05:41 +00:00
Gashrod1 commented 2026-10-15 14:53:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gashrod1 on 2026-10-15T14:53:23Z.


What

A native multisample depth surface keeps one sampling refusal (DepthSamplingState::refusal), reported when the depth is sampled. Five transition sites assign it unconditionally:

  • fast clear at surface creation (×2);
  • incomplete or unproven HTILE clear;
  • overlapping HTILE clears;
  • metadata fill.

So a surface refused when it was created loses that reason as soon as one of these transitions follows. The sample then reports the transition, which is not the cause that blocks it.

Found with DAVE THE DIVER (PPSA19115), see https://github.com/boykopovar/AnyPS5/pull/6300#issuecomment-6193282566. Its 2-sample depth target is refused at creation with "requires watched accessible guest memory" (the range is host-imported, so unwatched). A whole HTILE fill follows, so the title reports "metadata fill transition is not implemented" and points at the wrong work.

DepthSamplingState::Refuse now keeps the first reason, and all five sites use it. Nothing changes about what is refused, only the reported reason.

Tested

Linux, Intel Alder Lake-P iGPU (Mesa 26.2.4), on main ff23657f3:

  • agc_driver_native_multisample_depth: the unwatched-memory case in the eligibility test now also gets a metadata fill over its HTILE, then expects "watched accessible guest memory" again.
  • Mutation check: going back to always overwriting fails that test with "metadata fill transition is not implemented".
  • agc_driver_native_multisample_depth, agc_driver_native_depth_retirement, agc_driver_native_depth_clears and agc_driver_native_depth_clear_refusals pass.

Checklist

  • Based on current main; 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 (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none; it makes the PPSA19115 depth refusal report its real cause
  • GPUs tested: Intel Alder Lake-P iGPU, Mesa 26.2.4, Arch Linux
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4875228887 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6423). Originally posted by [Gashrod1](https://github.com/Gashrod1) on 2026-10-15T14:53:23Z. --- ### What A native multisample depth surface keeps one sampling refusal (`DepthSamplingState::refusal`), reported when the depth is sampled. Five transition sites assign it unconditionally: - fast clear at surface creation (×2); - incomplete or unproven HTILE clear; - overlapping HTILE clears; - metadata fill. So a surface refused when it was created loses that reason as soon as one of these transitions follows. The sample then reports the transition, which is not the cause that blocks it. Found with DAVE THE DIVER (PPSA19115), see https://github.com/boykopovar/AnyPS5/pull/6300#issuecomment-6193282566. Its 2-sample depth target is refused at creation with "requires watched accessible guest memory" (the range is host-imported, so unwatched). A whole HTILE fill follows, so the title reports "metadata fill transition is not implemented" and points at the wrong work. `DepthSamplingState::Refuse` now keeps the first reason, and all five sites use it. Nothing changes about what is refused, only the reported reason. ### Tested Linux, Intel Alder Lake-P iGPU (Mesa 26.2.4), on `main` ff23657f3: - `agc_driver_native_multisample_depth`: the unwatched-memory case in the eligibility test now also gets a metadata fill over its HTILE, then expects "watched accessible guest memory" again. - Mutation check: going back to always overwriting fails that test with "metadata fill transition is not implemented". - `agc_driver_native_multisample_depth`, `agc_driver_native_depth_retirement`, `agc_driver_native_depth_clears` and `agc_driver_native_depth_clear_refusals` pass. ### Checklist - [x] Based on current `main`; 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none; it makes the PPSA19115 depth refusal report its real cause - [x] GPUs tested: Intel Alder Lake-P iGPU, Mesa 26.2.4, Arch Linux - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-15 15:03:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T15:03:45Z.


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.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6465 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6505 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7154 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7233 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7332 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
PR 7371 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6195250851 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6423#issuecomment-6195250851). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T15:03:45Z. --- <!-- pr-overlap --> 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. | Pull request | Shared files not compared | |---|---| | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 6465](https://www.github.com/boykopovar/AnyPS5/pull/6465) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 6505](https://www.github.com/boykopovar/AnyPS5/pull/6505) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 7154](https://www.github.com/boykopovar/AnyPS5/pull/7154) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 7233](https://www.github.com/boykopovar/AnyPS5/pull/7233) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` | | [PR 7371](https://www.github.com/boykopovar/AnyPS5/pull/7371) | `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp` |
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!6423
No description provided.