fix(agc): bind a read-only V# over the cached address space through the region that holds it #5815

Merged
EagleBearerYS merged 6 commits from upstream-pr/5815 into main 2026-10-15 18:34:16 +00:00
EagleBearerYS commented 2026-10-14 12:03:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-14T12:03:31Z.


What

Resident Evil Village (PPSA01556) stops in a G-buffer draw at the title, and, with that case fixed, again during the first scene load:

AGC graphics: guest buffer view 0x1f0494592c+0x1b2190 exceeds its GPU owner 0x1f04940000-0x1f04950000 (buffer 0, direct 1, mirror 0)
AGC graphics: guest buffer view 0x1f0390c1c4+0x10c1cc exceeds its GPU owner 0x1f03900000-0x1f03910000 (buffer 0, direct 1, mirror 0)

Since #5428, the cached address space survives a read-only V# that only partly overlaps its base regions (readsOverBase). The V# gets a region of its own, so a build's own regions can now overlap base regions. Two overlapping read-only V#s that each cross an import edge are merged by UploadPrepare into one own region, which can begin before the base region that holds the second V#'s first byte.

GuestBufferMemory::owner() takes the region with the greatest begin at or below the address from the build's own regions and from the space's base. It returned the base one when that began later, which was right while the two never overlapped. Here it returned the base region of one 64 KiB mapping, with its own 64 KiB import, for a 1.7 MB view. Descriptor then refused the view.

The second stop takes another path to the same lookup. When an import was retired after the space was built, UploadFinish dissolves the space after UploadPrepare. That merges the base regions into the build's sorted list on the assumption that the two never overlap. The space is then gone, so owner() searched only the merged list, where the region with the greatest begin was again a base region of one mapping.

The commits:

  1. fix(agc): owner() takes the end of the range it is asked about and returns the candidate that holds the whole range. It keeps the previous rule when both or neither do. Descriptor passes the view's end, and the write-back paths pass the end of each written range they already loop over.
  2. fix(agc): a dissolve after UploadPrepare notes when the merged list overlaps, and owner() then looks back for a region that holds the range. The usual disjoint list keeps the single binary search.
  3. fix(agc): the GPU side of the same lists. A build's BDA table (AddressRanges, CachedAddressTable) still listed its own regions next to the space's base regions they overlap, and the shader's lookup takes the last range whose begin is at or below the address (SpirvBdaLookup.cpp). So a BDA store into a writable import could resolve to the read-only copy of a V# across it. The table is now disjoint:
    • with the space kept, the build's own ranges minus the space's, merged with the space's;
    • after a dissolve that followed UploadPrepare, the former base regions first, and the copies clipped against them;
    • otherwise as before.
  4. test(agc): BDA stores under a read-only V# across imports reach the writable import.
  5. test(agc): the merged read-only V# test proves the paths it takes, with the address-space counters. The first build must be a space hit with no overlap dissolve, and the second must dissolve on imports. One crossed piece is registered writable, so a join of the run can't take the test's coverage away. It also checks access across the edge.
  6. test(agc): a store through a written V# merged with a read-only V# past an import, which goes through the write-back paths commit 1 changed.

Scope: read-only V#s that cross imports aren't joined into one region here, which would avoid the overlap in the first place; #5372 and #6197 work on joins. This PR keeps the overlap that #5428 allows and makes the CPU lookup and the BDA table agree on it, so it holds with or without those joins.

Related: #5428, and #5169 (the Village bring-up discussion).

Tested

On GitHub's runners from my fork, on main at 872f52320:

  • Linux: Ubuntu 24.04.5, GCC 13.3.0, Release with CI's configure flags and -DANYPS5_ENABLE_SPIRV_TOOLS=ON.
  • Windows: Windows Server 2025, WinLibs MinGW-w64 GCC 15.2.0 r7 (UCRT), Release with CI's configure flags.

