fix(agc): keep PS4 depth planes coherent with buffer reads of their memory #9895

Open
savvaniss wants to merge 15 commits from upstream-pr/9895 into main
savvaniss commented 2026-10-22 20:49:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-22T20:49:38Z.


What

Get-fix/AnyPS5#20, moved upstream as Get-fix asked. #9431 is on main now, so this PR's diff is only the change below.

A depth surface keeps its depth in a Vulkan image. #7154 keeps a depth plane coherent with buffer reads and writes of its memory:

  • a plane drawn since its last store is stored into guest memory when a buffer upload, a GuestBuffers V#, an image lookup or a pending-store flush overlaps it;
  • a plane the guest wrote is reloaded at the next bind.

It only takes single-sample 32-bit planes with the PS5's 64 KiB Z swizzle (SW_MODE 24). A PS4 DB_Z_INFO names a GB_TILE_MODE index, not a swizzle mode. So a PS4 plane never took part, and a buffer read of it saw whatever guest memory held.

Risk (CUSA03312) reads its depth that way in every board frame. On the Hasbro experiment stack (test/ps4-stubs, RX 9070 XT) the frame does this:

  • a full-screen draw with DB_RENDER_CONTROL = 0x60 over the scene depth: 2048x1152 D32_SFLOAT_S8_UINT, DB_Z_INFO = 0xa0000003, so tile index 0 (Depth2D64);
  • ACQUIRE_MEM with CP_COHER_CNTL = 0x84c44000 (DB action) over the scene plane and over a second 9 MB buffer;
  • DISPATCH_DIRECT 0x2400 x 1 x 1, which is 9,216 groups of 64 threads at 16 bytes each. It copies the 9,437,184-byte plane into the second buffer with buffer loads and stores;
  • the depth-of-field compute reads that copy through an R32F Depth2D64 T# (1920x1080, pitch 2048) and writes its circle of confusion.

The copy carried stale memory, so the whole board was out of focus. Menus and 2D screens were sharp. Monopoly Plus, in the same pack, reads its depth through a T# smaller than the padded plane; that view reaches this PR's store through #7154's image-lookup flush (see Tested).

This PR:

  • records the GB_TILE_MODE of a PS4 depth plane in DepthTarget::gcnTileMode. It takes DB_Z_INFO TILE_MODE_INDEX (bits 22:20) and maps it as the T# decode maps a tiling index (GcnTileMode, a public wrapper of the existing resolveGcnTileMode);
  • lets #7154's mirror take a single-sample 32-bit PS4 plane. The plane is described in that tiling, with DB_DEPTH_SIZE's pitch as gcnPitch. The store, reload and stale-range code is #7154's, unchanged;
  • bumps the sizeof(State) guard in PipelineJournal.cpp from 920 to 928. CanonicalPipelineState and the recipe codec keep only the depth target's format and samples, so the new field never reaches a recipe.

PS5 planes are unchanged.

Since #9026 a plane is stored in 64 KiB units. A PS4 plane is tracked as one unit (SizeUnits), so it is stored and reloaded whole. With 64 KiB units, the Depth2D256 case below left the texels past its first unit unstored, even with a read in every unit. A debt entry of its own says so. D16, stencil and multisampled PS4 planes still keep depth in the host image only. main's stencil store (#12210) needs the PS5 swizzle in StencilMirrorable, so it does not take a PS4 plane.

Source for TILE_MODE_INDEX. Nothing here is an AMD statement about Liverpool or a console measurement:

This code does not read DB_DEPTH_INFO, so a title whose two registers disagreed would be stored in the index's tiling. The debt entry records that.

#9672 (Get-fix/AnyPS5#9 upstream) adds DepthTarget::gcn next to the new field. The two compose, and whichever lands second rebases a neighbouring line and recomputes the guard.

Tested

Return to a tiling, 2 Nov. Head c72cf633cd, test-only. oneandonlydean's review: going back to a tiling whose surface still exists. TileModeSwitch now binds the first tiling again without writing and compares a draw at 0.5 under LESS with the plane's bytes in that tiling, on a new surface and on a reused one (a sampled texture held across the switch, DepthSurfacesSerial unchanged). No driver change was needed. Removing the SyncFromMemory call on that bind, hiding the store from the reused surface, or removing the store each fails it at its own check (see the thread). agc_driver_gcn_depth_plane_buffer_memory passes, 1 of 1 on the RX 9070 XT, no VUID- line. Not rerun: the other 34 tests of the 1 Nov run (no driver code changed), the same test on main, the flip tests, Linux, games.

Tile-mode switch, 1 Nov. Head 55f884b209 (0b365d9926 plus a shorter debt entry). oneandonlydean's review: a surface reused across a tile-mode change stored in its old layout. agc_driver_gcn_depth_plane_buffer_memory gains TileModeSwitch on one 512x256 allocation, Depth2D64 then Depth2D256 and the reverse. Removing the tile compare, the store at the switch or the reload each fails it at its own check (see the thread). 35 of 35 pass once on the RX 9070 XT: agc_driver, agc_driver_pm4, agc_driver_graphics, agc_driver_gcn_detile, agc_driver_gcn_depth_plane_buffer_memory, agc_driver_resource_cache_replaced_texture and every agc_driver_depth_* test, no VUID- line. Not rerun: the same set on main, the flip tests, Linux (no struct under the size guards changed), games.

Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release, AMD Radeon RX 9070 XT (driver 32.0.31041.1004), ANYPS5_GPU=AMD.

Merge of main de83e8f270, 31 Oct. Head 5d1381c40e. The only conflict was in docs/dev/debt/libSceAgcDriver.md: both sides kept. agc_driver_gcn_depth_plane_buffer_memory, agc_driver_depth_fast_clear_submit and agc_driver_graphics pass, 3 of 3 on the RX 9070 XT, no VUID- line. Not rerun: the other tests, Linux (main changed no struct under the size guards in this merge), games.

