fix(agc): retire a published native depth owner when a depth target of another identity binds its planes #17915

Merged
hugodearaujo merged 9 commits from upstream-pr/17915 into main 2026-11-21 20:56:10 +00:00
hugodearaujo commented 2026-11-09 22:25:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-11-09T22:25:33Z.


What

Assassin's Creed Mirage (PPSA13960) binds depth targets of another identity at the memory of a 4-sample D32S8 owner without HTILE that it drew and that was then published and kept. In our runs it does this at least four ways at the end of the prologue cinematic:

  • a 1664x936 x4 target at the same depth address (0x10dfd20000) with another stencil address (0x10e1580000), over a 960x540 x4 owner (stencil 0x10e0590000), whose stencil plane lies inside the new depth plane;
  • the same memory as one single-sample target twice as wide and tall (1920x1080 x1 over 960x540 x4, 3328x1872 x1 over 1664x936 x4);
  • a 4096x4096 D16 target over a 1720x968 x4 or 1872x1056 x4 owner;
  • a 960x540 x1 target whose depth plane covers a 960x540 x4 owner's stencil plane.

Each one stops on:

AGC graphics: a native multisample depth attachment over the planes of a host-written owner of another identity is not implemented

Why it stops. A new attachment reads its three planes with RequireNoResidentDepthRead_nid_no_patch(..., DepthReadCause::Reuse) (#15941): a host-written owner there is published, and since 9452ca6e35 it's retired only when its publication took a guest byte. An owner that took none, or that an earlier read already published, is kept with its guards active. The loop right after the three reads then refuses on any active guard of an owner the host ever wrote. #15941's debt entry says so: "a new depth target over a kept one throws".

That loop can only see kept owners. Every guard the reads leave over the planes is no longer host-written: a host-written one is published by the read, and one still host-written after it throws inside it. The reads and the loop test the same half-open ranges with the same three plane sizes, and the creation holds the GPU mutex throughout, which every NoteDepthSurfaceWrite also holds. So the loop fires exactly when a published, kept owner overlaps the new planes.

The case isn't specific to the title: on #15941's own fixture, a host-written owner with nothing undecided stops there when a target of another identity binds (DecidedNewDepthTarget below). #15941's case (3) passes only because it has an undecided byte.

The change.

  • A new cause, DepthReadCause::Attachment, for the three plane reads of a new depth attachment.
    • Like Reuse, its publication takes the guest's undecided bytes (#15941's rule for "a new depth target reusing the memory").
    • Unlike Reuse, it retires every owner over the planes once they're published, kept or not: RequireNoResidentDepthRead_nid_no_patch's existing loop marks them inactive and removes their guards, and releaseRetired frees them at the same creation (#15300).
  • The refusal loop after the three reads goes.
  • Reuse and Access are unchanged, so draw inputs, storage images and the other reuses still keep an owner whose publication took no guest byte (#15941's case 9).
  • The debt sentence now reads "Only a reuse taking a guest byte or a new depth target over its planes retires the owner."

Why retiring is right here. A reuse that only reads the memory can leave the owner valid, which is why #15941 keeps it. A new attachment is a new owner of the same bytes. Two active owners can't both hold them: a later bind of the old identity would find it active, with samples from before the new target's draws. On the console both targets are the same memory, and the new one reads what is there.

  • At this point the old owner's samples are in guest memory. The publication wrote the host's bytes into every sample position, it took no guest byte, and the old owner has no HTILE to decide. The new owner imports those bytes like any new owner. That the hardware then reads exactly those bytes is inferred, not measured on a PS5.
  • What retire() would add for a multisample owner is only the owner-map erasure. Every lookup already checks active, and multisample owners have no stale planes. #15941's 091068b618 relies on the same, so this follows its pattern rather than #15707's retire + storeStaleStencil.
  • A held sampled view keeps the retired owner's image until it's dropped. DepthSurfaceHolds no longer serves it, and releaseRetired frees the owner afterwards.
  • A later bind of the old identity imports afresh. Its reads publish the new owner first if it was written, then retire it.

What still refuses. Everything that refuses before the retirement still does: an owner the publication can't handle (D16/D32-only, an unapplied clear, pending storage writes over a plane, a resident colour alias), publication inside a GPU completion, and publication while a multisampled colour target is being acquired. The owner then stays resident.

Tested

Linux 7.2.14, AMD Radeon RX 9070 XT, RADV (Mesa 26.2.6), Release with tests; and lavapipe (LLVM 23.1.4) for the new tests.

New cases.

  • agc_driver_native_depth_other_identity (--other-identity), at 2, 4 and 8 samples, D32S8 without HTILE, Z_X:
    • The title's geometry, scaled by 1/8. An owner of 120x68 and a target of 208x117 share the depth address, with another stencil address; the old stencil plane lies inside the new depth plane.

    • The steps. The owner is imported over uniform planes and drawn (per-sample depth and stencil). The target binds with a first draw that writes every sample (#16363's proof), and a guest access then publishes it. Every byte of both planes, padding included, is compared with a model of what each step wrote.

    • The modes:

      • (0) the owner published by a CPU read first;
      • (1) published by a Reuse vertex read that took no guest byte, which keeps it, as before;
      • (2) its sampled view held across the retirement. The owner isn't freed, DepthSurfaceHolds no longer serves the view, and the view still samples the owner's samples. Then A→B→A, and both owners are freed;
      • (3) A→B→A: the first identity binds again over the second's planes, publishes it, imports afresh, draws and publishes;
      • (4) storage results pending over the kept owner's plane: the owner is retired without a publication, and the new target's import stores the results first;
      • (5) the owner written again under pending storage results: the bind still refuses with native multisample depth publication over pending storage image writes is not implemented, and the owner stays resident.

      Modes 0-4 also check that the new target imports (one new surface, a new view) and that the old owner is retired and freed, unless its view is held.

  • DecidedNewDepthTarget in agc_driver_native_depth_publication (#15941's fixture, with HTILE): a host-written owner with nothing undecided, then a 128x64 target of another identity. It publishes the host's bytes, the target imports, and the owner is retired.

Red on the base without the change. The base is main + #15941 + #16363 with the tests only. Each mode was run on its own:

  • modes 0-4 and DecidedNewDepthTarget fail with the message above: on RADV, 15 of 15 cases plus DecidedNewDepthTarget; on lavapipe, 10 of 10 plus DecidedNewDepthTarget (4 and 8 samples);
  • mode 5 passes on both sides, since its refusal is the same.

Green with it. On RADV, 18 of 18 plus DecidedNewDepthTarget; on lavapipe, 12 of 12 plus DecidedNewDepthTarget.

Mutations (lavapipe):

  • Attachment retiring only on a guest byte: other_identity fails with the owner of another identity was not retired and released, and publication fails at DecidedNewDepthTarget.
  • Attachment refusing undecided bytes: publication fails at #15941's case (3) with cannot distinguish an unwritten byte from a same-value guest store.
  • A check after the three reads that no active guard overlaps the planes at all: every test passes, so the removed loop could no longer fire.

Validation layer, paired, same machine (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V -R "native_depth|native_multisample|depth_storage|depth_surface|agc_storage_|multisample_guest|repeat_storage_guard|cached_image|storage_flush_ordering|storage_one_slice|storage_read_during|storage_write_back|msaa_address_on_plane"):

  • base: 64 tests, 62 pass and 2 skip;
  • this change: 65 tests, 63 pass and the same 2 skip (agc_storage_pending_key_refresh, agc_storage_clear_hand_over). The new test is the 65th.
  • The loader inserted the layer in both runs. Neither log has a VUID- line or "was not found but was requested".

Conventions. tools/check_conventions.py --base 6719b01bf3 passes on both (exit 0).

Runs by others.

  • Windows, by JJenkx (comment): this PR at 2b61bc285e merged onto main bc1c4123e8, a clean merge. Windows 11 Enterprise 22621, AMD Radeon RX 6700 XT (driver 32.0.21045.16010), WinLibs GCC 15.2 UCRT, Release. agc_driver_native_multisample_depth, agc_driver_native_depth_other_identity and agc_driver_native_depth_overwritten_planes pass 3 of 3 each, none skipped. agc_driver_native_depth_publication, which holds the new DecidedNewDepthTarget case, wasn't in this run.
  • NVIDIA, by Doorriiaann (comment): RTX 3070, driver 610.57.04, Debian 13, GCC 13.3.0, Release, with the validation layer and the ctest -V -R pattern above, 3 runs on each side.
    • main e7c3bfd130: 63 tests, all pass 3 of 3.
    • This PR at 2b61bc285e: 65 tests, all pass 3 of 3. That includes agc_storage_pending_key_refresh and agc_storage_clear_hand_over, which skip on the RX 9070 XT, and agc_storage_write_back_scratch. agc_driver_native_depth_other_identity runs all six modes at 2, 4 and 8 samples, and agc_driver_native_depth_publication passes with DecidedNewDepthTarget.
    • No VUID- line, and the layer was found.
    • Negative control on e59a3c31df (the tests without the change): agc_driver_native_depth_other_identity and agc_driver_native_depth_publication fail 3 of 3 with the message above.
    • Re-run at 0f80c9148b, after the merges of #15941 and main (comment), 3 runs on each side: main 3339e01f59 has 74 tests and this PR 75, all pass 3 of 3, with agc_storage_pending_key_refresh and agc_storage_clear_hand_over passing on both sides. No VUID- line. Negative control on main 3339e01f59 merged with #15941's 7ce55ad00e, with this PR's tests: agc_driver_native_depth_other_identity and agc_driver_native_depth_publication fail 3 of 3 with the message above, and agc_driver_native_depth_publication_without_htile passes.

On current main. #15941 is merged, so the diff against main is now this change alone. The head, b0beb53d75, merges main 6db6a3e927 into it. The one conflict was the debt entry for D32S8 guest publication, where main and this change each rewrote one sentence; the merge keeps both. It builds, and the validation command with native_color_initial added and agc_storage_write_back_scratch left out gives 84 tests: 82 pass and the same 2 skip, with agc_driver_native_depth_other_identity and agc_driver_native_depth_publication among the passes. On main 6db6a3e927 the same command gives 83 tests: 81 pass and the same 2 skip. Neither log has a VUID- line or "was not found but was requested". check_conventions passes, with the debt-length warning that entry already has on main.

The title. Assassin's Creed Mirage (PPSA13960): title, New Game, Assassin, Full Synchronization Off, 720 s per run, interleaved. Tree: main 6719b01bf3 + #13963 + #16364 + #16363 + #16365 + #15941, plus an earlier, source-only version of #17890's change as a local commit (a36837b782; without it this tree stops at 73-77 s on the pending-storage publication refusal), with logging that prints where this change retires an owner.

  • Without local changes, 3 runs per side.
    • The base stopped on the message twice: at 450 s and 485 s, on 1664x936 x4 over 960x540 x4.
    • With this change, none of the three reached that point. They stopped first at 445-538 s on the multisampled colour refusals: a texture read and a storage image access over a colour target whose samples are only on the host, and initial multisample color contents overlap resident native depth. The base's third run stopped on the storage one too.
  • With local experiments for those colour refusals, 3 runs per side. Both sides got the same experiments, which aren't part of any PR (below).
    • The base stopped on the message 3 of 3, at 494-564 s.
    • With this change, 3 of 3 ran to the 720 s close with no exception. The change retired a kept owner 8 times, 4, 2 and 2 in the three runs, covering all four bind patterns listed under What.
    • One run bound a retired 960x540 x4 identity again more than 40 times after its retirement (A→B→A), and retired it again later, with no error.
  • Limit. After this transition the title barely presents, about 0.03-0.05 frames per second, and its frames turn to garbage, then black.
    • In 2 of the 3 runs this starts before this change's first retirement, right after the colour experiment. So it doesn't come from the retirement there.
    • The base with the same experiments shows it too, without this change: one run's frame at 480 s is already black with garbage, before that run stops on the message at 494 s.
    • The base never reaches this point, so the runs don't show that the picture after it is right.
  • The local experiments:
    • before an initial multisampled colour import, a Reuse publication and retirement of the depth owners under it;
    • a guest access over a host-only multisampled colour target retires the target instead of refusing.
    • The first is the same case for colour targets, and this change's cause covers it in one line. It's left for a follow-up.

Overlap

  • #15941 adds DepthReadCause and the retirement loop this change reuses; this change is one more cause in it.
  • #16363: the tests use its overwrittenStencil argument and its import over uneven planes. So this change depends on both. It doesn't depend on #13963, #16364, #16365 or #17890.
  • #7256 moves the three plane reads and this refusal loop into requireNativePlanesFree. With this change the loop is gone, and the three reads in their new place take DepthReadCause::Attachment. That's the order #15941's author proposed there for Reuse (comment).
  • #17890 changes the same function's candidate selection. DepthSurface.cpp merges clean; the test file, its cmake file and the debt entry conflict only at insertion points, and keeping both sides resolves them.

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 (#15941, which adds DepthReadCause and its retirement loop, and #16363 are merged)
  • Fixes: none
  • Unblocks: PPSA13960 past the attachment stop at the end of the prologue cinematic (with local experiments for the colour refusals that come first; the picture after it is not yet right)
  • GPUs tested: AMD Radeon RX 9070 XT (RADV, Mesa 26.2.6, Linux 7.2.14); lavapipe (LLVM 23.1.4) for the new tests; AMD Radeon RX 6700 XT, Windows 11 (by JJenkx); NVIDIA RTX 3070, driver 610.57.04, Debian 13 (by Doorriiaann)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5232204947 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17915). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-11-09T22:25:33Z. --- ### What Assassin's Creed Mirage (PPSA13960) binds depth targets of another identity at the memory of a 4-sample D32S8 owner without HTILE that it drew and that was then published and kept. In our runs it does this at least four ways at the end of the prologue cinematic: - a 1664x936 x4 target at the same depth address (`0x10dfd20000`) with another stencil address (`0x10e1580000`), over a 960x540 x4 owner (stencil `0x10e0590000`), whose stencil plane lies inside the new depth plane; - the same memory as one single-sample target twice as wide and tall (1920x1080 x1 over 960x540 x4, 3328x1872 x1 over 1664x936 x4); - a 4096x4096 D16 target over a 1720x968 x4 or 1872x1056 x4 owner; - a 960x540 x1 target whose depth plane covers a 960x540 x4 owner's stencil plane. Each one stops on: ``` AGC graphics: a native multisample depth attachment over the planes of a host-written owner of another identity is not implemented ``` **Why it stops.** A new attachment reads its three planes with `RequireNoResidentDepthRead_nid_no_patch(..., DepthReadCause::Reuse)` (#15941): a host-written owner there is published, and since 9452ca6e35 it's retired only when its publication took a guest byte. An owner that took none, or that an earlier read already published, is kept with its guards active. The loop right after the three reads then refuses on any active guard of an owner the host ever wrote. #15941's debt entry says so: "a new depth target over a kept one throws". That loop can only see kept owners. Every guard the reads leave over the planes is no longer host-written: a host-written one is published by the read, and one still host-written after it throws inside it. The reads and the loop test the same half-open ranges with the same three plane sizes, and the creation holds the GPU mutex throughout, which every `NoteDepthSurfaceWrite` also holds. So the loop fires exactly when a published, kept owner overlaps the new planes. The case isn't specific to the title: on #15941's own fixture, a host-written owner with nothing undecided stops there when a target of another identity binds (`DecidedNewDepthTarget` below). #15941's case (3) passes only because it has an undecided byte. **The change.** - A new cause, `DepthReadCause::Attachment`, for the three plane reads of a new depth attachment. - Like `Reuse`, its publication takes the guest's undecided bytes (#15941's rule for "a new depth target reusing the memory"). - Unlike `Reuse`, it retires every owner over the planes once they're published, kept or not: `RequireNoResidentDepthRead_nid_no_patch`'s existing loop marks them inactive and removes their guards, and `releaseRetired` frees them at the same creation (#15300). - The refusal loop after the three reads goes. - `Reuse` and `Access` are unchanged, so draw inputs, storage images and the other reuses still keep an owner whose publication took no guest byte (#15941's case 9). - The debt sentence now reads "Only a reuse taking a guest byte or a new depth target over its planes retires the owner." **Why retiring is right here.** A reuse that only reads the memory can leave the owner valid, which is why #15941 keeps it. A new attachment is a new owner of the same bytes. Two active owners can't both hold them: a later bind of the old identity would find it active, with samples from before the new target's draws. On the console both targets are the same memory, and the new one reads what is there. - At this point the old owner's samples are in guest memory. The publication wrote the host's bytes into every sample position, it took no guest byte, and the old owner has no HTILE to decide. The new owner imports those bytes like any new owner. That the hardware then reads exactly those bytes is inferred, not measured on a PS5. - What `retire()` would add for a multisample owner is only the owner-map erasure. Every lookup already checks `active`, and multisample owners have no stale planes. #15941's 091068b618 relies on the same, so this follows its pattern rather than #15707's `retire` + `storeStaleStencil`. - A held sampled view keeps the retired owner's image until it's dropped. `DepthSurfaceHolds` no longer serves it, and `releaseRetired` frees the owner afterwards. - A later bind of the old identity imports afresh. Its reads publish the new owner first if it was written, then retire it. **What still refuses.** Everything that refuses before the retirement still does: an owner the publication can't handle (D16/D32-only, an unapplied clear, pending storage writes over a plane, a resident colour alias), publication inside a GPU completion, and publication while a multisampled colour target is being acquired. The owner then stays resident. ### Tested Linux 7.2.14, AMD Radeon RX 9070 XT, RADV (Mesa 26.2.6), Release with tests; and lavapipe (LLVM 23.1.4) for the new tests. **New cases.** - `agc_driver_native_depth_other_identity` (`--other-identity`), at 2, 4 and 8 samples, D32S8 without HTILE, Z_X: - **The title's geometry, scaled by 1/8.** An owner of 120x68 and a target of 208x117 share the depth address, with another stencil address; the old stencil plane lies inside the new depth plane. - **The steps.** The owner is imported over uniform planes and drawn (per-sample depth and stencil). The target binds with a first draw that writes every sample (#16363's proof), and a guest access then publishes it. Every byte of both planes, padding included, is compared with a model of what each step wrote. - **The modes:** - (0) the owner published by a CPU read first; - (1) published by a `Reuse` vertex read that took no guest byte, which keeps it, as before; - (2) its sampled view held across the retirement. The owner isn't freed, `DepthSurfaceHolds` no longer serves the view, and the view still samples the owner's samples. Then A→B→A, and both owners are freed; - (3) A→B→A: the first identity binds again over the second's planes, publishes it, imports afresh, draws and publishes; - (4) storage results pending over the kept owner's plane: the owner is retired without a publication, and the new target's import stores the results first; - (5) the owner written again under pending storage results: the bind still refuses with `native multisample depth publication over pending storage image writes is not implemented`, and the owner stays resident. Modes 0-4 also check that the new target imports (one new surface, a new view) and that the old owner is retired and freed, unless its view is held. - `DecidedNewDepthTarget` in `agc_driver_native_depth_publication` (#15941's fixture, with HTILE): a host-written owner with nothing undecided, then a 128x64 target of another identity. It publishes the host's bytes, the target imports, and the owner is retired. **Red on the base without the change.** The base is `main` + #15941 + #16363 with the tests only. Each mode was run on its own: - modes 0-4 and `DecidedNewDepthTarget` fail with the message above: on RADV, 15 of 15 cases plus `DecidedNewDepthTarget`; on lavapipe, 10 of 10 plus `DecidedNewDepthTarget` (4 and 8 samples); - mode 5 passes on both sides, since its refusal is the same. **Green with it.** On RADV, 18 of 18 plus `DecidedNewDepthTarget`; on lavapipe, 12 of 12 plus `DecidedNewDepthTarget`. **Mutations** (lavapipe): - **`Attachment` retiring only on a guest byte:** `other_identity` fails with `the owner of another identity was not retired and released`, and `publication` fails at `DecidedNewDepthTarget`. - **`Attachment` refusing undecided bytes:** `publication` fails at #15941's case (3) with `cannot distinguish an unwritten byte from a same-value guest store`. - **A check after the three reads that no active guard overlaps the planes at all:** every test passes, so the removed loop could no longer fire. **Validation layer**, paired, same machine (`VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1`, `ctest -V -R "native_depth|native_multisample|depth_storage|depth_surface|agc_storage_|multisample_guest|repeat_storage_guard|cached_image|storage_flush_ordering|storage_one_slice|storage_read_during|storage_write_back|msaa_address_on_plane"`): - base: 64 tests, 62 pass and 2 skip; - this change: 65 tests, 63 pass and the same 2 skip (`agc_storage_pending_key_refresh`, `agc_storage_clear_hand_over`). The new test is the 65th. - The loader inserted the layer in both runs. Neither log has a `VUID-` line or "was not found but was requested". **Conventions.** `tools/check_conventions.py --base 6719b01bf3` passes on both (exit 0). **Runs by others.** - **Windows, by JJenkx** ([comment](https://github.com/boykopovar/AnyPS5/pull/17915#issuecomment-6753583518)): this PR at `2b61bc285e` merged onto `main` bc1c4123e8, a clean merge. Windows 11 Enterprise 22621, AMD Radeon RX 6700 XT (driver 32.0.21045.16010), WinLibs GCC 15.2 UCRT, Release. `agc_driver_native_multisample_depth`, `agc_driver_native_depth_other_identity` and `agc_driver_native_depth_overwritten_planes` pass 3 of 3 each, none skipped. `agc_driver_native_depth_publication`, which holds the new `DecidedNewDepthTarget` case, wasn't in this run. - **NVIDIA, by Doorriiaann** ([comment](https://github.com/boykopovar/AnyPS5/pull/17915#issuecomment-6754045235)): RTX 3070, driver 610.57.04, Debian 13, GCC 13.3.0, Release, with the validation layer and the `ctest -V -R` pattern above, 3 runs on each side. - `main` e7c3bfd130: 63 tests, all pass 3 of 3. - This PR at `2b61bc285e`: 65 tests, all pass 3 of 3. That includes `agc_storage_pending_key_refresh` and `agc_storage_clear_hand_over`, which skip on the RX 9070 XT, and `agc_storage_write_back_scratch`. `agc_driver_native_depth_other_identity` runs all six modes at 2, 4 and 8 samples, and `agc_driver_native_depth_publication` passes with `DecidedNewDepthTarget`. - No `VUID-` line, and the layer was found. - Negative control on `e59a3c31df` (the tests without the change): `agc_driver_native_depth_other_identity` and `agc_driver_native_depth_publication` fail 3 of 3 with the message above. - Re-run at `0f80c9148b`, after the merges of #15941 and `main` ([comment](https://github.com/boykopovar/AnyPS5/pull/17915#issuecomment-6819852793)), 3 runs on each side: `main` 3339e01f59 has 74 tests and this PR 75, all pass 3 of 3, with `agc_storage_pending_key_refresh` and `agc_storage_clear_hand_over` passing on both sides. No `VUID-` line. Negative control on `main` 3339e01f59 merged with #15941's `7ce55ad00e`, with this PR's tests: `agc_driver_native_depth_other_identity` and `agc_driver_native_depth_publication` fail 3 of 3 with the message above, and `agc_driver_native_depth_publication_without_htile` passes. **On current `main`.** #15941 is merged, so the diff against `main` is now this change alone. The head, `b0beb53d75`, merges `main` 6db6a3e927 into it. The one conflict was the debt entry for D32S8 guest publication, where `main` and this change each rewrote one sentence; the merge keeps both. It builds, and the validation command with `native_color_initial` added and `agc_storage_write_back_scratch` left out gives 84 tests: 82 pass and the same 2 skip, with `agc_driver_native_depth_other_identity` and `agc_driver_native_depth_publication` among the passes. On `main` 6db6a3e927 the same command gives 83 tests: 81 pass and the same 2 skip. Neither log has a `VUID-` line or "was not found but was requested". `check_conventions` passes, with the `debt-length` warning that entry already has on `main`. **The title.** Assassin's Creed Mirage (PPSA13960): title, New Game, Assassin, Full Synchronization Off, 720 s per run, interleaved. Tree: `main` 6719b01bf3 + #13963 + #16364 + #16363 + #16365 + #15941, plus an earlier, source-only version of #17890's change as a local commit (a36837b782; without it this tree stops at 73-77 s on the pending-storage publication refusal), with logging that prints where this change retires an owner. - **Without local changes, 3 runs per side.** - The base stopped on the message twice: at 450 s and 485 s, on 1664x936 x4 over 960x540 x4. - With this change, none of the three reached that point. They stopped first at 445-538 s on the multisampled colour refusals: a texture read and a storage image access over a colour target whose samples are only on the host, and `initial multisample color contents overlap resident native depth`. The base's third run stopped on the storage one too. - **With local experiments for those colour refusals, 3 runs per side.** Both sides got the same experiments, which aren't part of any PR (below). - The base stopped on the message 3 of 3, at 494-564 s. - With this change, 3 of 3 ran to the 720 s close with no exception. The change retired a kept owner 8 times, 4, 2 and 2 in the three runs, covering all four bind patterns listed under What. - One run bound a retired 960x540 x4 identity again more than 40 times after its retirement (A→B→A), and retired it again later, with no error. - **Limit.** After this transition the title barely presents, about 0.03-0.05 frames per second, and its frames turn to garbage, then black. - In 2 of the 3 runs this starts before this change's first retirement, right after the colour experiment. So it doesn't come from the retirement there. - The base with the same experiments shows it too, without this change: one run's frame at 480 s is already black with garbage, before that run stops on the message at 494 s. - The base never reaches this point, so the runs don't show that the picture after it is right. - **The local experiments:** - before an initial multisampled colour import, a `Reuse` publication and retirement of the depth owners under it; - a guest access over a host-only multisampled colour target retires the target instead of refusing. - The first is the same case for colour targets, and this change's cause covers it in one line. It's left for a follow-up. ### Overlap - **#15941** adds `DepthReadCause` and the retirement loop this change reuses; this change is one more cause in it. - **#16363:** the tests use its `overwrittenStencil` argument and its import over uneven planes. So this change depends on both. It doesn't depend on #13963, #16364, #16365 or #17890. - **#7256** moves the three plane reads and this refusal loop into `requireNativePlanesFree`. With this change the loop is gone, and the three reads in their new place take `DepthReadCause::Attachment`. That's the order #15941's author proposed there for `Reuse` ([comment](https://github.com/boykopovar/AnyPS5/pull/7256#issuecomment-6718276305)). - **#17890** changes the same function's candidate selection. `DepthSurface.cpp` merges clean; the test file, its cmake file and the debt entry conflict only at insertion points, and keeping both sides resolves them. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 (#15941, which adds `DepthReadCause` and its retirement loop, and #16363 are merged) - [x] Fixes: none - [x] Unblocks: PPSA13960 past the attachment stop at the end of the prologue cinematic (with local experiments for the colour refusals that come first; the picture after it is not yet right) - [x] GPUs tested: AMD Radeon RX 9070 XT (RADV, Mesa 26.2.6, Linux 7.2.14); lavapipe (LLVM 23.1.4) for the new tests; AMD Radeon RX 6700 XT, Windows 11 (by JJenkx); NVIDIA RTX 3070, driver 610.57.04, Debian 13 (by Doorriiaann) - [x] AI-assisted: yes
MarcZX10 commented 2026-11-17 03:38:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T03:38:11Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head reviewed: 0f80c9148b35f777de9ce9d3a4ffd86c084ae79e (base main).
  • Read the review folder: description, commits, manifest, diff, and the changed hunks of every file in files.json under reviewed.
  • Read head context with the reader:
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp 1 20
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 1370 1380
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 1745 1752
python3 repo_read.py search "RequireNoResidentDepthRead_nid_no_patch" core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
python3 repo_read.py search "MultisampleTarget.hpp" core/libs/prx/libSceAgcDriver/Graphics/include
python3 repo_read.py search "over the planes of a host-written owner"
python3 repo_read.py search "over a kept one throws"
python3 repo_read.py search "hostEverWritten" core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
  • Build and tests were not run here. Test results in the description are the author's and other contributors' reports.

Results

Check Result Note
Changed hunks, all reviewed files passed Read from the diff
Callers of the depth read at head passed Only the default-cause caller is unchanged
Removed refusal text still referenced passed No match at head
Include cycle for MultisampleTarget.hpp passed No header includes it
Build and new tests not run Author-reported only
Full text of included files not run See Not verified

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:1104: PublishToGuest now returns whether it took a guest byte, but the name still reads as a plain action. Since the repository allows no comments in code, a name that says what the result means (for example PublishedTookGuest) would keep the contract visible at the call site in publishWrittenDepth.
  • core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp:6: the header now includes DepthSurface.hpp only for the DepthReadCause enum. Every file that includes MultisampleTarget.hpp now also pulls in the depth surface header. Moving the enum to a small shared header would avoid that.

Sources

Not verified

  • Full text of the included files was not read, only the changed hunks and the reader ranges above. ShaderResources.cpp is too large for the review folder; only its two changed call sites and its caller search were checked.
  • Retirement lifetime: whether releaseRetired waits for recorded GPU work when a Reuse read (vertex, index, storage image) retires an owner during recording. Not traced.
  • The description says the creation holds the GPU mutex throughout. Not checked.
  • Console behaviour: the description marks it as inferred, not measured on PS5. Not assessed.
  • Test runs on RADV, lavapipe, the Windows and NVIDIA machines, and the validation-layer runs are author or contributor reports. Not run here.
  • The linked GitHub comments were not opened.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5932403676 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17915#pullrequestreview-5932403676). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T03:38:11Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Head reviewed: `0f80c9148b35f777de9ce9d3a4ffd86c084ae79e` (base `main`). - Read the review folder: description, commits, manifest, diff, and the changed hunks of every file in `files.json` under `reviewed`. - Read head context with the reader: ``` python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp 1 20 python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 1370 1380 python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp 1745 1752 python3 repo_read.py search "RequireNoResidentDepthRead_nid_no_patch" core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp python3 repo_read.py search "MultisampleTarget.hpp" core/libs/prx/libSceAgcDriver/Graphics/include python3 repo_read.py search "over the planes of a host-written owner" python3 repo_read.py search "over a kept one throws" python3 repo_read.py search "hostEverWritten" core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp ``` - Build and tests were not run here. Test results in the description are the author's and other contributors' reports. ## Results | Check | Result | Note | | --- | --- | --- | | Changed hunks, all reviewed files | passed | Read from the diff | | Callers of the depth read at head | passed | Only the default-cause caller is unchanged | | Removed refusal text still referenced | passed | No match at head | | Include cycle for `MultisampleTarget.hpp` | passed | No header includes it | | Build and new tests | not run | Author-reported only | | Full text of included files | not run | See Not verified | ## Findings **Blocking** None. **Non-blocking** - `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:1104`: `PublishToGuest` now returns whether it took a guest byte, but the name still reads as a plain action. Since the repository allows no comments in code, a name that says what the result means (for example `PublishedTookGuest`) would keep the contract visible at the call site in `publishWrittenDepth`. - `core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp:6`: the header now includes `DepthSurface.hpp` only for the `DepthReadCause` enum. Every file that includes `MultisampleTarget.hpp` now also pulls in the depth surface header. Moving the enum to a small shared header would avoid that. ## Sources - Permalink for the first point: https://github.com/boykopovar/AnyPS5/blob/0f80c9148b35f777de9ce9d3a4ffd86c084ae79e/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp#L1104 ## Not verified - Full text of the included files was not read, only the changed hunks and the reader ranges above. `ShaderResources.cpp` is too large for the review folder; only its two changed call sites and its caller search were checked. - Retirement lifetime: whether `releaseRetired` waits for recorded GPU work when a `Reuse` read (vertex, index, storage image) retires an owner during recording. Not traced. - The description says the creation holds the GPU mutex throughout. Not checked. - Console behaviour: the description marks it as inferred, not measured on PS5. Not assessed. - Test runs on RADV, lavapipe, the Windows and NVIDIA machines, and the validation-layer runs are author or contributor reports. Not run here. - The linked GitHub comments were not opened. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-19 20:55:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T20:55:08Z.

Review: COMMENTED


Reviewed — comments

The targeted source and diff review found no verified blocking defect, but the full changed test file was not read, so a formal approval is not justified.

What I ran

Reviewed head b0beb53d75d3da14433525b91054c9cf246cc3d5 using the prepared diff and repo_read.py. No tests were run.

Results

Check Result Note
Targeted source review passed Core publication and attachment paths read
Tests not run Author-reported runs only

Findings

Blocking

None verified in the portions read.

Non-blocking

None.

Not verified

The full text of NativeMultisampleDepth.cpp was not read; only the changed test hunks in diff.patch were inspected. Test claims and platform results in the description were not independently verified. Other changed files were read only around the changed lines. Read: description.md, commits.md, manifest.json, diff.patch, DepthSurface.hpp, targeted ranges of DepthSurface.cpp, and the debt entry in libSceAgcDriver.md. Excluded: full-file contents of NativeMultisampleDepth.cpp, the full changed CMake file, and unmodified repository context beyond targeted searches/ranges. The changed-file manifest lists five files; all five are represented in the diff, but complete file reads were not performed.

To get this to a good state

Nothing is required. The review comments are informational: complete review of the changed test code before making a formal merge decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5983240973 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17915#pullrequestreview-5983240973). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T20:55:08Z. **Review:** COMMENTED --- # Reviewed — comments The targeted source and diff review found no verified blocking defect, but the full changed test file was not read, so a formal approval is not justified. ## What I ran Reviewed head `b0beb53d75d3da14433525b91054c9cf246cc3d5` using the prepared diff and `repo_read.py`. No tests were run. ## Results | Check | Result | Note | |---|---|---| | Targeted source review | passed | Core publication and attachment paths read | | Tests | not run | Author-reported runs only | ## Findings ### Blocking None verified in the portions read. ### Non-blocking None. ## Not verified The full text of `NativeMultisampleDepth.cpp` was not read; only the changed test hunks in `diff.patch` were inspected. Test claims and platform results in the description were not independently verified. Other changed files were read only around the changed lines. Read: `description.md`, `commits.md`, `manifest.json`, `diff.patch`, `DepthSurface.hpp`, targeted ranges of `DepthSurface.cpp`, and the debt entry in `libSceAgcDriver.md`. Excluded: full-file contents of `NativeMultisampleDepth.cpp`, the full changed CMake file, and unmodified repository context beyond targeted searches/ranges. The changed-file manifest lists five files; all five are represented in the diff, but complete file reads were not performed. ## To get this to a good state Nothing is required. The review comments are informational: complete review of the changed test code before making a formal merge decision.
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!17915
No description provided.