spaceReadsAcrossImportsMergedTests in tests/BdaResources.cpp (run by agc_driver_graphics) maps six 64 KiB ranges in a 128 KiB import window, so the space's base has three two-range imports. It then binds two overlapping read-only V#s, one across the first edge and one from inside the second import across the second edge, in three address-based builds with the space cache on. The third build retires the imports between UploadPrepare and UploadFinish, so the space dissolves after the regions were prepared.

  • With main's GuestBufferMemory.cpp it fails on Linux and Windows with the title's message, guest buffer view ... exceeds its GPU owner ... (buffer 0, direct 1, mirror 0) (run).
  • With the change, agc_driver_graphics and the other tests of its executable pass 20 runs in a row on Linux and Windows, and so does every test under core/libs/prx/libc and core/libs/prx/libkernel (70 and 133 on Linux, 91 and 137 on Windows).
  • With only the first commit, the third build fails the same way on both systems (run).
  • It also checks that both views read their own bytes.
  • The full Build workflow on both commits: 1119 of 1119 tests pass on Linux and 1142 of 1142 on Windows (run).

Commits 3-6, on Linux (Ubuntu 24.04, GCC 13.3, CI's configure flags, lavapipe), on main at d92a8dad39:

  • Commit 4's cases fail with commits 1-2 alone: AGC graphics: the BDA table of a build with a read-only V# across imports has overlapping ranges and AGC graphics: a BDA store into a writable import resolves to the read-only copy of a V# across it. They pass with commit 3.
  • Commit 6's case fails on main without this PR, with the title's message (guest buffer view 0x564c68a80200+0x100 exceeds its GPU owner 0x564c68a70000-0x564c68a80000 (buffer 0, direct 1, mirror 0)), and passes with it.
  • At each commit, agc_driver_graphics and agc_sparse_buffer_holes pass. At the head, the full suite runs 1117 tests, and 5 fail: the IPv6 socket tests (guest_datagram_* and guest_tcp), which fail on that VM without this PR too.
  • The full Build workflow's Windows job at the head, merged into main d92a8dad39: 1253 of 1253 tests pass (run).
  • On an NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42), Windows 11 10.0.26300, a MinGW (GCC 15.2.0) Release build with ANYPS5_REQUIRE_VULKAN=1 and only the NVIDIA driver visible: agc_driver_graphics, agc_driver_bda_device, agc_driver_bda_span_reads and agc_sparse_buffer_holes pass 5 of 5 each (--repeat until-fail:5). The head was merged with #6146's latest commits for one combined run.
  • tools/check_conventions.py --base origin/main passes.