Base. This branch is now 853389c92c: main 5b913d40c6 merged in (d8a0a2734b), then the guard bump, the decode test and a debt line. Every file #9431 touched takes main's version. git diff 5b913d40c6 853389c92c holds only this PR's ten files. git merge-tree with main d2250771ab has no conflicts; that merge was not built. The Windows and Linux runs below were on 4c37f8af0c; 853389c92c adds one debt sentence to it.

  • New agc_driver_gcn_depth_plane_buffer_memory runs a Depth2D64 and a Depth2D256 PS4 target, each two macro tiles wide and high (512x256 for Depth2D64):

    • it draws depth 0.75, then 0.25 over the left half and 0.5 in a 6x7 block, fetches vertices from the plane (a buffer read), and checks every texel at its GCN tiled offset;
    • it then writes 0.25 to the left half and 0.75 to the right half of the tiled plane, and checks pixel by pixel that a draw at 0.5 under LESS passes exactly on the right half.

    The test harness gains an optional GCN tile mode on Surface and an optional scissor in DrawOptions.

  • New GcnDepthTileModeTests in agc_driver_graphics decodes DB_Z_INFO through DecodeState: 0xa0000003 with DB_DEPTH_SIZE for 2048x1152 gives Depth2D64 at that size, index 2 gives Depth2D256, index 7 gives DepthPrt1K, the field above the index changes nothing, a PS4 surface with no depth plane stays unset, and a PS5 DB_Z_INFO stays unset.

  • Revert checks on 4c37f8af0c, one rebuild each. Each test fails as shown and passes again with the files restored:

    Removed Test Failure
    DepthSurface.cpp, GuestTextureResource.cpp and State.cpp as on 5b913d40c6, headers kept agc_driver_gcn_depth_plane_buffer_memory PS4 depth tile mode 19 (512x256): after a buffer read of the depth plane, texel 0,0 holds 0.000000 at its tiled offset, expected 0.250000
    The gcnTileMode test in SizeUnits (one-unit rule) agc_driver_gcn_depth_plane_buffer_memory PS4 depth tile mode 21 (256x128): after a buffer read of the depth plane, texel 0,64 holds 0.000000 at its tiled offset, expected 0.250000
    The decode line in State.cpp agc_driver_graphics PS4 DB_Z_INFO 0xa0000003 did not decode as Depth2D64
    Shift by 21 instead of 20 agc_driver_graphics PS4 DB_Z_INFO TILE_MODE_INDEX 2 did not decode as Depth2D256
    Mask of 15 instead of 7 agc_driver_graphics PS4 DB_Z_INFO bits above TILE_MODE_INDEX changed the depth tiling
    The zFormat != 0 test agc_driver_graphics a PS4 surface without a depth plane took a depth tiling
    The if (gcn) scope (PS5 decode also takes the index) agc_driver_graphics a PS5 DB_Z_INFO took a GCN depth tiling
  • Validation layer: run with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest -V, on main 5b913d40c6 and on this branch. The tests:

    • agc_driver_gcn_depth_plane_buffer_memory, agc_driver, agc_driver_pm4, agc_driver_pm4_replay, agc_driver_graphics, agc_driver_register_key, agc_driver_gcn_detile and agc_driver_pattern_buffer_fill
    • agc_driver_flip and the 17 video_out_flip_* modes
    • agc_gcn_decode, texture_format_lookup, agc_driver_resource_cache_replaced_texture and agc_depth_copy_kept_bytes
    • the 29 agc_driver_depth_* tests, among them agc_driver_depth_plane_buffer_memory, agc_driver_depth_fast_clear and agc_driver_depth_fast_clear_submit

    Results:

    • main: 58 of 58 pass (the new test is not on main).
    • This branch: 59 of 59 pass.
    • Neither log has a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS. Every Selected GPU line names the RX 9070 XT (49 on main, 50 here).
  • Linux: WSL Ubuntu, g++ 15.2.0, cmake 4.2.3, Unix Makefiles, -j4, from a git archive of this code on the Linux filesystem.

    • A plain configure stops at CMakeLists.txt:513 and :521, because the machine has no X11 or audio development packages. In that local copy only, those two FATAL_ERRORs became warnings. FFmpeg came from the project's ffmpeg-linux-x64.zip through FFMPEG_PREBUILT_DIR.
    • Before the bump, PipelineJournal.cpp stopped at the guard with (928 == 920). ShaderStages stays at 164.
    • Built after the bump: shader_recompiler_agc_driver, agc_driver_pm4_tests, agc_driver_graphics_tests, agc_driver_depth_plane_buffer_memory_tests and agc_driver_gcn_depth_plane_buffer_memory_tests, and so all of libSceAgcDriver. That includes Graphics/src/PipelineJournal.cpp and core/shader/recompiler/ShaderDiskCache.cpp, with their size guards active.
    • Ran: those four tests, 4 of 4 pass. agc_driver_depth_plane_buffer_memory and agc_driver_gcn_depth_plane_buffer_memory ran on llvmpipe (LLVM 21.1.8); the other two print no Selected GPU line.
    • Not run on Linux: every other test, a hardware GPU, the validation layer, and any build with SDL's X11 or audio backends.
  • Risk (CUSA03312): its board is sharp with a local stand-in that stores the same plane in the same tiling on the DB-flush ACQUIRE_MEM. That stand-in ran on ps4/limbo-gpu at 93eeee0141 (#6977's head then), with the Get-fix pull requests and local stand-ins for sceGnmDrawInitDefaultHardwareState200 and sceGnmUpdate*Shader; that base predates #7154. This exact commit wasn't run in the title, which also needs #9432.

  • tools/check_conventions.py --base origin/main passes.

  • tools/pr_overlap.py --branch pr9895-local (this commit), against main d2250771ab. Six pull requests conflict with this PR's lines:

    • #9672 adds DepthTarget::gcn next to gcnTileMode in State.hpp, and changes a neighbouring debt entry.
    • #9674, #9891 and #9892 change neighbouring debt entries.
    • #11825 changes the same sizeof(State) guard line.
    • #11998 conflicts in DepthFastClearHarness.hpp, at line 44 on main.

    All of them compose, and whichever lands second resolves the conflict and recomputes the guard if State changed. Another 64 pull requests conflict with main themselves, so the tool could not compare them; 41 of those share a file with this PR's code or tests, among them #6977 and #9432.

  • Head 224af33ff1 (2026-11-03): a docs-only commit on 55cc111fe4 that drops this PR's clause from the PS4 render-target debt entry, as XairRrR's review of 55cc111fe4 suggested; the entry is now identical to main's and the PS4 depth-plane entry still states the tiling. tools/check_conventions.py --base origin/main (1e658521a0) passes. No code changed, so nothing was rebuilt or rerun.

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
  • Fixes: none
  • Unblocks: CUSA03312 #7198
  • GPUs tested: AMD Radeon RX 9070 XT, driver 32.0.31041.1004, Windows 11 Pro 26300
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4973929188 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9895). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-22T20:49:38Z. --- ### What Get-fix/AnyPS5#20, moved upstream as Get-fix asked. #9431 is on `main` now, so this PR's diff is only the change below. A depth surface keeps its depth in a Vulkan image. #7154 keeps a depth plane coherent with buffer reads and writes of its memory: - a plane drawn since its last store is stored into guest memory when a buffer upload, a `GuestBuffers` V#, an image lookup or a pending-store flush overlaps it; - a plane the guest wrote is reloaded at the next bind. It only takes single-sample 32-bit planes with the PS5's 64 KiB Z swizzle (`SW_MODE` 24). A PS4 `DB_Z_INFO` names a GB_TILE_MODE index, not a swizzle mode. So a PS4 plane never took part, and a buffer read of it saw whatever guest memory held. Risk (CUSA03312) reads its depth that way in every board frame. On the Hasbro experiment stack (test/ps4-stubs, RX 9070 XT) the frame does this: - a full-screen draw with `DB_RENDER_CONTROL = 0x60` over the scene depth: 2048x1152 `D32_SFLOAT_S8_UINT`, `DB_Z_INFO = 0xa0000003`, so tile index 0 (Depth2D64); - `ACQUIRE_MEM` with `CP_COHER_CNTL = 0x84c44000` (DB action) over the scene plane and over a second 9 MB buffer; - `DISPATCH_DIRECT 0x2400 x 1 x 1`, which is 9,216 groups of 64 threads at 16 bytes each. It copies the 9,437,184-byte plane into the second buffer with buffer loads and stores; - the depth-of-field compute reads that copy through an R32F Depth2D64 T# (1920x1080, pitch 2048) and writes its circle of confusion. The copy carried stale memory, so the whole board was out of focus. Menus and 2D screens were sharp. Monopoly Plus, in the same pack, reads its depth through a T# smaller than the padded plane; that view reaches this PR's store through #7154's image-lookup flush (see Tested). This PR: - records the GB_TILE_MODE of a PS4 depth plane in `DepthTarget::gcnTileMode`. It takes `DB_Z_INFO` `TILE_MODE_INDEX` (bits 22:20) and maps it as the T# decode maps a tiling index (`GcnTileMode`, a public wrapper of the existing `resolveGcnTileMode`); - lets #7154's mirror take a single-sample 32-bit PS4 plane. The plane is described in that tiling, with `DB_DEPTH_SIZE`'s pitch as `gcnPitch`. The store, reload and stale-range code is #7154's, unchanged; - bumps the `sizeof(State)` guard in `PipelineJournal.cpp` from 920 to 928. `CanonicalPipelineState` and the recipe codec keep only the depth target's `format` and `samples`, so the new field never reaches a recipe. PS5 planes are unchanged. Since #9026 a plane is stored in 64 KiB units. A PS4 plane is tracked as one unit (`SizeUnits`), so it is stored and reloaded whole. With 64 KiB units, the Depth2D256 case below left the texels past its first unit unstored, even with a read in every unit. A debt entry of its own says so. D16, stencil and multisampled PS4 planes still keep depth in the host image only. `main`'s stencil store (#12210) needs the PS5 swizzle in `StencilMirrorable`, so it does not take a PS4 plane. **Source for `TILE_MODE_INDEX`.** Nothing here is an AMD statement about Liverpool or a console measurement: - [shadPS4's `DepthBuffer::GetTileMode`](https://github.com/shadps4-emu/shadPS4/blob/443f022450f6857256e780daa3d5a14029a748f7/src/video_core/amdgpu/regs_depth.h#L281-L283) reads the index, and [its depth `ImageInfo`](https://github.com/shadps4-emu/shadPS4/blob/443f022450f6857256e780daa3d5a14029a748f7/src/video_core/texture_cache/image_info.cpp#L93-L96) uses it. - [GPCS4's `DepthRenderTarget::getTileMode`](https://github.com/Inori/GPCS4/blob/88480de36f983c66f7dd2c5951fead1a740d47a5/GPCS4/Graphics/Gnm/GnmDepthRenderTarget.h#L122-L125) reads the same field. - [Mesa's GFX7 register list](https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-24.0.0/src/amd/registers/gfx7.json) has `TILE_MODE_INDEX` at bits 22:20 of `DB_Z_INFO`, the bits this reads. - Against it: [radeonsi](https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-24.0.0/src/gallium/drivers/radeonsi/si_state.c#L2864-2885) writes the index only on GFX6. On GFX7 and GFX8 it programs `DB_DEPTH_INFO`'s array mode and macro-tile fields instead. So the register list doesn't show that Liverpool's DB uses the index. - From one title: Risk's plane has index 0, and the T# that reads its copy names Depth2D64 at pitch 2048. That agrees, for that plane. I did not check its `DB_DEPTH_INFO`. This code does not read `DB_DEPTH_INFO`, so a title whose two registers disagreed would be stored in the index's tiling. The debt entry records that. #9672 (Get-fix/AnyPS5#9 upstream) adds `DepthTarget::gcn` next to the new field. The two compose, and whichever lands second rebases a neighbouring line and recomputes the guard. ### Tested **Return to a tiling, 2 Nov.** Head `c72cf633cd`, test-only. oneandonlydean's review: going back to a tiling whose surface still exists. `TileModeSwitch` now binds the first tiling again without writing and compares a draw at 0.5 under LESS with the plane's bytes in that tiling, on a new surface and on a reused one (a sampled texture held across the switch, `DepthSurfacesSerial` unchanged). No driver change was needed. Removing the `SyncFromMemory` call on that bind, hiding the store from the reused surface, or removing the store each fails it at its own check (see the thread). `agc_driver_gcn_depth_plane_buffer_memory` passes, 1 of 1 on the RX 9070 XT, no `VUID-` line. Not rerun: the other 34 tests of the 1 Nov run (no driver code changed), the same test on `main`, the flip tests, Linux, games. **Tile-mode switch, 1 Nov.** Head `55f884b209` (`0b365d9926` plus a shorter debt entry). oneandonlydean's review: a surface reused across a tile-mode change stored in its old layout. `agc_driver_gcn_depth_plane_buffer_memory` gains `TileModeSwitch` on one 512x256 allocation, Depth2D64 then Depth2D256 and the reverse. Removing the tile compare, the store at the switch or the reload each fails it at its own check (see the thread). 35 of 35 pass once on the RX 9070 XT: `agc_driver`, `agc_driver_pm4`, `agc_driver_graphics`, `agc_driver_gcn_detile`, `agc_driver_gcn_depth_plane_buffer_memory`, `agc_driver_resource_cache_replaced_texture` and every `agc_driver_depth_*` test, no `VUID-` line. Not rerun: the same set on `main`, the flip tests, Linux (no struct under the size guards changed), games. Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release, AMD Radeon RX 9070 XT (driver 32.0.31041.1004), `ANYPS5_GPU=AMD`. **Merge of `main` `de83e8f270`, 31 Oct.** Head `5d1381c40e`. The only conflict was in `docs/dev/debt/libSceAgcDriver.md`: both sides kept. `agc_driver_gcn_depth_plane_buffer_memory`, `agc_driver_depth_fast_clear_submit` and `agc_driver_graphics` pass, 3 of 3 on the RX 9070 XT, no `VUID-` line. Not rerun: the other tests, Linux (`main` changed no struct under the size guards in this merge), games. **Base.** This branch is now `853389c92c`: `main` `5b913d40c6` merged in (`d8a0a2734b`), then the guard bump, the decode test and a debt line. Every file #9431 touched takes `main`'s version. `git diff 5b913d40c6 853389c92c` holds only this PR's ten files. `git merge-tree` with `main` `d2250771ab` has no conflicts; that merge was not built. The Windows and Linux runs below were on `4c37f8af0c`; `853389c92c` adds one debt sentence to it. - New `agc_driver_gcn_depth_plane_buffer_memory` runs a Depth2D64 and a Depth2D256 PS4 target, each two macro tiles wide and high (512x256 for Depth2D64): - it draws depth 0.75, then 0.25 over the left half and 0.5 in a 6x7 block, fetches vertices from the plane (a buffer read), and checks every texel at its GCN tiled offset; - it then writes 0.25 to the left half and 0.75 to the right half of the tiled plane, and checks pixel by pixel that a draw at 0.5 under LESS passes exactly on the right half. The test harness gains an optional GCN tile mode on `Surface` and an optional scissor in `DrawOptions`. - New `GcnDepthTileModeTests` in `agc_driver_graphics` decodes `DB_Z_INFO` through `DecodeState`: `0xa0000003` with `DB_DEPTH_SIZE` for 2048x1152 gives Depth2D64 at that size, index 2 gives Depth2D256, index 7 gives DepthPrt1K, the field above the index changes nothing, a PS4 surface with no depth plane stays unset, and a PS5 `DB_Z_INFO` stays unset. - Revert checks on `4c37f8af0c`, one rebuild each. Each test fails as shown and passes again with the files restored: | Removed | Test | Failure | |---|---|---| | `DepthSurface.cpp`, `GuestTextureResource.cpp` and `State.cpp` as on `5b913d40c6`, headers kept | `agc_driver_gcn_depth_plane_buffer_memory` | PS4 depth tile mode 19 (512x256): after a buffer read of the depth plane, texel 0,0 holds 0.000000 at its tiled offset, expected 0.250000 | | The `gcnTileMode` test in `SizeUnits` (one-unit rule) | `agc_driver_gcn_depth_plane_buffer_memory` | PS4 depth tile mode 21 (256x128): after a buffer read of the depth plane, texel 0,64 holds 0.000000 at its tiled offset, expected 0.250000 | | The decode line in `State.cpp` | `agc_driver_graphics` | PS4 DB_Z_INFO 0xa0000003 did not decode as Depth2D64 | | Shift by 21 instead of 20 | `agc_driver_graphics` | PS4 DB_Z_INFO TILE_MODE_INDEX 2 did not decode as Depth2D256 | | Mask of 15 instead of 7 | `agc_driver_graphics` | PS4 DB_Z_INFO bits above TILE_MODE_INDEX changed the depth tiling | | The `zFormat != 0` test | `agc_driver_graphics` | a PS4 surface without a depth plane took a depth tiling | | The `if (gcn)` scope (PS5 decode also takes the index) | `agc_driver_graphics` | a PS5 DB_Z_INFO took a GCN depth tiling | - Validation layer: run with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ctest -V`, on `main` `5b913d40c6` and on this branch. The tests: - `agc_driver_gcn_depth_plane_buffer_memory`, `agc_driver`, `agc_driver_pm4`, `agc_driver_pm4_replay`, `agc_driver_graphics`, `agc_driver_register_key`, `agc_driver_gcn_detile` and `agc_driver_pattern_buffer_fill` - `agc_driver_flip` and the 17 `video_out_flip_*` modes - `agc_gcn_decode`, `texture_format_lookup`, `agc_driver_resource_cache_replaced_texture` and `agc_depth_copy_kept_bytes` - the 29 `agc_driver_depth_*` tests, among them `agc_driver_depth_plane_buffer_memory`, `agc_driver_depth_fast_clear` and `agc_driver_depth_fast_clear_submit` Results: - `main`: 58 of 58 pass (the new test is not on `main`). - This branch: 59 of 59 pass. - Neither log has a `VUID-` line or `was not found but was requested by env var VK_INSTANCE_LAYERS`. Every `Selected GPU` line names the RX 9070 XT (49 on `main`, 50 here). - Linux: WSL Ubuntu, g++ 15.2.0, cmake 4.2.3, Unix Makefiles, `-j4`, from a `git archive` of this code on the Linux filesystem. - A plain configure stops at `CMakeLists.txt:513` and `:521`, because the machine has no X11 or audio development packages. In that local copy only, those two `FATAL_ERROR`s became warnings. FFmpeg came from the project's `ffmpeg-linux-x64.zip` through `FFMPEG_PREBUILT_DIR`. - Before the bump, `PipelineJournal.cpp` stopped at the guard with `(928 == 920)`. `ShaderStages` stays at 164. - Built after the bump: `shader_recompiler_agc_driver`, `agc_driver_pm4_tests`, `agc_driver_graphics_tests`, `agc_driver_depth_plane_buffer_memory_tests` and `agc_driver_gcn_depth_plane_buffer_memory_tests`, and so all of `libSceAgcDriver`. That includes `Graphics/src/PipelineJournal.cpp` and `core/shader/recompiler/ShaderDiskCache.cpp`, with their size guards active. - Ran: those four tests, 4 of 4 pass. `agc_driver_depth_plane_buffer_memory` and `agc_driver_gcn_depth_plane_buffer_memory` ran on llvmpipe (LLVM 21.1.8); the other two print no `Selected GPU` line. - Not run on Linux: every other test, a hardware GPU, the validation layer, and any build with SDL's X11 or audio backends. - Risk (CUSA03312): its board is sharp with a local stand-in that stores the same plane in the same tiling on the DB-flush `ACQUIRE_MEM`. That stand-in ran on `ps4/limbo-gpu` at `93eeee0141` (#6977's head then), with the Get-fix pull requests and local stand-ins for `sceGnmDrawInitDefaultHardwareState200` and `sceGnmUpdate*Shader`; that base predates #7154. This exact commit wasn't run in the title, which also needs #9432. - `tools/check_conventions.py --base origin/main` passes. - `tools/pr_overlap.py --branch pr9895-local` (this commit), against `main` `d2250771ab`. Six pull requests conflict with this PR's lines: - #9672 adds `DepthTarget::gcn` next to `gcnTileMode` in `State.hpp`, and changes a neighbouring debt entry. - #9674, #9891 and #9892 change neighbouring debt entries. - #11825 changes the same `sizeof(State)` guard line. - #11998 conflicts in `DepthFastClearHarness.hpp`, at line 44 on `main`. All of them compose, and whichever lands second resolves the conflict and recomputes the guard if `State` changed. Another 64 pull requests conflict with `main` themselves, so the tool could not compare them; 41 of those share a file with this PR's code or tests, among them #6977 and #9432. - Head `224af33ff1` (2026-11-03): a docs-only commit on `55cc111fe4` that drops this PR's clause from the PS4 render-target debt entry, as XairRrR's review of `55cc111fe4` suggested; the entry is now identical to `main`'s and the PS4 depth-plane entry still states the tiling. `tools/check_conventions.py --base origin/main` (`1e658521a0`) passes. No code changed, so nothing was rebuilt or rerun. ### 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] Fixes: none - [x] Unblocks: CUSA03312 #7198 - [x] GPUs tested: AMD Radeon RX 9070 XT, driver 32.0.31041.1004, Windows 11 Pro 26300 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
XairRrR commented 2026-10-29 03:24:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T03:24:18Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The PR's own change is small and its new test catches what it claims, but the head no longer merges with main, and on Linux/GCC the head itself does not compile: the new DepthTarget::gcnTileMode field trips PipelineJournal.cpp's sizeof(State) guard.