Resident Evil Village (PPSA01556, 01.210.000) on Windows 11 Home 10.0.26300, RTX 3070 Laptop (driver 617.42), Ryzen 9 5900HS, 15.4 GB RAM:

  • On main the title doesn't reach this point on this PC by itself. Preparing every shader at registration gives a black screen with private memory heading for the commit limit, and several earlier stops come first. So both runs are main at 23be5a02b with #5688 (the 419 MiB copy stop at boot) and #5703, plus local test commits that aren't part of this PR:
    • three that prepare each shader at its first draw (APS5_RE8_LAZY_PREPARE=1, with APS5_NO_GPL=1);
    • a copy of #1186's depth-plane change;
    • five that approximate checkerboard rendering;
    • one for later array slices (#5779 is the upstream version);
    • a null-image fallback.
  • Both runs use the address-space cache (the default) and a cold shader cache.
  • Without this change: the start-up dialogs pass about 235 s in. At 471.6 s, while the title loads: [videoout] presentation failed: AGC graphics: guest buffer view 0x1f0494592c+0x1b2190 exceeds its GPU owner 0x1f04940000-0x1f04950000 (buffer 0, direct 1, mirror 0), then an abort. That's the same address as in our own stack's runs.
  • With it, same save and inputs: 32 minutes without the stop.
    • The start-up dialogs pass at about 3.5 min and the title shows from about 7 min.
    • After Continue, the first scene loads and its shader warm-up starts.
    • With only the first commit, a run on our own Village stack had stopped about 3 min into that load with the second message above.

Ghost of Yōtei (PPSA26344), run by Pipodi on Windows 11 with an RTX 4090 (driver 617.42) (comment), on main 9a3e2ac4d with #4450, #4475 and #5851. The only difference between the two runs is this PR's two commits:

  • Without this PR: guest buffer view 0x912f8c088c+0x27918 exceeds its GPU owner 0x912f8c0000-0x912f8e0000 (buffer 0, direct 1, mirror 0) after 1,124 s, at the same view and owner on every run.
  • With it: no abort over 27 minutes.

Celegans12 hit the same abort on Ghost of Yōtei 1.008 after syncing with main e34c47921, on Windows 11 with an RTX 3080 Laptop GPU (driver 610.62) (comment):

  • Without this PR: guest buffer view 0x9093082f64+0x1dab8 exceeds its GPU owner 0x9093080000-0x90930a0000 (buffer 0, direct 1, mirror 0) at the loading screen, 979 s and 1,859 s in.
  • With its two commits cherry-picked on the same build: the full 3,000 s with no abort, and [address] shows dissolved: overlap 0.

teepean hit the same abort on Ghost of Yōtei 02.002.000 on Linux (CachyOS, RTX 3090, NVIDIA 615.78.08), on main f785b88a6 with local workarounds for four earlier stops (report):

  • Without this PR: guest buffer view 0x918017088c+0x27918 exceeds its GPU owner 0x9180170000-0x9180180000 (buffer 0, direct 1, mirror 0), about 6 minutes in.
  • With it: the game runs past that point to a later, different stop after X is pressed at the title (registered program refers to an incompatible shader binary type).

simonbronk hit the same abort on a second RE Engine title, Onimusha: Way of the Sword (PPSA27836), on Windows 11 with an RTX 5070 (driver 617.42) (comment), on main 0afa6a607 with the title's PRs (#5907, #5776, #5770, #5703, #5841, #5884, #5915) and local sample-count changes:

  • Without this PR: guest buffer view 0x1d08ee1bc0+0x28b320 exceeds its GPU owner 0x1d08e00000-0x1d09000000 (buffer 0, direct 1, mirror 0) during the New Game scene load.
  • With it: that stop is gone, and the load reaches later draws, up to an unrelated sample-count check.

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: PPSA01556 (Resident Evil Village: the title and the first scene load); PPSA26344 (Ghost of Yōtei: the same abort, 6-31 minutes in, per Pipodi's, Celegans12's and teepean's runs on Windows and Linux); PPSA27836 (Onimusha: Way of the Sword: the same abort during the New Game load, per simonbronk's run)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4857563807 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-14T12:03:31Z. --- ### What Resident Evil Village (PPSA01556) stops in a G-buffer draw at the title, and, with that case fixed, again during the first scene load: ``` AGC graphics: guest buffer view 0x1f0494592c+0x1b2190 exceeds its GPU owner 0x1f04940000-0x1f04950000 (buffer 0, direct 1, mirror 0) AGC graphics: guest buffer view 0x1f0390c1c4+0x10c1cc exceeds its GPU owner 0x1f03900000-0x1f03910000 (buffer 0, direct 1, mirror 0) ``` Since #5428, the cached address space survives a read-only V# that only partly overlaps its base regions (`readsOverBase`). The V# gets a region of its own, so a build's own regions can now overlap base regions. Two overlapping read-only V#s that each cross an import edge are merged by `UploadPrepare` into one own region, which can begin before the base region that holds the second V#'s first byte. `GuestBufferMemory::owner()` takes the region with the greatest begin at or below the address from the build's own regions and from the space's base. It returned the base one when that began later, which was right while the two never overlapped. Here it returned the base region of one 64 KiB mapping, with its own 64 KiB import, for a 1.7 MB view. `Descriptor` then refused the view. The second stop takes another path to the same lookup. When an import was retired after the space was built, `UploadFinish` dissolves the space after `UploadPrepare`. That merges the base regions into the build's sorted list on the assumption that the two never overlap. The space is then gone, so `owner()` searched only the merged list, where the region with the greatest begin was again a base region of one mapping. The commits: 1. `fix(agc)`: `owner()` takes the end of the range it is asked about and returns the candidate that holds the whole range. It keeps the previous rule when both or neither do. `Descriptor` passes the view's end, and the write-back paths pass the end of each written range they already loop over. 2. `fix(agc)`: a dissolve after `UploadPrepare` notes when the merged list overlaps, and `owner()` then looks back for a region that holds the range. The usual disjoint list keeps the single binary search. 3. `fix(agc)`: the GPU side of the same lists. A build's BDA table (`AddressRanges`, `CachedAddressTable`) still listed its own regions next to the space's base regions they overlap, and the shader's lookup takes the last range whose begin is at or below the address (`SpirvBdaLookup.cpp`). So a BDA store into a writable import could resolve to the read-only copy of a V# across it. The table is now disjoint: - with the space kept, the build's own ranges minus the space's, merged with the space's; - after a dissolve that followed `UploadPrepare`, the former base regions first, and the copies clipped against them; - otherwise as before. 4. `test(agc)`: BDA stores under a read-only V# across imports reach the writable import. 5. `test(agc)`: the merged read-only V# test proves the paths it takes, with the address-space counters. The first build must be a space hit with no overlap dissolve, and the second must dissolve on imports. One crossed piece is registered writable, so a join of the run can't take the test's coverage away. It also checks access across the edge. 6. `test(agc)`: a store through a written V# merged with a read-only V# past an import, which goes through the write-back paths commit 1 changed. Scope: read-only V#s that cross imports aren't joined into one region here, which would avoid the overlap in the first place; #5372 and #6197 work on joins. This PR keeps the overlap that #5428 allows and makes the CPU lookup and the BDA table agree on it, so it holds with or without those joins. Related: #5428, and #5169 (the Village bring-up discussion). ### Tested On GitHub's runners from my fork, on `main` at 872f52320: - Linux: Ubuntu 24.04.5, GCC 13.3.0, Release with CI's configure flags and `-DANYPS5_ENABLE_SPIRV_TOOLS=ON`. - Windows: Windows Server 2025, WinLibs MinGW-w64 GCC 15.2.0 r7 (UCRT), Release with CI's configure flags. `spaceReadsAcrossImportsMergedTests` in `tests/BdaResources.cpp` (run by `agc_driver_graphics`) maps six 64 KiB ranges in a 128 KiB import window, so the space's base has three two-range imports. It then binds two overlapping read-only V#s, one across the first edge and one from inside the second import across the second edge, in three address-based builds with the space cache on. The third build retires the imports between `UploadPrepare` and `UploadFinish`, so the space dissolves after the regions were prepared. - With `main`'s `GuestBufferMemory.cpp` it fails on Linux and Windows with the title's message, `guest buffer view ... exceeds its GPU owner ... (buffer 0, direct 1, mirror 0)` ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38543827567)). - With the change, `agc_driver_graphics` and the other tests of its executable pass 20 runs in a row on Linux and Windows, and so does every test under `core/libs/prx/libc` and `core/libs/prx/libkernel` (70 and 133 on Linux, 91 and 137 on Windows). - With only the first commit, the third build fails the same way on both systems ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38543862707)). - It also checks that both views read their own bytes. - The full Build workflow on both commits: 1119 of 1119 tests pass on Linux and 1142 of 1142 on Windows ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38543953061)). Commits 3-6, on Linux (Ubuntu 24.04, GCC 13.3, CI's configure flags, lavapipe), on `main` at d92a8dad39: - Commit 4's cases fail with commits 1-2 alone: `AGC graphics: the BDA table of a build with a read-only V# across imports has overlapping ranges` and `AGC graphics: a BDA store into a writable import resolves to the read-only copy of a V# across it`. They pass with commit 3. - Commit 6's case fails on `main` without this PR, with the title's message (`guest buffer view 0x564c68a80200+0x100 exceeds its GPU owner 0x564c68a70000-0x564c68a80000 (buffer 0, direct 1, mirror 0)`), and passes with it. - At each commit, `agc_driver_graphics` and `agc_sparse_buffer_holes` pass. At the head, the full suite runs 1117 tests, and 5 fail: the IPv6 socket tests (`guest_datagram_*` and `guest_tcp`), which fail on that VM without this PR too. - The full Build workflow's Windows job at the head, merged into `main` d92a8dad39: 1253 of 1253 tests pass ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38707120081)). - On an NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42), Windows 11 10.0.26300, a MinGW (GCC 15.2.0) Release build with `ANYPS5_REQUIRE_VULKAN=1` and only the NVIDIA driver visible: `agc_driver_graphics`, `agc_driver_bda_device`, `agc_driver_bda_span_reads` and `agc_sparse_buffer_holes` pass 5 of 5 each (`--repeat until-fail:5`). The head was merged with #6146's latest commits for one combined run. - `tools/check_conventions.py --base origin/main` passes. Resident Evil Village (PPSA01556, 01.210.000) on Windows 11 Home 10.0.26300, RTX 3070 Laptop (driver 617.42), Ryzen 9 5900HS, 15.4 GB RAM: - On `main` the title doesn't reach this point on this PC by itself. Preparing every shader at registration gives a black screen with private memory heading for the commit limit, and several earlier stops come first. So both runs are `main` at 23be5a02b with #5688 (the 419 MiB copy stop at boot) and #5703, plus local test commits that aren't part of this PR: - three that prepare each shader at its first draw (`APS5_RE8_LAZY_PREPARE=1`, with `APS5_NO_GPL=1`); - a copy of #1186's depth-plane change; - five that approximate checkerboard rendering; - one for later array slices (#5779 is the upstream version); - a null-image fallback. - Both runs use the address-space cache (the default) and a cold shader cache. - Without this change: the start-up dialogs pass about 235 s in. At 471.6 s, while the title loads: `[videoout] presentation failed: AGC graphics: guest buffer view 0x1f0494592c+0x1b2190 exceeds its GPU owner 0x1f04940000-0x1f04950000 (buffer 0, direct 1, mirror 0)`, then an abort. That's the same address as in our own stack's runs. - With it, same save and inputs: 32 minutes without the stop. - The start-up dialogs pass at about 3.5 min and the title shows from about 7 min. - After Continue, the first scene loads and its shader warm-up starts. - With only the first commit, a run on our own Village stack had stopped about 3 min into that load with the second message above. Ghost of Yōtei (PPSA26344), run by Pipodi on Windows 11 with an RTX 4090 (driver 617.42) ([comment](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6174833215)), on `main` 9a3e2ac4d with #4450, #4475 and #5851. The only difference between the two runs is this PR's two commits: - Without this PR: `guest buffer view 0x912f8c088c+0x27918 exceeds its GPU owner 0x912f8c0000-0x912f8e0000 (buffer 0, direct 1, mirror 0)` after 1,124 s, at the same view and owner on every run. - With it: no abort over 27 minutes. Celegans12 hit the same abort on Ghost of Yōtei 1.008 after syncing with `main` e34c47921, on Windows 11 with an RTX 3080 Laptop GPU (driver 610.62) ([comment](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6179263723)): - Without this PR: `guest buffer view 0x9093082f64+0x1dab8 exceeds its GPU owner 0x9093080000-0x90930a0000 (buffer 0, direct 1, mirror 0)` at the loading screen, 979 s and 1,859 s in. - With its two commits cherry-picked on the same build: the full 3,000 s with no abort, and `[address]` shows `dissolved: overlap 0`. teepean hit the same abort on Ghost of Yōtei 02.002.000 on Linux (CachyOS, RTX 3090, NVIDIA 615.78.08), on `main` f785b88a6 with local workarounds for four earlier stops ([report](https://github.com/boykopovar/AnyPS5/discussions/675#discussioncomment-18940918)): - Without this PR: `guest buffer view 0x918017088c+0x27918 exceeds its GPU owner 0x9180170000-0x9180180000 (buffer 0, direct 1, mirror 0)`, about 6 minutes in. - With it: the game runs past that point to a later, different stop after X is pressed at the title (`registered program refers to an incompatible shader binary type`). simonbronk hit the same abort on a second RE Engine title, Onimusha: Way of the Sword (PPSA27836), on Windows 11 with an RTX 5070 (driver 617.42) ([comment](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6189550601)), on `main` 0afa6a607 with the title's PRs (#5907, #5776, #5770, #5703, #5841, #5884, #5915) and local sample-count changes: - Without this PR: `guest buffer view 0x1d08ee1bc0+0x28b320 exceeds its GPU owner 0x1d08e00000-0x1d09000000 (buffer 0, direct 1, mirror 0)` during the New Game scene load. - With it: that stop is gone, and the load reaches later draws, up to an unrelated sample-count check. ### 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 - [x] Unblocks: PPSA01556 (Resident Evil Village: the title and the first scene load); PPSA26344 (Ghost of Yōtei: the same abort, 6-31 minutes in, per Pipodi's, Celegans12's and teepean's runs on Windows and Linux); PPSA27836 (Onimusha: Way of the Sword: the same abort during the New Game load, per simonbronk's run) - [x] AI-assisted: yes
Pipodi commented 2026-10-14 17:56:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pipodi on 2026-10-14T17:56:54Z.


Tested on Ghost of Yōtei (PPSA26344), where the same abort stopped every build since #5596 at the same spot:

guest buffer view 0x912f8c088c+0x27918 exceeds its GPU owner 0x912f8c0000-0x912f8e0000 (buffer 0, direct 1, mirror 0)

It fired during presentation about 18 minutes in (around present 833), with the same view and owner on every run.

Setup: Windows 11, RTX 4090 (NVIDIA 617.42), i9-13900K. Our tree is main 9a3e2ac4d plus the PRs Ghost of Yōtei needs (#4450, #4475 and #5851). The only change between the two runs is this PR's two commits (d4709592e, c54854b2b), cherry-picked cleanly.

  • Without this PR: the abort above after 1,124 s.
  • With this PR: no abort over 27 minutes, and the title presents past that point. It then stops on an unrelated error: an R8_UNORM view of a depth surface's stencil plane, which #5781 covers.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6174833215 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6174833215). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-10-14T17:56:54Z. --- Tested on Ghost of Yōtei (PPSA26344), where the same abort stopped every build since #5596 at the same spot: ``` guest buffer view 0x912f8c088c+0x27918 exceeds its GPU owner 0x912f8c0000-0x912f8e0000 (buffer 0, direct 1, mirror 0) ``` It fired during presentation about 18 minutes in (around present 833), with the same view and owner on every run. Setup: Windows 11, RTX 4090 (NVIDIA 617.42), i9-13900K. Our tree is `main` 9a3e2ac4d plus the PRs Ghost of Yōtei needs (#4450, #4475 and #5851). The only change between the two runs is this PR's two commits (`d4709592e`, `c54854b2b`), cherry-picked cleanly. - Without this PR: the abort above after 1,124 s. - With this PR: no abort over 27 minutes, and the title presents past that point. It then stops on an unrelated error: an R8_UNORM view of a depth surface's stencil plane, which #5781 covers. *Tested and written by Claude (AI assistant) on a contributor's machine.*
EagleBearerYS commented 2026-10-14 18:00:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-14T18:00:47Z.


Thanks for running it on Ghost of Yōtei. A second title with the same abort, and the same view-against-owner shape, is good to have. I've added it to the description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6174904918 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6174904918). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-14T18:00:47Z. --- Thanks for running it on Ghost of Yōtei. A second title with the same abort, and the same view-against-owner shape, is good to have. I've added it to the description.
Celegans12 commented 2026-10-14 21:50:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-14T21:50:14Z.


I hit this on Ghost of Yōtei (PPSA26344 v1.008) after syncing our game branch with main e34c479210, and your two commits fix it here too. Without them the loading screen aborted on the same view every time: guest buffer view 0x9093082f64+0x1dab8 exceeds its GPU owner 0x9093080000-0x90930a0000 (buffer 0, direct 1, mirror 0), at 1,859 s in one run and 979 s in another. With d4709592e7 and c54854b2bd cherry-picked on the same build, the run went the full 3,000 s with no abort, and the [address] lines show dissolved: overlap 0, so the space stays kept.

Details
  • Windows 11, RTX 3080 Laptop GPU (driver 610.62), MinGW-w64 GCC 15.2.0, Release.
  • Tree: main e34c479210 merged with our local Yōtei stack, plus #5815's two commits cherry-picked. The stack doesn't change GuestBufferMemory's owner lookup, and the abort reproduced without the cherry-picks.
  • Targeted tests on that tree pass, including agc_driver_graphics with your spaceReadsAcrossImportsMergedTests, agc_driver_address_space_teardown, agc_sparse_buffer_holes and the agc_host_import* tests.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6179263723 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6179263723). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-14T21:50:14Z. --- I hit this on Ghost of Yōtei (PPSA26344 v1.008) after syncing our game branch with `main` e34c479210, and your two commits fix it here too. Without them the loading screen aborted on the same view every time: `guest buffer view 0x9093082f64+0x1dab8 exceeds its GPU owner 0x9093080000-0x90930a0000 (buffer 0, direct 1, mirror 0)`, at 1,859 s in one run and 979 s in another. With d4709592e7 and c54854b2bd cherry-picked on the same build, the run went the full 3,000 s with no abort, and the `[address]` lines show `dissolved: overlap 0`, so the space stays kept. <details><summary>Details</summary> - Windows 11, RTX 3080 Laptop GPU (driver 610.62), MinGW-w64 GCC 15.2.0, Release. - Tree: `main` e34c479210 merged with our local Yōtei stack, plus #5815's two commits cherry-picked. The stack doesn't change `GuestBufferMemory`'s owner lookup, and the abort reproduced without the cherry-picks. - Targeted tests on that tree pass, including `agc_driver_graphics` with your `spaceReadsAcrossImportsMergedTests`, `agc_driver_address_space_teardown`, `agc_sparse_buffer_holes` and the `agc_host_import*` tests. </details>
EagleBearerYS commented 2026-10-14 21:56:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-14T21:56:10Z.


Thanks for running it on your Yōtei build. Two setups now hit the same abort and pass with the two commits, so I've added your run to the description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6179367043 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6179367043). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-14T21:56:10Z. --- Thanks for running it on your Yōtei build. Two setups now hit the same abort and pass with the two commits, so I've added your run to the description.
simonbronk commented 2026-10-15 10:05:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-15T10:05:27Z.


Tested on a second RE Engine title: Onimusha: Way of the Sword (PPSA27836). Windows 11, RTX 5070 (NVIDIA 617.42).

Base: main 0afa6a607 with the title's PRs (#5907, #5776, #5770, #5703, #5841, #5884, #5915) and local sample-count changes. During the New Game scene load, the title stops with the same message as Village:

AGC graphics: guest buffer view 0x1d08ee1bc0+0x28b320 exceeds its GPU owner 0x1d08e00000-0x1d09000000 (buffer 0, direct 1, mirror 0)

With this PR merged (no conflicts), that stop is gone, and the load reaches later draws. It stops further on, at an unrelated sample-count check.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6189550601 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6189550601). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-15T10:05:27Z. --- Tested on a second RE Engine title: Onimusha: Way of the Sword (PPSA27836). Windows 11, RTX 5070 (NVIDIA 617.42). Base: `main` 0afa6a607 with the title's PRs (#5907, #5776, #5770, #5703, #5841, #5884, #5915) and local sample-count changes. During the New Game scene load, the title stops with the same message as Village: ``` AGC graphics: guest buffer view 0x1d08ee1bc0+0x28b320 exceeds its GPU owner 0x1d08e00000-0x1d09000000 (buffer 0, direct 1, mirror 0) ``` With this PR merged (no conflicts), that stop is gone, and the load reaches later draws. It stops further on, at an unrelated sample-count check.
EagleBearerYS commented 2026-10-15 10:12:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-15T10:12:07Z.