What I ran

  • Head: 3e32049166cb89ae1de8e76b0ea92afba67e507d (merge base with main: 07da04f947)
  • main: 3a2b91981651569163768854a1fcdc7193b6667b
  • Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Ninja, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), in a clean worktree
git fetch origin main pull/9895/head:refs/review/9895
git checkout --detach origin/main
git merge --no-ff --no-edit refs/review/9895          # conflicts, aborted
git checkout --detach refs/review/9895
git diff --check origin/main...refs/review/9895
python3 tools/check_conventions.py --base origin/main
cmake -S . -B build
cmake --build build -j10 --target agc_driver_gcn_depth_plane_buffer_memory_tests agc_driver_depth_plane_buffer_memory_tests
# attribution: build only the journal object on the PR's second parent (merge/9431-main, 4e8243ac48)
git checkout --detach refs/review/9895^2
ninja -C build core/libs/prx/libSceAgcDriver/CMakeFiles/libSceAgcDriver.dir/Graphics/src/PipelineJournal.cpp.o
git checkout --detach refs/review/9895
# local-only edit so the tests could run: State 840 -> 856, ShaderStages 112 -> 116 in PipelineJournal.cpp
cmake --build build -j10 --target agc_driver_gcn_depth_plane_buffer_memory_tests agc_driver_depth_plane_buffer_memory_tests \
  agc_driver_depth_plane_fill_tests agc_driver_depth_plane_guest_layers_tests agc_driver_depth_plane_partial_store_tests agc_driver_depth_plane_sampling_tests
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -j4 -R depth_plane -V --output-on-failure

Results

Check Result
Merge onto main 3a2b919816 Conflicts in Graphics/include/State.hpp and Graphics/src/State.cpp
git diff --check clean
tools/check_conventions.py --base origin/main passed
Build of the head as pushed (Linux, GCC 16.2.1) fails: PipelineJournal.cpp static assertions (see below)
PipelineJournal.cpp.o on the second parent 4e8243ac48 (#9431 merged with main, without this PR) fails too, with sizeof(State) 848 and sizeof(ShaderStages) 116
agc_driver_gcn_depth_plane_buffer_memory (local size-guard edit, validation layer) Passed, 0.25 s; the write-watched half ran (no "not write-watched" line)
All 8 depth_plane tests (local size-guard edit, validation layer, -j4) 8/8 passed, including agc_driver_depth_plane_partial_store
VUID- lines / was not found but was requested by env var VK_INSTANCE_LAYERS 0 / 0; the loader log shows VK_LAYER_KHRONOS_validation inserted; Selected GPU is the RTX 4070 Ti SUPER
Build failure on the head
FAILED: core/libs/prx/libSceAgcDriver/CMakeFiles/libSceAgcDriver.dir/Graphics/src/PipelineJournal.cpp.o
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:41:29: error: static assertion failed: State changed: update CanonicalPipelineState and the recipe codec
   41 | static_assert(sizeof(State) == 840, "State changed: update CanonicalPipelineState and the recipe codec");
      • the comparison reduces to '(856 == 840)'
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:42:36: error: static assertion failed: ShaderStages changed: update the recipe codec
   42 | static_assert(sizeof(ShaderStages) == 112, "ShaderStages changed: update the recipe codec");
      • the comparison reduces to '(116 == 112)'

On 4e8243ac48 (without this PR's commits) the same guard reports (848 == 840) and (116 == 112).

Merge conflicts with main 3a2b919816
CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp

State.hpp: main's ShaderStages::hullWaveSize/tessellationGeometry against #9431's legacyVertex, and DrawKeyRegisters (50 entries on main, 52 on the branch). State.cpp: decodeDepthPlane (the block that holds this PR's gcnTileMode line), DecodeShaderStages (main's TessellationGeometry path) and the DecodeColorFormat/DecodeGcnColorBuffer neighbourhood.

Test run (local size-guard edit)
833: [src/VulkanDevice.cpp:1270 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 4070 Ti SUPER vendor=0x10de device=0x2705 subgroup=32
833: GCN depth plane buffer memory tests passed
2/8 Test  #833: agc_driver_gcn_depth_plane_buffer_memory ..........   Passed    0.57 sec
...
100% tests passed out of 8

Negative control

Both on the head with the local size-guard edit:

  1. With DepthSurface.cpp, GuestTextureResource.cpp and State.cpp restored from 4e8243ac48 (headers kept), the new test fails: PS4 depth tile mode 19 (512x256): after a buffer read of the depth plane, texel 0,0 holds 0.000000 at its tiled offset, expected 0.250000.
  2. With only !target.gcnTileMode.has_value() removed from SizeUnits, it fails: PS4 depth tile mode 21 (256x128): after a buffer read of the depth plane, texel 0,64 holds 0.000000 at its tiled offset, expected 0.250000.

Both match the description. Restoring the files makes the test pass again.

Findings

Blocking

  1. The head does not compile on Linux x86_64 with libstdc++. core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:41-42 already guards sizeof(State) == 840 and sizeof(ShaderStages) == 112 at the PR's own merge base 07da04f947, but only under __linux__ && __x86_64__ && __GLIBCXX__. That is why the Windows runs in the description and in the comments built. This confirms babyhuey's report and adds two things. The head fails as pushed, not only after a merge onto a newer main. And this PR's own std::optional<TextureTileMode> gcnTileMode in DepthTarget (Graphics/include/State.hpp:97) adds 8 bytes to State (848 → 856) on top of #9431's growth.
    • CanonicalPipelineState copies only format and samples of the depth target, so the field doesn't need to reach the recipe codec.
    • Fix: once #9431 has updated the guards, bump the State size to its new value here.
  2. Conflicts with current main in Graphics/include/State.hpp and Graphics/src/State.cpp. Both conflicts come from #9431's side of the branch, but they include decodeDepthPlane, which holds this PR's gcnTileMode line. The checklist line "Based on current main" does not hold: the merge base is 3,853 commits behind main. Fix: bring #9431 (or merge/9431-main) up to current main, then this branch.

Non-blocking

  1. The new test sets Surface::gcnTileMode directly through the harness. Nothing covers the DB_Z_INFO decode at Graphics/src/State.cpp:420, which maps TILE_MODE_INDEX (bits 22:20) through GcnTileMode and leaves it unset when Z_FORMAT is 0. A small decode test with a register set like the one in the description (DB_Z_INFO = 0xa0000003 → kGcnDepth2D64, with a non-zero index such as 2 → kGcnDepth2D256) would cover it.
  2. Under the one-unit rule, every flush that overlaps a stale PS4 plane stores the whole plane: 9 MB for the 1920x1088 case in the description. The debt entry documents this, which is fine. A speed claim or follow-up that restores finer units would need tools/trace_digest.py numbers.

Not verified

  • I could not build or test a merge with main, because it conflicts, so the PR is tested only against its 07da04f947 base, plus the local size-guard edit.
  • I did not run the main-side validation-layer comparison for the AGC tests: the merged tree does not exist, and the PR head shares no build state with current main. The PR-side run had no VUID- lines.
  • I built and ran only the 8 depth_plane tests, not the wider agc_driver_*, video_out_flip_* or agc_gcn_decode set from the description.
  • I did not check the PS4 behaviour (Risk, CUSA03312) or any console comparison.
  • Whether DB_Z_INFO.TILE_MODE_INDEX is the authoritative depth tiling on Liverpool, rather than DB_DEPTH_INFO's array mode and macro-tile fields as on other GFX7 parts, is taken from the shadPS4 approach the debt entry cites. I did not verify it.

To get this to a good state

  1. Rebase or merge #9431 onto current main, then this branch, resolving State.hpp and State.cpp.
  2. Update the sizeof(State) guard in PipelineJournal.cpp for gcnTileMode (and ShaderStages, if #9431 has not), and build on Linux/GCC so the guard is checked.
  3. Optionally add a decode test for DB_Z_INFO.TILE_MODE_INDEX → DepthTarget::gcnTileMode.
  4. Re-run the validation-layer test set on the updated head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692482378 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9895#pullrequestreview-5692482378). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T03:24:18Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The PR's own change is small and its new test catches what it claims, but the head no longer merges with `main`, and on Linux/GCC the head itself does not compile: the new `DepthTarget::gcnTileMode` field trips `PipelineJournal.cpp`'s `sizeof(State)` guard. ## What I ran - Head: `3e32049166cb89ae1de8e76b0ea92afba67e507d` (merge base with `main`: `07da04f947`) - `main`: `3a2b91981651569163768854a1fcdc7193b6667b` - Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Ninja, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), in a clean worktree ```sh git fetch origin main pull/9895/head:refs/review/9895 git checkout --detach origin/main git merge --no-ff --no-edit refs/review/9895 # conflicts, aborted git checkout --detach refs/review/9895 git diff --check origin/main...refs/review/9895 python3 tools/check_conventions.py --base origin/main cmake -S . -B build cmake --build build -j10 --target agc_driver_gcn_depth_plane_buffer_memory_tests agc_driver_depth_plane_buffer_memory_tests # attribution: build only the journal object on the PR's second parent (merge/9431-main, 4e8243ac48) git checkout --detach refs/review/9895^2 ninja -C build core/libs/prx/libSceAgcDriver/CMakeFiles/libSceAgcDriver.dir/Graphics/src/PipelineJournal.cpp.o git checkout --detach refs/review/9895 # local-only edit so the tests could run: State 840 -> 856, ShaderStages 112 -> 116 in PipelineJournal.cpp cmake --build build -j10 --target agc_driver_gcn_depth_plane_buffer_memory_tests agc_driver_depth_plane_buffer_memory_tests \ agc_driver_depth_plane_fill_tests agc_driver_depth_plane_guest_layers_tests agc_driver_depth_plane_partial_store_tests agc_driver_depth_plane_sampling_tests VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -j4 -R depth_plane -V --output-on-failure ``` ## Results | Check | Result | |---|---| | Merge onto `main` `3a2b919816` | **Conflicts** in `Graphics/include/State.hpp` and `Graphics/src/State.cpp` | | `git diff --check` | clean | | `tools/check_conventions.py --base origin/main` | passed | | Build of the head as pushed (Linux, GCC 16.2.1) | **fails**: `PipelineJournal.cpp` static assertions (see below) | | `PipelineJournal.cpp.o` on the second parent `4e8243ac48` (#9431 merged with `main`, without this PR) | fails too, with `sizeof(State)` 848 and `sizeof(ShaderStages)` 116 | | `agc_driver_gcn_depth_plane_buffer_memory` (local size-guard edit, validation layer) | Passed, 0.25 s; the write-watched half ran (no "not write-watched" line) | | All 8 `depth_plane` tests (local size-guard edit, validation layer, `-j4`) | 8/8 passed, including `agc_driver_depth_plane_partial_store` | | `VUID-` lines / `was not found but was requested by env var VK_INSTANCE_LAYERS` | 0 / 0; the loader log shows `VK_LAYER_KHRONOS_validation` inserted; `Selected GPU` is the RTX 4070 Ti SUPER | <details><summary>Build failure on the head</summary> ```text FAILED: core/libs/prx/libSceAgcDriver/CMakeFiles/libSceAgcDriver.dir/Graphics/src/PipelineJournal.cpp.o core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:41:29: error: static assertion failed: State changed: update CanonicalPipelineState and the recipe codec 41 | static_assert(sizeof(State) == 840, "State changed: update CanonicalPipelineState and the recipe codec"); • the comparison reduces to '(856 == 840)' core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:42:36: error: static assertion failed: ShaderStages changed: update the recipe codec 42 | static_assert(sizeof(ShaderStages) == 112, "ShaderStages changed: update the recipe codec"); • the comparison reduces to '(116 == 112)' ``` On `4e8243ac48` (without this PR's commits) the same guard reports `(848 == 840)` and `(116 == 112)`. </details> <details><summary>Merge conflicts with main 3a2b919816</summary> ```text CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp CONFLICT (content): Merge conflict in core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp ``` `State.hpp`: `main`'s `ShaderStages::hullWaveSize`/`tessellationGeometry` against #9431's `legacyVertex`, and `DrawKeyRegisters` (50 entries on `main`, 52 on the branch). `State.cpp`: `decodeDepthPlane` (the block that holds this PR's `gcnTileMode` line), `DecodeShaderStages` (`main`'s TessellationGeometry path) and the `DecodeColorFormat`/`DecodeGcnColorBuffer` neighbourhood. </details> <details><summary>Test run (local size-guard edit)</summary> ```text 833: [src/VulkanDevice.cpp:1270 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 4070 Ti SUPER vendor=0x10de device=0x2705 subgroup=32 833: GCN depth plane buffer memory tests passed 2/8 Test #833: agc_driver_gcn_depth_plane_buffer_memory .......... Passed 0.57 sec ... 100% tests passed out of 8 ``` </details> ## Negative control Both on the head with the local size-guard edit: 1. With `DepthSurface.cpp`, `GuestTextureResource.cpp` and `State.cpp` restored from `4e8243ac48` (headers kept), the new test fails: `PS4 depth tile mode 19 (512x256): after a buffer read of the depth plane, texel 0,0 holds 0.000000 at its tiled offset, expected 0.250000`. 2. With only `!target.gcnTileMode.has_value()` removed from `SizeUnits`, it fails: `PS4 depth tile mode 21 (256x128): after a buffer read of the depth plane, texel 0,64 holds 0.000000 at its tiled offset, expected 0.250000`. Both match the description. Restoring the files makes the test pass again. ## Findings ### Blocking 1. **The head does not compile on Linux x86_64 with libstdc++.** `core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:41-42` already guards `sizeof(State) == 840` and `sizeof(ShaderStages) == 112` at the PR's own merge base `07da04f947`, but only under `__linux__ && __x86_64__ && __GLIBCXX__`. That is why the Windows runs in the description and in the comments built. This confirms babyhuey's report and adds two things. The head fails as pushed, not only after a merge onto a newer `main`. And this PR's own `std::optional<TextureTileMode> gcnTileMode` in `DepthTarget` (`Graphics/include/State.hpp:97`) adds 8 bytes to `State` (848 → 856) on top of #9431's growth. - `CanonicalPipelineState` copies only `format` and `samples` of the depth target, so the field doesn't need to reach the recipe codec. - Fix: once #9431 has updated the guards, bump the `State` size to its new value here. 2. **Conflicts with current `main`** in `Graphics/include/State.hpp` and `Graphics/src/State.cpp`. Both conflicts come from #9431's side of the branch, but they include `decodeDepthPlane`, which holds this PR's `gcnTileMode` line. The checklist line "Based on current `main`" does not hold: the merge base is 3,853 commits behind `main`. Fix: bring #9431 (or `merge/9431-main`) up to current `main`, then this branch. ### Non-blocking 1. The new test sets `Surface::gcnTileMode` directly through the harness. Nothing covers the `DB_Z_INFO` decode at `Graphics/src/State.cpp:420`, which maps `TILE_MODE_INDEX` (bits 22:20) through `GcnTileMode` and leaves it unset when `Z_FORMAT` is 0. A small decode test with a register set like the one in the description (`DB_Z_INFO = 0xa0000003` → `kGcnDepth2D64`, with a non-zero index such as 2 → `kGcnDepth2D256`) would cover it. 2. Under the one-unit rule, every flush that overlaps a stale PS4 plane stores the whole plane: 9 MB for the 1920x1088 case in the description. The debt entry documents this, which is fine. A speed claim or follow-up that restores finer units would need `tools/trace_digest.py` numbers. ## Not verified - I could not build or test a merge with `main`, because it conflicts, so the PR is tested only against its 07da04f947 base, plus the local size-guard edit. - I did not run the `main`-side validation-layer comparison for the AGC tests: the merged tree does not exist, and the PR head shares no build state with current `main`. The PR-side run had no `VUID-` lines. - I built and ran only the 8 `depth_plane` tests, not the wider `agc_driver_*`, `video_out_flip_*` or `agc_gcn_decode` set from the description. - I did not check the PS4 behaviour (Risk, CUSA03312) or any console comparison. - Whether `DB_Z_INFO.TILE_MODE_INDEX` is the authoritative depth tiling on Liverpool, rather than `DB_DEPTH_INFO`'s array mode and macro-tile fields as on other GFX7 parts, is taken from the shadPS4 approach the debt entry cites. I did not verify it. ## To get this to a good state 1. Rebase or merge #9431 onto current `main`, then this branch, resolving `State.hpp` and `State.cpp`. 2. Update the `sizeof(State)` guard in `PipelineJournal.cpp` for `gcnTileMode` (and `ShaderStages`, if #9431 has not), and build on Linux/GCC so the guard is checked. 3. Optionally add a decode test for `DB_Z_INFO.TILE_MODE_INDEX` → `DepthTarget::gcnTileMode`. 4. Re-run the validation-layer test set on the updated head.
XairRrR commented 2026-11-03 07:04:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T07:04:13Z.

Review: APPROVED


Re-checked — approved

Since my last review the branch has merged main again, set the sizeof(State) guard to 936, added a DB_Z_INFO TILE_MODE_INDEX decode test, and handled a PS4 depth plane bound again in another tile mode (sameSurface now compares the tile mode, the old surface is stored and retired, and the new surface is reloaded). The merged tree builds on Linux/GCC, the tests pass, and the negative controls fail where they should.

What changed since my last review

  • ef34b9976e and the merge 7253ae5a70: the sizeof(State) guard in PipelineJournal.cpp is now 936. That is 920, plus 8 for this PR's field, plus 8 from main.
  • d8a0a2734b, 5d1381c40e and 7253ae5a70: main merged in. #9431 is on main, so the diff now holds only this PR's ten files.
  • 4c37f8af0c: new GcnDepthTileModeTests in agc_driver_graphics.
  • 0b365d9926: sameStorage / sameSurface split. A retile loop calls retireStoringStale on surfaces over the same storage in another tile mode, and a surface newly created after a retile goes through LoadFromMemory.
  • 853389c92c and 55f884b209: changes to the debt entry. c72cf633cd: TileModeSwitch covers going back to a tiling, on both a new and a reused surface.

What I ran

Head 7253ae5a70f5ebc23898c58950501db96ad1b6f7, main d1ae628bc2f62459cce1e9872ba5632c938c71f2, merged tree 8a7f9d0e94fcec388272c42ea9488099a81de841. Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19), in a clean worktree.

git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...7253ae5a70f5ebc23898c58950501db96ad1b6f7
python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_depth_plane_buffer_memory)$'
# negative controls (one rebuild each, then restored from the merged tree)
git show d1ae628bc2:<DepthSurface.cpp, State.cpp> > ...   # headers kept
ninja -C build agc_driver_gcn_depth_plane_buffer_memory_tests agc_driver_graphics_tests
ctest --test-dir build --output-on-failure -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_graphics)$'
# sameSurface reduced to sameStorage (tile compare removed)
# LoadFromMemory branch disabled (falls through to SyncFromMemory)
git status --porcelain   # empty after restoring
ctest --test-dir build --output-on-failure -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_graphics)$'