Thanks for testing it on Onimusha! I've added your run to the description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6189668637 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6189668637). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-15T10:12:07Z. --- Thanks for testing it on Onimusha! I've added your run to the description.
github-actions[bot] commented 2026-10-15 12:09:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:09:56Z.


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 1324 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1896 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 3891 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4156 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4396 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4397 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4422 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4423 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4424 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4449 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4520 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4521 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4522 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4523 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4566 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4599 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4718 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4740 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4749 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4760 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 4813 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 5867 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6222 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191709767 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6191709767). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:09:56Z. --- <!-- 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 1324](https://www.github.com/boykopovar/AnyPS5/pull/1324) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 1896](https://www.github.com/boykopovar/AnyPS5/pull/1896) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 3891](https://www.github.com/boykopovar/AnyPS5/pull/3891) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4156](https://www.github.com/boykopovar/AnyPS5/pull/4156) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4396](https://www.github.com/boykopovar/AnyPS5/pull/4396) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4397](https://www.github.com/boykopovar/AnyPS5/pull/4397) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4422](https://www.github.com/boykopovar/AnyPS5/pull/4422) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4423](https://www.github.com/boykopovar/AnyPS5/pull/4423) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4424](https://www.github.com/boykopovar/AnyPS5/pull/4424) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4520](https://www.github.com/boykopovar/AnyPS5/pull/4520) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4521](https://www.github.com/boykopovar/AnyPS5/pull/4521) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4522](https://www.github.com/boykopovar/AnyPS5/pull/4522) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4523](https://www.github.com/boykopovar/AnyPS5/pull/4523) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4566](https://www.github.com/boykopovar/AnyPS5/pull/4566) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4599](https://www.github.com/boykopovar/AnyPS5/pull/4599) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4718](https://www.github.com/boykopovar/AnyPS5/pull/4718) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4740](https://www.github.com/boykopovar/AnyPS5/pull/4740) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4749](https://www.github.com/boykopovar/AnyPS5/pull/4749) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4760](https://www.github.com/boykopovar/AnyPS5/pull/4760) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 4813](https://www.github.com/boykopovar/AnyPS5/pull/4813) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp` | | [PR 5867](https://www.github.com/boykopovar/AnyPS5/pull/5867) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6177](https://www.github.com/boykopovar/AnyPS5/pull/6177) | `core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` |
adriadam10 commented 2026-10-15 13:15:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:15:01Z.


Checked on the PR merged onto main: build and ctest for libSceAgcDriver (agc_driver_graphics, agc_driver_bda_device, agc_driver_bda_span_reads, agc_sparse_buffer_holes pass). With the two source files reverted to main, agc_driver_graphics fails, so the new tests pin the fix. owner() now picks the region that holds the whole range, and the BDA table is made disjoint to match; the runs on Village, Ghost of Yōtei and Onimusha reported in the thread cover the real-title case. agc_driver_tessellation (segfault on local RADV) and agc_driver_store_over_untracked (intermittent, also seen with main's code) are unrelated to this change. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6192951265 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5815#issuecomment-6192951265). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-15T13:15:01Z. --- Checked on the PR merged onto main: build and ctest for libSceAgcDriver (`agc_driver_graphics`, `agc_driver_bda_device`, `agc_driver_bda_span_reads`, `agc_sparse_buffer_holes` pass). With the two source files reverted to main, `agc_driver_graphics` fails, so the new tests pin the fix. `owner()` now picks the region that holds the whole range, and the BDA table is made disjoint to match; the runs on Village, Ghost of Yōtei and Onimusha reported in the thread cover the real-title case. `agc_driver_tessellation` (segfault on local RADV) and `agc_driver_store_over_untracked` (intermittent, also seen with main's code) are unrelated to this change. Merging.
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!5815
No description provided.