The script's build and test run (build.json) and its validation-layer comparison with main were also used.

Check Result
Merge into main clean
git diff --check clean
check_conventions.py passed
Build (Linux, GCC 14.2.0, libstdc++; sizeof(State) guard active) passed
Selected tests (script) 2144 ran: 0 new failures, 0 timeouts. 7 known failures also fail on main
Validation layer vs main (script) 768 tests, layer loaded in 767 and not missing in any, 0 tests with a new VUID-
agc_driver_gcn_depth_plane_buffer_memory passed, 0.6 s, on llvmpipe. The write-watched part ran (no "not write-watched" line)
agc_driver_graphics passed, 34.5 s

Negative control

Reverted Result
DepthSurface.cpp and State.cpp from main (headers kept) agc_driver_gcn_depth_plane_buffer_memory fails: PS4 depth tile mode 19 (512x256): after a buffer read of the depth plane, texel 0,0 holds 0.000000 at its tiled offset, expected 0.250000. agc_driver_graphics fails: PS4 DB_Z_INFO 0xa0000003 did not decode as Depth2D64
Tile compare removed from sameSurface fails: PS4 depth tile mode 19 then 21: the second tiling, after a buffer read: texel 128,0 holds 0.750000 at its tiled offset, expected 0.250000, as the author reported
LoadFromMemory branch disabled (DepthSurface.cpp:2573) passes here (see non-blocking 1)

After restoring, git status --porcelain was empty and both tests passed again.

Previous findings

  • Blocking 1, Linux build fails on the sizeof(State) guard: Resolved. PipelineJournal.cpp:44 now reads sizeof(State) == 936, and the merged tree compiled with GCC/libstdc++ on Linux x86_64, where the guard is active. CanonicalPipelineState still does not need the field.
  • Blocking 2, conflicts with main: Resolved. The head merges into d1ae628bc2 without conflicts, and the diff holds only this PR's files.
  • Non-blocking 1, no decode test: Resolved. GcnDepthTileModeTests (tests/Graphics.cpp:748-795) covers index 0, 2 and 7, the field above the index, a surface with no depth plane, and PS5. Reverting State.cpp makes it fail with its own message.
  • Non-blocking 2, whole-plane stores for PS4: Still open, as acknowledged. The debt entry documents it and the PR makes no speed claim. No action needed here.

New findings

Blocking

None.

Non-blocking

  1. On this machine the LoadFromMemory branch is not covered by the test. With line 2573 of Graphics/src/DepthSurface.cpp disabled, so a new surface after a retile takes SyncFromMemory, agc_driver_gcn_depth_plane_buffer_memory still passes on Linux/lavapipe. The likely reason: a PS4 plane is one unit, and a freshly created surface has unitGeneration 0. On a write-watched Linux host, WrittenUnits takes the unitGeneration.size() == 1u branch (DepthSurface.cpp:1108-1110), and WrittenSince(..., 0) reports the whole plane, so SyncFromMemory reloads it anyway. The author reports that removing LoadFromMemory fails on Windows. I accept that as author-reported, so the branch is not dead, but the regression only discriminates on some hosts. This is a coverage gap, not a bug.

Not verified

  • No run on a hardware GPU. I did not run the Windows path, where the author reports that the LoadFromMemory control fails.
  • Whether DB_Z_INFO.TILE_MODE_INDEX, rather than DB_DEPTH_INFO, is the authoritative depth tiling on Liverpool. The debt entry records this as unverified.
  • Risk (CUSA03312) or any other title.
  • agc_driver_graphics took 34.5 s here, over the 30 s budget. This PR adds only a few decodes to it, and the NVIDIA bot reported the test at about 30–33 s on main-based runs, so I don't attribute the time to this PR. I did not time it on main on this machine.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5748310762 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9895#pullrequestreview-5748310762). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T07:04:13Z. **Review:** APPROVED --- # Re-checked — approved Since my last review the branch has merged `main` again, set the `sizeof(State)` guard to 936, added a `DB_Z_INFO` `TILE_MODE_INDEX` decode test, and handled a PS4 depth plane bound again in another tile mode (`sameSurface` now compares the tile mode, the old surface is stored and retired, and the new surface is reloaded). The merged tree builds on Linux/GCC, the tests pass, and the negative controls fail where they should. ## What changed since my last review - `ef34b9976e` and the merge `7253ae5a70`: the `sizeof(State)` guard in `PipelineJournal.cpp` is now 936. That is 920, plus 8 for this PR's field, plus 8 from `main`. - `d8a0a2734b`, `5d1381c40e` and `7253ae5a70`: `main` merged in. #9431 is on `main`, so the diff now holds only this PR's ten files. - `4c37f8af0c`: new `GcnDepthTileModeTests` in `agc_driver_graphics`. - `0b365d9926`: `sameStorage` / `sameSurface` split. A retile loop calls `retireStoringStale` on surfaces over the same storage in another tile mode, and a surface newly created after a retile goes through `LoadFromMemory`. - `853389c92c` and `55f884b209`: changes to the debt entry. `c72cf633cd`: `TileModeSwitch` covers going back to a tiling, on both a new and a reused surface. ## What I ran Head `7253ae5a70f5ebc23898c58950501db96ad1b6f7`, `main` `d1ae628bc2f62459cce1e9872ba5632c938c71f2`, merged tree `8a7f9d0e94fcec388272c42ea9488099a81de841`. Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19), in a clean worktree. ```sh git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...7253ae5a70f5ebc23898c58950501db96ad1b6f7 python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -V -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_depth_plane_buffer_memory)$' # negative controls (one rebuild each, then restored from the merged tree) git show d1ae628bc2:<DepthSurface.cpp, State.cpp> > ... # headers kept ninja -C build agc_driver_gcn_depth_plane_buffer_memory_tests agc_driver_graphics_tests ctest --test-dir build --output-on-failure -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_graphics)$' # sameSurface reduced to sameStorage (tile compare removed) # LoadFromMemory branch disabled (falls through to SyncFromMemory) git status --porcelain # empty after restoring ctest --test-dir build --output-on-failure -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_graphics)$' ``` The script's build and test run (build.json) and its validation-layer comparison with `main` were also used. | Check | Result | |---|---| | Merge into `main` | clean | | `git diff --check` | clean | | `check_conventions.py` | passed | | Build (Linux, GCC 14.2.0, libstdc++; `sizeof(State)` guard active) | passed | | Selected tests (script) | 2144 ran: 0 new failures, 0 timeouts. 7 known failures also fail on `main` | | Validation layer vs `main` (script) | 768 tests, layer loaded in 767 and not missing in any, 0 tests with a new `VUID-` | | `agc_driver_gcn_depth_plane_buffer_memory` | passed, 0.6 s, on llvmpipe. The write-watched part ran (no "not write-watched" line) | | `agc_driver_graphics` | passed, 34.5 s | ## Negative control | Reverted | Result | |---|---| | `DepthSurface.cpp` and `State.cpp` from `main` (headers kept) | `agc_driver_gcn_depth_plane_buffer_memory` fails: `PS4 depth tile mode 19 (512x256): after a buffer read of the depth plane, texel 0,0 holds 0.000000 at its tiled offset, expected 0.250000`. `agc_driver_graphics` fails: `PS4 DB_Z_INFO 0xa0000003 did not decode as Depth2D64` | | Tile compare removed from `sameSurface` | fails: `PS4 depth tile mode 19 then 21: the second tiling, after a buffer read: texel 128,0 holds 0.750000 at its tiled offset, expected 0.250000`, as the author reported | | `LoadFromMemory` branch disabled (`DepthSurface.cpp:2573`) | **passes** here (see non-blocking 1) | After restoring, `git status --porcelain` was empty and both tests passed again. ## Previous findings - **Blocking 1, Linux build fails on the `sizeof(State)` guard:** Resolved. `PipelineJournal.cpp:44` now reads `sizeof(State) == 936`, and the merged tree compiled with GCC/libstdc++ on Linux x86_64, where the guard is active. `CanonicalPipelineState` still does not need the field. - **Blocking 2, conflicts with `main`:** Resolved. The head merges into `d1ae628bc2` without conflicts, and the diff holds only this PR's files. - **Non-blocking 1, no decode test:** Resolved. `GcnDepthTileModeTests` (`tests/Graphics.cpp:748-795`) covers index 0, 2 and 7, the field above the index, a surface with no depth plane, and PS5. Reverting `State.cpp` makes it fail with its own message. - **Non-blocking 2, whole-plane stores for PS4:** Still open, as acknowledged. The debt entry documents it and the PR makes no speed claim. No action needed here. ## New findings ### Blocking None. ### Non-blocking 1. **On this machine the `LoadFromMemory` branch is not covered by the test.** With line 2573 of `Graphics/src/DepthSurface.cpp` disabled, so a new surface after a retile takes `SyncFromMemory`, `agc_driver_gcn_depth_plane_buffer_memory` still passes on Linux/lavapipe. The likely reason: a PS4 plane is one unit, and a freshly created surface has `unitGeneration` 0. On a write-watched Linux host, `WrittenUnits` takes the `unitGeneration.size() == 1u` branch (`DepthSurface.cpp:1108-1110`), and `WrittenSince(..., 0)` reports the whole plane, so `SyncFromMemory` reloads it anyway. The author reports that removing `LoadFromMemory` fails on Windows. I accept that as author-reported, so the branch is not dead, but the regression only discriminates on some hosts. This is a coverage gap, not a bug. ## Not verified - No run on a hardware GPU. I did not run the Windows path, where the author reports that the `LoadFromMemory` control fails. - Whether `DB_Z_INFO.TILE_MODE_INDEX`, rather than `DB_DEPTH_INFO`, is the authoritative depth tiling on Liverpool. The debt entry records this as unverified. - Risk (CUSA03312) or any other title. - `agc_driver_graphics` took 34.5 s here, over the 30 s budget. This PR adds only a few decodes to it, and the NVIDIA bot reported the test at about 30–33 s on `main`-based runs, so I don't attribute the time to this PR. I did not time it on `main` on this machine. <!-- anyps5-bots job=3044 head=7253ae5a70f5ebc23898c58950501db96ad1b6f7 -->
XairRrR commented 2026-11-03 18:37:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T18:37:42Z.

Review: APPROVED


Re-checked — approved

The only new commit is the merge 55cc111fe4, which brings in main 1e658521a0. It keeps both this PR's DepthTarget::gcnTileMode and main's DepthTarget::gcn (#9672). The merged tree builds, the focused tests pass, and the negative control still fails.

What changed since my last review

  • No PR commit changed. The range-diff shows commits 1–7 identical.
  • 55cc111fe4 merges main 1e658521a0.
    • State.hpp: DepthTarget now has both std::optional<TextureTileMode> gcnTileMode and bool gcn.
    • The sizeof(State) guard stays at 936. It compiles with GCC 14 and libstdc++ on Linux x86_64, where the guard is active.
  • I checked how main's gcn flag interacts with this PR's code. It is used in DepthSurface.cpp only by the cropped level-0 view path at line 3264. That path requires resource.gcnPitch to be 0 or equal to base.extent.width, the same pitch mirrorResource now gives a PS4 plane. sameStorage and sameSurface do not compare gcn, and they don't need to: gcnTileMode is set only when gcn is true and zFormat != 0.
  • No author reply or description change touches my previous findings.

What I ran

Head 55cc111fe40dd0c28f0f35a73dc4250a065bc525, main 1e658521a0a599872612bb91949311e2956b5283, merged tree 6f5b068e70faff96afa457984dd88bdb521193f5. Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19), in a clean worktree.

git diff --check 1e658521a0a599872612bb91949311e2956b5283...55cc111fe40dd0c28f0f35a73dc4250a065bc525
python3 tools/check_conventions.py --base 1e658521a0a599872612bb91949311e2956b5283
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -j4 -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_depth_plane_buffer_memory|agc_driver_gcn_padded_depth_sampling|agc_driver_graphics)$'
# negative control
git show 1e658521a0:core/libs/prx/libSceAgcDriver/Graphics/src/{DepthSurface.cpp,State.cpp} > ...   # headers kept
ninja -C build agc_driver_gcn_depth_plane_buffer_memory_tests
ctest --test-dir build --output-on-failure -R '^agc_driver_gcn_depth_plane_buffer_memory$'
git show 6f5b068e70:<same files> > ...; ninja ...; ctest ...; git status --porcelain
Check Result
Merge into main clean
git diff --check clean
check_conventions.py passed: 0 errors, 1 debt-length warning (see below)
Build (script) passed
Selected tests (script) 2164 ran, 0 new failures, 0 timeouts; the 7 known failures also fail on main
Validation layer vs main (script) 773 tests, layer loaded in 772 and missing in none, 0 tests with a new VUID-
agc_driver_gcn_depth_plane_buffer_memory passed, 0.78 s
agc_driver_depth_plane_buffer_memory passed
agc_driver_gcn_padded_depth_sampling (main's gcn user) passed
agc_driver_graphics passed, 36.4 s

Negative control. I restored DepthSurface.cpp and State.cpp from main. agc_driver_gcn_depth_plane_buffer_memory then fails: PS4 depth tile mode 19 (512x256): after a buffer read of the depth plane, texel 0,0 holds 0.000000 at its tiled offset, expected 0.250000. With the merged files back, it passes and git status --porcelain is empty.

Previous findings

  • Non-blocking 1, the LoadFromMemory branch is not covered on this host: Still open. The code and test are unchanged since 7253ae5a70, so the observation from my last review still holds. It is a coverage gap, not a bug. The author reports that removing the branch fails the test on Windows, and I accept that as author-reported.
  • Non-blocking 2 from the earlier review, PS4 planes are stored whole: Still open, as acknowledged. It is documented in the debt entry, and the PR makes no speed claim.

New findings

Blocking

None.

Non-blocking

  1. The PS4 render-target debt entry is now over the checker's 1000-character limit. check_conventions.py warns on docs/dev/debt/libSceAgcDriver.md:119 (1092 characters). On main that entry is 999 characters, and the clause this PR adds ("and a 32-bit plane reaches guest memory in that tiling (depth planes in guest memory, below)") pushes it over. It is a warning, not an error. The PR has its own PS4 depth-plane entry, so the clause could be dropped or shortened to a cross-reference.

Not verified

  • No run on a hardware GPU and no Windows run. The LoadFromMemory control is author-reported only.
  • Whether DB_Z_INFO.TILE_MODE_INDEX, rather than DB_DEPTH_INFO, is the authoritative depth tiling on Liverpool. The debt entry records this.
  • Risk (CUSA03312) or any other title.
  • agc_driver_graphics took 36.4 s here, with four tests running in parallel, which is over the 30 s budget. This PR adds only a few decodes to it, and it was already about 30–34 s in earlier main-based runs. I did not time it on main this round.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5757613701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9895#pullrequestreview-5757613701). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T18:37:42Z. **Review:** APPROVED --- # Re-checked — approved The only new commit is the merge `55cc111fe4`, which brings in `main` `1e658521a0`. It keeps both this PR's `DepthTarget::gcnTileMode` and `main`'s `DepthTarget::gcn` (#9672). The merged tree builds, the focused tests pass, and the negative control still fails. ## What changed since my last review - No PR commit changed. The range-diff shows commits 1–7 identical. - `55cc111fe4` merges `main` `1e658521a0`. - `State.hpp`: `DepthTarget` now has both `std::optional<TextureTileMode> gcnTileMode` and `bool gcn`. - The `sizeof(State)` guard stays at 936. It compiles with GCC 14 and libstdc++ on Linux x86_64, where the guard is active. - I checked how `main`'s `gcn` flag interacts with this PR's code. It is used in `DepthSurface.cpp` only by the cropped level-0 view path at line 3264. That path requires `resource.gcnPitch` to be 0 or equal to `base.extent.width`, the same pitch `mirrorResource` now gives a PS4 plane. `sameStorage` and `sameSurface` do not compare `gcn`, and they don't need to: `gcnTileMode` is set only when `gcn` is true and `zFormat != 0`. - No author reply or description change touches my previous findings. ## What I ran Head `55cc111fe40dd0c28f0f35a73dc4250a065bc525`, `main` `1e658521a0a599872612bb91949311e2956b5283`, merged tree `6f5b068e70faff96afa457984dd88bdb521193f5`. Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19), in a clean worktree. ```sh git diff --check 1e658521a0a599872612bb91949311e2956b5283...55cc111fe40dd0c28f0f35a73dc4250a065bc525 python3 tools/check_conventions.py --base 1e658521a0a599872612bb91949311e2956b5283 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -j4 -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_depth_plane_buffer_memory|agc_driver_gcn_padded_depth_sampling|agc_driver_graphics)$' # negative control git show 1e658521a0:core/libs/prx/libSceAgcDriver/Graphics/src/{DepthSurface.cpp,State.cpp} > ... # headers kept ninja -C build agc_driver_gcn_depth_plane_buffer_memory_tests ctest --test-dir build --output-on-failure -R '^agc_driver_gcn_depth_plane_buffer_memory$' git show 6f5b068e70:<same files> > ...; ninja ...; ctest ...; git status --porcelain ``` | Check | Result | |---|---| | Merge into `main` | clean | | `git diff --check` | clean | | `check_conventions.py` | passed: 0 errors, 1 `debt-length` warning (see below) | | Build (script) | passed | | Selected tests (script) | 2164 ran, 0 new failures, 0 timeouts; the 7 known failures also fail on `main` | | Validation layer vs `main` (script) | 773 tests, layer loaded in 772 and missing in none, 0 tests with a new `VUID-` | | `agc_driver_gcn_depth_plane_buffer_memory` | passed, 0.78 s | | `agc_driver_depth_plane_buffer_memory` | passed | | `agc_driver_gcn_padded_depth_sampling` (`main`'s `gcn` user) | passed | | `agc_driver_graphics` | passed, 36.4 s | **Negative control.** I restored `DepthSurface.cpp` and `State.cpp` from `main`. `agc_driver_gcn_depth_plane_buffer_memory` then fails: `PS4 depth tile mode 19 (512x256): after a buffer read of the depth plane, texel 0,0 holds 0.000000 at its tiled offset, expected 0.250000`. With the merged files back, it passes and `git status --porcelain` is empty. ## Previous findings - **Non-blocking 1, the `LoadFromMemory` branch is not covered on this host:** Still open. The code and test are unchanged since `7253ae5a70`, so the observation from my last review still holds. It is a coverage gap, not a bug. The author reports that removing the branch fails the test on Windows, and I accept that as author-reported. - **Non-blocking 2 from the earlier review, PS4 planes are stored whole:** Still open, as acknowledged. It is documented in the debt entry, and the PR makes no speed claim. ## New findings ### Blocking None. ### Non-blocking 1. **The PS4 render-target debt entry is now over the checker's 1000-character limit.** `check_conventions.py` warns on `docs/dev/debt/libSceAgcDriver.md:119` (1092 characters). On `main` that entry is 999 characters, and the clause this PR adds ("and a 32-bit plane reaches guest memory in that tiling (depth planes in guest memory, below)") pushes it over. It is a warning, not an error. The PR has its own PS4 depth-plane entry, so the clause could be dropped or shortened to a cross-reference. ## Not verified - No run on a hardware GPU and no Windows run. The `LoadFromMemory` control is author-reported only. - Whether `DB_Z_INFO.TILE_MODE_INDEX`, rather than `DB_DEPTH_INFO`, is the authoritative depth tiling on Liverpool. The debt entry records this. - Risk (CUSA03312) or any other title. - `agc_driver_graphics` took 36.4 s here, with four tests running in parallel, which is over the 30 s budget. This PR adds only a few decodes to it, and it was already about 30–34 s in earlier `main`-based runs. I did not time it on `main` this round. <!-- anyps5-bots job=3508 head=55cc111fe40dd0c28f0f35a73dc4250a065bc525 -->
XairRrR commented 2026-11-03 19:20:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T19:20:10Z.

Review: CHANGES_REQUESTED


Re-checked — changes still requested

The new commit 224af33ff1 drops the clause from the PS4 render-target debt entry, and that clears my previous debt-length finding. But main has moved since 1e658521a0: #11557 also grew State by 8 bytes and set the Linux guard to 936. That is the same line and value as this PR's guard, so git merges it without a conflict, and the merged tree fails to compile.

What changed since my last review

  • One new commit, 224af33ff1 (docs only). The PS4 render-target entry in docs/dev/debt/libSceAgcDriver.md is now identical to main's. Commits 1–7 are unchanged (range-diff).
  • main moved from 1e658521a0 to 81b1a632dc. Among its changes, merge 0e7df59efb (#11557) adds staged, stagedMask and stagedFormat to ColorTarget in State.hpp. It also changes static_assert(sizeof(State) == 928, …) to == 936 in PipelineJournal.cpp.
  • The author's reply only covers the debt text.

What I ran

Head 224af33ff19cdce2640c990bccbd9221a1ae3e02, main 81b1a632dc5ba74afc4f8ab8f67b29501e4601b7, merged tree bca68f0dcab61d1e1c739cb7cbad4ff0778124a5. Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 81b1a632dc5ba74afc4f8ab8f67b29501e4601b7...224af33ff19cdce2640c990bccbd9221a1ae3e02
python3 tools/check_conventions.py --base 81b1a632dc5ba74afc4f8ab8f67b29501e4601b7
git diff 1e658521a0 81b1a632dc -- core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
# diagnosis only, reverted afterwards: guard set to 944 in the merged tree
sed -i 's/sizeof(State) == 936/sizeof(State) == 944/' core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
ninja -C build agc_driver_gcn_depth_plane_buffer_memory_tests
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -R '^agc_driver_gcn_depth_plane_buffer_memory$'
git show bca68f0dca:core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp
git status --porcelain   # empty
Check Result
Merge into main clean (no textual conflict)
git diff --check clean
check_conventions.py passed, no warnings (the earlier debt-length warning is gone)
Build of the merged tree (script) failed: PipelineJournal.cpp:44 static assertion, (944 == 936)
Tests (script) none ran, because the build failed
Validation layer vs main (script) skipped, because no test ran
With the guard set locally to 944: agc_driver_gcn_depth_plane_buffer_memory built and passed, 1.32 s
Build error (script)
../core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44:29: error: static assertion failed: State changed: update CanonicalPipelineState and the recipe codec
   44 | static_assert(sizeof(State) == 936, "State changed: update CanonicalPipelineState and the recipe codec");
      |               ~~~~~~~~~~~~~~^~~~~~
../core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44:29: note: the comparison reduces to '(944 == 936)'

I did not rerun the negative control. The PR's code and tests are unchanged since my last review, where restoring DepthSurface.cpp and State.cpp from main made agc_driver_gcn_depth_plane_buffer_memory fail at tile mode 19, texel 0,0. With the merged tree as it stands, nothing builds that could be controlled.

Previous findings

  • Non-blocking: the PS4 render-target debt entry was over the 1000-character limit. Resolved. 224af33ff1 restores main's text, and check_conventions.py now passes with no warning.
  • Non-blocking: the LoadFromMemory branch is not reached on this host. Still open. The code and test are unchanged. It is a coverage gap, and the author's Windows control is accepted as author-reported.
  • Non-blocking: PS4 planes are stored whole. Still open, as acknowledged. It is documented in the debt entry, and the PR makes no speed claim.

New findings

Blocking

  1. The merged tree does not compile on Linux x86_64 with libstdc++. Location: core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44.
    • Cause: main 81b1a632dc (#11557) and this branch each moved the guard from 928 to 936 for different fields. Git keeps the shared line silently. With both ColorTarget's staged fields and DepthTarget::gcnTileMode, sizeof(State) is 944. The same thing happened in the 7253ae5a70 merge.
    • Fix: merge current main and set the guard to 944.
    • Evidence: with that one-line change, libSceAgcDriver and agc_driver_gcn_depth_plane_buffer_memory_tests build here, and the test passes. gcnTileMode still does not reach CanonicalPipelineState or the recipe codec, so no codec change is needed for this PR's field.

Non-blocking

None.

Not verified

  • The script's selected-test run and validation-layer comparison did not happen because the merged build failed. I ran only agc_driver_gcn_depth_plane_buffer_memory, with the guard bumped locally. agc_driver_graphics and the other depth tests were not rerun this round.
  • No run on a hardware GPU or on Windows.
  • Whether DB_Z_INFO.TILE_MODE_INDEX, rather than DB_DEPTH_INFO, is the authoritative depth tiling on Liverpool. The debt entry records this.
  • Risk (CUSA03312) or any other title.

To get this to a good state

  1. Merge current main and change the sizeof(State) guard in PipelineJournal.cpp to 944 (this PR's 8 bytes on top of main's 936).
  2. Build libSceAgcDriver on Linux x86_64 with GCC/libstdc++, where the guard is active. Rerun agc_driver_gcn_depth_plane_buffer_memory and agc_driver_graphics.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5758188068 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9895#pullrequestreview-5758188068). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T19:20:10Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes still requested The new commit `224af33ff1` drops the clause from the PS4 render-target debt entry, and that clears my previous debt-length finding. But `main` has moved since `1e658521a0`: #11557 also grew `State` by 8 bytes and set the Linux guard to 936. That is the same line and value as this PR's guard, so git merges it without a conflict, and the merged tree fails to compile. ## What changed since my last review - One new commit, `224af33ff1` (docs only). The PS4 render-target entry in `docs/dev/debt/libSceAgcDriver.md` is now identical to `main`'s. Commits 1–7 are unchanged (range-diff). - `main` moved from `1e658521a0` to `81b1a632dc`. Among its changes, merge `0e7df59efb` (#11557) adds `staged`, `stagedMask` and `stagedFormat` to `ColorTarget` in `State.hpp`. It also changes `static_assert(sizeof(State) == 928, …)` to `== 936` in `PipelineJournal.cpp`. - The author's reply only covers the debt text. ## What I ran Head `224af33ff19cdce2640c990bccbd9221a1ae3e02`, `main` `81b1a632dc5ba74afc4f8ab8f67b29501e4601b7`, merged tree `bca68f0dcab61d1e1c739cb7cbad4ff0778124a5`. Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19). ```sh git diff --check 81b1a632dc5ba74afc4f8ab8f67b29501e4601b7...224af33ff19cdce2640c990bccbd9221a1ae3e02 python3 tools/check_conventions.py --base 81b1a632dc5ba74afc4f8ab8f67b29501e4601b7 git diff 1e658521a0 81b1a632dc -- core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp # diagnosis only, reverted afterwards: guard set to 944 in the merged tree sed -i 's/sizeof(State) == 936/sizeof(State) == 944/' core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp ninja -C build agc_driver_gcn_depth_plane_buffer_memory_tests ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build --output-on-failure -R '^agc_driver_gcn_depth_plane_buffer_memory$' git show bca68f0dca:core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp git status --porcelain # empty ``` | Check | Result | |---|---| | Merge into `main` | clean (no textual conflict) | | `git diff --check` | clean | | `check_conventions.py` | passed, no warnings (the earlier `debt-length` warning is gone) | | Build of the merged tree (script) | **failed**: `PipelineJournal.cpp:44` static assertion, `(944 == 936)` | | Tests (script) | none ran, because the build failed | | Validation layer vs `main` (script) | skipped, because no test ran | | With the guard set locally to 944: `agc_driver_gcn_depth_plane_buffer_memory` | built and passed, 1.32 s | <details><summary>Build error (script)</summary> ``` ../core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44:29: error: static assertion failed: State changed: update CanonicalPipelineState and the recipe codec 44 | static_assert(sizeof(State) == 936, "State changed: update CanonicalPipelineState and the recipe codec"); | ~~~~~~~~~~~~~~^~~~~~ ../core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44:29: note: the comparison reduces to '(944 == 936)' ``` </details> I did not rerun the negative control. The PR's code and tests are unchanged since my last review, where restoring `DepthSurface.cpp` and `State.cpp` from `main` made `agc_driver_gcn_depth_plane_buffer_memory` fail at tile mode 19, texel 0,0. With the merged tree as it stands, nothing builds that could be controlled. ## Previous findings - **Non-blocking: the PS4 render-target debt entry was over the 1000-character limit.** Resolved. `224af33ff1` restores `main`'s text, and `check_conventions.py` now passes with no warning. - **Non-blocking: the `LoadFromMemory` branch is not reached on this host.** Still open. The code and test are unchanged. It is a coverage gap, and the author's Windows control is accepted as author-reported. - **Non-blocking: PS4 planes are stored whole.** Still open, as acknowledged. It is documented in the debt entry, and the PR makes no speed claim. ## New findings ### Blocking 1. **The merged tree does not compile on Linux x86_64 with libstdc++.** Location: `core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44`. - Cause: `main` `81b1a632dc` (#11557) and this branch each moved the guard from 928 to 936 for different fields. Git keeps the shared line silently. With both `ColorTarget`'s staged fields and `DepthTarget::gcnTileMode`, `sizeof(State)` is 944. The same thing happened in the `7253ae5a70` merge. - Fix: merge current `main` and set the guard to 944. - Evidence: with that one-line change, `libSceAgcDriver` and `agc_driver_gcn_depth_plane_buffer_memory_tests` build here, and the test passes. `gcnTileMode` still does not reach `CanonicalPipelineState` or the recipe codec, so no codec change is needed for this PR's field. ### Non-blocking None. ## Not verified - The script's selected-test run and validation-layer comparison did not happen because the merged build failed. I ran only `agc_driver_gcn_depth_plane_buffer_memory`, with the guard bumped locally. `agc_driver_graphics` and the other depth tests were not rerun this round. - No run on a hardware GPU or on Windows. - Whether `DB_Z_INFO.TILE_MODE_INDEX`, rather than `DB_DEPTH_INFO`, is the authoritative depth tiling on Liverpool. The debt entry records this. - Risk (CUSA03312) or any other title. ## To get this to a good state 1. Merge current `main` and change the `sizeof(State)` guard in `PipelineJournal.cpp` to 944 (this PR's 8 bytes on top of `main`'s 936). 2. Build `libSceAgcDriver` on Linux x86_64 with GCC/libstdc++, where the guard is active. Rerun `agc_driver_gcn_depth_plane_buffer_memory` and `agc_driver_graphics`. <!-- anyps5-bots job=3548 head=224af33ff19cdce2640c990bccbd9221a1ae3e02 -->
XairRrR commented 2026-11-03 22:25:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T22:25:36Z.

Review: APPROVED


Re-checked — approved

The new merge commit 21e42481a3 merges main 04a9eb4fa2 and sets the sizeof(State) guard to 944, which fixes the build failure I reported last time. The merged tree builds, and the PR's tests pass.

What changed since my last review

  • One new commit: 21e42481a3, a merge of main 04a9eb4fa2 into 224af33ff1. Commits 1–8 are unchanged (range-diff).
  • The PR's diff against main still covers the same ten files. The only change in that diff is core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44, which now reads static_assert(sizeof(State) == 944, …).
  • No new author comments and no description edits that change any claim.

What I ran

Head 21e42481a3ff9e3e2f35b66b34fb85dd234c8bad, main 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24, merged tree dea4eb608093393d2a655098659772f2eb368b39. Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...21e42481a3ff9e3e2f35b66b34fb85dd234c8bad
python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24
git diff 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 dea4eb608093393d2a655098659772f2eb368b39 --stat
ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build -j4 --output-on-failure \
  -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_graphics|agc_driver_alpha_to_coverage_sample_mask_export|agc_driver_image_gather_volume|agc_driver_depth_plane_buffer_memory)$'
git status --porcelain   # empty
Check Result
Merge into main clean
git diff --check clean
check_conventions.py passed
Build of the merged tree (script) passed, including libs
Selected tests (script) 2186 ran, 2063 passed, 115 expected skips. No new failures. The 7 known failures also fail on main. 1 timeout (see below).
agc_driver_gcn_depth_plane_buffer_memory passed, 0.50 s
agc_driver_graphics (includes GcnDepthTileModeTests) passed, 34.9 s (see Not verified)
agc_driver_depth_plane_buffer_memory passed, 0.22 s
agc_driver_alpha_to_coverage_sample_mask_export (script timeout) passed, 23.5 s, rerun alongside four other tests
agc_driver_image_gather_volume passed, 9.6 s
Validation layer vs main (script) layer loaded in 783 of 784 tests, and was missing in none. New VUID- lines appear only in agc_driver_image_gather_volume, a test the baseline did not run (see below).
About the timeout and the new VUIDs
  • agc_driver_alpha_to_coverage_sample_mask_export timed out at 30.2 s in the script's run. When I reran it alongside four other tests, it passed in 23.5 s. The PR does not touch alpha-to-coverage or sample-mask code. I put this down to load on a shared machine, not to the PR.
  • VUID-VkSamplerCreateInfo-addressModeU-01079 and addressMode{U,V,W}-parameter are reported only for agc_driver_image_gather_volume, marked "test not run on main". main changed that test after the baseline 1e658521a0 (27d9dc2e4e, 5af9948a3e, e92ec413c9). This PR touches no sampler code, so I do not count these against it.

Previous findings

  • Blocking: the merged tree did not compile on Linux x86_64/libstdc++ (PipelineJournal.cpp:44, 944 == 936). Resolved. The guard is now 944, the script's build of the merged tree passed, and the PR's tests ran and pass. gcnTileMode still does not reach CanonicalPipelineState or the recipe codec, so no codec change is needed.
  • Non-blocking: the LoadFromMemory branch is not reached on this host. Still open. The code and test are unchanged since then. It is a coverage gap; the author's Windows run of that branch is accepted as author-reported.
  • Non-blocking: PS4 planes are stored and reloaded whole. Still open, as the author acknowledged. The debt entry documents it, and the PR makes no speed claim.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Negative control not rerun. The PR's code and tests are unchanged since my earlier control: restoring DepthSurface.cpp and State.cpp from main made agc_driver_gcn_depth_plane_buffer_memory fail at tile mode 19, texel 0,0. This round's merge changed only the guard value.
  • agc_driver_graphics runtime. It took 34.9 s here, run in parallel with four other tests. It was already near or over 30 s on main in the contributors' CI runs, and this PR adds only a small decode test to it. I did not time it on main on this machine.
  • Hardware. No run on a hardware GPU or on Windows.
  • Source of the depth tiling. Whether DB_Z_INFO.TILE_MODE_INDEX, rather than DB_DEPTH_INFO, is the authoritative depth tiling on Liverpool is unverified. The debt entry records this.
  • Titles. Risk (CUSA03312) and other titles were not run.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5760358246 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9895#pullrequestreview-5760358246). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T22:25:36Z. **Review:** APPROVED --- # Re-checked — approved The new merge commit `21e42481a3` merges `main` `04a9eb4fa2` and sets the `sizeof(State)` guard to 944, which fixes the build failure I reported last time. The merged tree builds, and the PR's tests pass. ## What changed since my last review - One new commit: `21e42481a3`, a merge of `main` `04a9eb4fa2` into `224af33ff1`. Commits 1–8 are unchanged (range-diff). - The PR's diff against `main` still covers the same ten files. The only change in that diff is `core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44`, which now reads `static_assert(sizeof(State) == 944, …)`. - No new author comments and no description edits that change any claim. ## What I ran Head `21e42481a3ff9e3e2f35b66b34fb85dd234c8bad`, `main` `04a9eb4fa2877eb6e40bf2c83adf972e40d89b24`, merged tree `dea4eb608093393d2a655098659772f2eb368b39`. Debian 13 VM, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19). ```sh git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...21e42481a3ff9e3e2f35b66b34fb85dd234c8bad python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 git diff 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 dea4eb608093393d2a655098659772f2eb368b39 --stat ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build -j4 --output-on-failure \ -R '^(agc_driver_gcn_depth_plane_buffer_memory|agc_driver_graphics|agc_driver_alpha_to_coverage_sample_mask_export|agc_driver_image_gather_volume|agc_driver_depth_plane_buffer_memory)$' git status --porcelain # empty ``` | Check | Result | |---|---| | Merge into `main` | clean | | `git diff --check` | clean | | `check_conventions.py` | passed | | Build of the merged tree (script) | passed, including `libs` | | Selected tests (script) | 2186 ran, 2063 passed, 115 expected skips. No new failures. The 7 known failures also fail on `main`. 1 timeout (see below). | | `agc_driver_gcn_depth_plane_buffer_memory` | passed, 0.50 s | | `agc_driver_graphics` (includes `GcnDepthTileModeTests`) | passed, 34.9 s (see Not verified) | | `agc_driver_depth_plane_buffer_memory` | passed, 0.22 s | | `agc_driver_alpha_to_coverage_sample_mask_export` (script timeout) | passed, 23.5 s, rerun alongside four other tests | | `agc_driver_image_gather_volume` | passed, 9.6 s | | Validation layer vs `main` (script) | layer loaded in 783 of 784 tests, and was missing in none. New `VUID-` lines appear only in `agc_driver_image_gather_volume`, a test the baseline did not run (see below). | <details><summary>About the timeout and the new VUIDs</summary> - `agc_driver_alpha_to_coverage_sample_mask_export` timed out at 30.2 s in the script's run. When I reran it alongside four other tests, it passed in 23.5 s. The PR does not touch alpha-to-coverage or sample-mask code. I put this down to load on a shared machine, not to the PR. - `VUID-VkSamplerCreateInfo-addressModeU-01079` and `addressMode{U,V,W}-parameter` are reported only for `agc_driver_image_gather_volume`, marked "test not run on main". `main` changed that test after the baseline `1e658521a0` (`27d9dc2e4e`, `5af9948a3e`, `e92ec413c9`). This PR touches no sampler code, so I do not count these against it. </details> ## Previous findings - **Blocking: the merged tree did not compile on Linux x86_64/libstdc++ (`PipelineJournal.cpp:44`, `944 == 936`).** Resolved. The guard is now 944, the script's build of the merged tree passed, and the PR's tests ran and pass. `gcnTileMode` still does not reach `CanonicalPipelineState` or the recipe codec, so no codec change is needed. - **Non-blocking: the `LoadFromMemory` branch is not reached on this host.** Still open. The code and test are unchanged since then. It is a coverage gap; the author's Windows run of that branch is accepted as author-reported. - **Non-blocking: PS4 planes are stored and reloaded whole.** Still open, as the author acknowledged. The debt entry documents it, and the PR makes no speed claim. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - **Negative control not rerun.** The PR's code and tests are unchanged since my earlier control: restoring `DepthSurface.cpp` and `State.cpp` from `main` made `agc_driver_gcn_depth_plane_buffer_memory` fail at tile mode 19, texel 0,0. This round's merge changed only the guard value. - **`agc_driver_graphics` runtime.** It took 34.9 s here, run in parallel with four other tests. It was already near or over 30 s on `main` in the contributors' CI runs, and this PR adds only a small decode test to it. I did not time it on `main` on this machine. - **Hardware.** No run on a hardware GPU or on Windows. - **Source of the depth tiling.** Whether `DB_Z_INFO.TILE_MODE_INDEX`, rather than `DB_DEPTH_INFO`, is the authoritative depth tiling on Liverpool is unverified. The debt entry records this. - **Titles.** Risk (CUSA03312) and other titles were not run. <!-- anyps5-bots job=3649 head=21e42481a3ff9e3e2f35b66b34fb85dd234c8bad -->
MarcZX10 commented 2026-11-23 05:25:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T05:25:45Z.

Review: COMMENTED


Reviewed — no blocking findings

The inspected code adds PS4 depth-plane mirroring and retile handling; this review is incomplete because I did not read every changed file or run checks on this head.

What I ran

Head: d70e6e1bc1caaee46f386a47afb104518e0be9f3. I used repo_read.py reader tools to inspect the prepared description, commits, manifest and diff, plus targeted source ranges. I ran no build or tests; the reported test results are from the author.

Results

Check Result Note
Diff and targeted source review passed Core decode and mirror paths inspected
Build and tests on this head not run Author-reported results only
Full changed-file review not run tests/Graphics.cpp was excluded from the review folder

Findings

Blocking

None in the code inspected.

Non-blocking

The author reports GPU and Linux test results on earlier heads, but the exact reviewed head was not built or tested during this review.

Not verified

I read the prepared description.md, commits.md, manifest.json, and diff.patch. I inspected targeted ranges in GuestTextureResource.cpp, State.cpp, State.hpp, DepthSurface.cpp, and PipelineJournal.cpp; the diff includes changes in GuestTextureResource.hpp, DepthFastClearHarness.hpp, GcnDepthPlaneBufferMemory.cpp, and libSceAgcDriver.md. I did not read the full changed files, and tests/Graphics.cpp was excluded as too large for the review folder. Console behavior and the author-reported tests were not independently verified.

To get this to a good state

Nothing is required. Optional: run the relevant checks on this exact head and complete review of the excluded test file before relying on a formal merge decision.

Sources

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6016923539 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9895#pullrequestreview-6016923539). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T05:25:45Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The inspected code adds PS4 depth-plane mirroring and retile handling; this review is incomplete because I did not read every changed file or run checks on this head. ## What I ran Head: `d70e6e1bc1caaee46f386a47afb104518e0be9f3`. I used `repo_read.py` reader tools to inspect the prepared description, commits, manifest and diff, plus targeted source ranges. I ran no build or tests; the reported test results are from the author. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Core decode and mirror paths inspected | | Build and tests on this head | not run | Author-reported results only | | Full changed-file review | not run | `tests/Graphics.cpp` was excluded from the review folder | ## Findings ### Blocking None in the code inspected. ### Non-blocking The author reports GPU and Linux test results on earlier heads, but the exact reviewed head was not built or tested during this review. ## Not verified I read the prepared `description.md`, `commits.md`, `manifest.json`, and `diff.patch`. I inspected targeted ranges in `GuestTextureResource.cpp`, `State.cpp`, `State.hpp`, `DepthSurface.cpp`, and `PipelineJournal.cpp`; the diff includes changes in `GuestTextureResource.hpp`, `DepthFastClearHarness.hpp`, `GcnDepthPlaneBufferMemory.cpp`, and `libSceAgcDriver.md`. I did not read the full changed files, and `tests/Graphics.cpp` was excluded as too large for the review folder. Console behavior and the author-reported tests were not independently verified. ## To get this to a good state Nothing is required. Optional: run the relevant checks on this exact head and complete review of the excluded test file before relying on a formal merge decision. ## Sources - [Depth surface changes at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d70e6e1bc1caaee46f386a47afb104518e0be9f3/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp) - [Depth plane decode at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/d70e6e1bc1caaee46f386a47afb104518e0be9f3/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/9895:upstream-pr/9895'
git switch 'upstream-pr/9895'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/9895'
git switch 'upstream-pr/9895'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/9895'
git switch 'upstream-pr/9895'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/9895'
git switch 'main'
git merge --squash 'upstream-pr/9895'
git switch 'main'
git merge --ff-only 'upstream-pr/9895'
git switch 'main'
git merge 'upstream-pr/9895'
git push origin 'main'
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!9895
No description provided.