feat(agc): lay out PS4 multisampled color textures in 2D tile modes #23672

Merged
adam25136 merged 1 commit from upstream-pr/23672 into main 2026-11-27 04:08:46 +00:00
adam25136 commented 2026-11-19 12:33:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adam25136 on 2026-11-19T12:33:40Z.


What

#22629 lays out a PS4 (GCN) 2D multisampled texture in a depth tile mode and still refuses the color tile modes (PS4 multisampled textures outside the depth tile modes are not implemented). This lays out a 2D multisampled T# in the two 2D color tile modes, display and thin (tiling indices 10 and 14, the 2D color modes DecodeGcnColorBuffer renders). It is the base PS4 layout: main reads PS4 Pro (Neo mode) alternate tiling for no PS4 surface, and this PR does not change that (see below). It builds on #22629, which has merged.

  • Sample order: in a color surface, addrlib stores the 64 elements of sample 0 of a micro tile, then the 64 of sample 1, and so on (sampleOffset = sample * (microTileBits / numSamples) in ComputeSurfaceAddrFromCoordMacroTiled, r800/egbaddrlib.cpp); a depth surface keeps the samples of an element together, as #22629 has it. In GcnTiling's address equation the sample bits now follow the six pixel bits in a color mode and stay in front of them in a depth mode. (addrlib as read in OpenBSD's import of Mesa 25.0.7, xenocara 483f148565a7; GitLab, which #22629 links for Mesa 25.2.8, refuses automated reads.)
  • Tile split: for a color mode, addrlib's tile split is the mode's sample split times the micro tile of one sample, at least 256 bytes and at most the DRAM row, and the macro tile mode comes from the smaller of that split and the micro tile with all its samples (HwlComputeMacroModeIndex in r800/ciaddrlib.cpp: colorTileSplit = Max(256u, sampleSplit * tileBytes1x), tileSplitC = Min(m_rowSize, tileSplit), tileBytes = Min(tileSplitC, numSamples * tileBytes1x)). addrlib reads the sample split from GB_TILE_MODE and gives no PS4 value; the sample split of 2 for these modes and the 1 KiB row are shadPS4's (GetSampleSplit and DRAM_ROW_SIZE in src/video_core/amdgpu/tiling.cpp at 8e23388af83f, whose CalculateTileSplit and CalculateMacrotileMode compute the same formula), not a console measurement. GcnTiling on main already uses them for single-sample color modes; #22629 made its micro tile include the samples, and this commit takes the micro tile of one sample for the split again, the same number at one sample, so no single-sample layout changes. A micro tile larger than the split is cut into slices a whole surface apart, as for depth: 4 samples of 32 bits (1 KiB) split at 512 bytes into two slices, 8 samples of 8 bits (512 bytes) at 256 bytes into two.
  • Size: as for depth, one level of pitch x padded height x element bytes x samples, with a row pitch that holds every sample of a row. A 2-sample 32-bit thin 2D T# of pitch 1664 and height 1800, the one inFAMOUS samples (see Tested), has a 512-byte micro tile, which the 512-byte split leaves whole, in 128x64 macro tiles: 1664 x 1856 x 4 x 2 = 0x1790000 bytes.
  • Alternate tiling, not modeled here or on main: inFAMOUS Second Son's targets are alternate-tiled. Every CB_COLOR_INFO in its trace that enables a target (32 writes; the other 24 are 0, a disabled target) sets bit 31 (alt_tile_mode in shadPS4's regs_color.h at ee0364a9c17a), and its DB_DEPTH_INFO (0x00131241 in all 26 writes, fields as in GPCS4's GnmRegInfo.h) gives pipe config 18 (P16), 8 banks, bank height 4 and aspect 2: shadPS4's alternate values for the macro tile modes of its two depth targets, whose base values have 16 banks. With shadPS4's alternate tables (GetAltPipeConfig, GetAltBankHeight, GetAltNumBanks and GetAltMacrotileAspect at 8e23388af83f: 16 pipes, and for the 512-byte tile's macro tile mode 3 bank height 2, 8 banks and aspect 1), the T# above has 128x128 macro tiles and pads to 1920 rows, the 1664 x 1920 the title programs in CB_COLOR7_SLICE. main reads neither bit (GcnImageWords drops T# word 6, and DecodeGcnColorBuffer does not read CB_COLOR_INFO bit 31), so every alternate-tiled PS4 surface, single-sample or not, gets the base layout, and with this PR so does inFAMOUS's color texture: its addresses here are not the title's. In addrlib's alternate tiling (AltTilingEnabled() in CiLib::ReadGbTileMode and CiLib::ReadGbMacroTileCfg) only the pipe config, bank height, bank count and macro tile aspect change, so this sample order and split carry over; shadPS4 also takes a bank swizzle from the T# base in that mode (GetBankSwizzle in resource.h). Modeling it is follow-up work, and a fragment entry records the gap.
  • Still throwing: multisampled color textures in a PRT, linear, 1D or thick tile mode, and, as before, block-compressed ones, ones of other than 2, 4 or 8 samples, and ones with mips or array layers. Only the size and the address equation are new. A PS4 T# has no FMASK pointer: this lays out each sample as the CB stores it without FMASK compression (inFAMOUS's CB_COLOR7 has COMPRESSION clear), and does not read FMASK. A PS4 multisampled color texture that no draw rendered to is still refused, by createFilled (MultisampleTarget.cpp), which has no PS4 tile modes; inFAMOUS stops there next.
  • Technical debt: a fragment adds an Unknown function info entry, PS4 (GCN) multisampled color textures, and a Functional entry, PS4 Pro alternate tiling. It also edits #22629's fragment so that it no longer lists color tile modes among what still throws: tools/debt_fold.py can only change an entry already in the debt file, so a direct edit is the only way while #22629's fragment is not folded yet; once it is, I will turn it into a ## change in this PR's fragment.

Tested

Windows 10 Pro 22H2 (19045), NVIDIA GeForce RTX 5080 (driver 621.14), WinLibs GCC 15.2.0 (r7), CMake 4.3.1, Release. Everything but the inFAMOUS starts, whose stack is described below, ran on this change at 6f33d481e9 on main 4fa81a86fb. The head is the same change rebased onto main 20c535f30e after #22629 merged, and differs from the tested commit only in two lines of the debt fragment; on it, agc_driver_graphics (which holds the tiling tests) passes.

  • RunTextureTilingTests (ctest agc_driver_graphics), gcnMultisampleTilingTests extended:
    • both 2D color tile modes at 1, 2, 4, 8 and 16 bytes per element and 2, 4 and 8 samples: on a surface of 4 x 4 macro tiles, each sample of each element is placed by the equation where the test's per-element implementation of the same addrlib formulas (referenceGcnAddress, now with the color sample order and the color split from one sample's micro tile) places it, and no two samples share an address. That is 30 layouts, next to #22629's 80 depth layouts, which still pass;
    • in a 2-sample 32-bit color tile the sample bit is address bit 15 (sample 1 starts 256 bytes into the micro tile, above the 3 pipe and 4 bank bits), and in a depth tile address bit 2;
    • a 4-sample 32-bit color tile splits into two slices of 128x64 macro tiles, and an 8-sample 8-bit one into two;
    • a 2-sample 32-bit color T# of pitch 1664 and height 1800 is 1664 x 1856 x 4 x 2 bytes, not split, with a row pitch that holds both samples;
    • a multisampled T# in a 1D, linear or PRT color tile mode, and GcnTiling with samples in a 1D or PRT color mode, still throw.
      It passes, and each of 11 deliberate breaks fails it: color samples in the depth order, depth samples in the color order, the color split taken from the micro tile with its samples (as #22629 had it), a sample split of 1 and one of 4 in the code only, a 2 KiB row, the color sample bits one bit lower, the color refusal kept in describeGcnMultisampled or in GcnTiling, 1D modes accepted, and PRT color modes accepted. It also passes in a build configured with -DANYPS5_ENABLE_SPIRV_TOOLS=ON.
  • The 3,267 tests tools/select_tests.py selects for the 5 changed files (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1), on main and on this branch: the same 5 fail on both (agc_driver_bda_device, agc_driver_msaa_dcc_unwatch with DCC unwatch did not preserve unchanged data or refused a real write incorrectly, agc_driver_stencil_plane_memory, agc_driver_store_over_untracked and agc_storage_write_back_host_retile), and the same 19 are skipped on both.
  • With VK_LAYER_KHRONOS_validation 1.4.367 (VK_ADD_LAYER_PATH=<the layer's folder> VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer VK_LOADER_LAYERS_DISABLE=~implicit~ ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1), the 56 tests matching agc_driver_graphics$|gcn|tiling|detile|multisample|msaa, ctest -V, on main and on this branch: each log has 55 Insert instance layer "VK_LAYER_KHRONOS_validation" lines, no "was not found" line and no VUID- message; on both, 52 pass, 3 are skipped and agc_driver_msaa_dcc_unwatch fails as above.
  • inFAMOUS Second Son (CUSA00223 01.07, my own dump), unwrapped by main's tools/unwrap_self.py and converted with --windows --registry --trace-imports, on the local stack it needs to reach this shader: main 5d5ae377c0 (which has #22517) with #17711, #18184, #21961 and #22629 merged, plus local changes, none of them part of this PR: an answer for libSceDiscMap's fJgP+wqifno (fpPS4's; #23349 has since merged a different one), the SDWA decode of #23128, the multisample depth import layers that come after #22629, a bypass of the multisample depth write-back, and a change to v_div_scale's destination that the Sea Islands ISA does not support. One traced start each:
    • without this change (stack 9dcdb4232c): stops 29.4 s in, in compute shader 0x2f2fb2100, at PS4 multisampled textures outside the depth tile modes are not implemented (a local print gave the T#: thin 2D, 4-byte format, 1600x1800, pitch 1664, 2 samples);
    • with it (bff21104d5: the same stack plus this PR's commit and a local print): gets past that, and stops 32.9 s in, in the same shader, at sampling the 1600x1800 multisampled texture 0x3075c0000 of 2 samples, which no draw rendered to and whose tile mode 18 has no modeled multisampled color footprint, is not implemented (createFilled in MultisampleTarget.cpp, which has no PS4 tile modes; tile mode 18 is the driver's thin 2D, tiling index 14). A local print gave the T#'s guest size as 0x1790000 bytes, as above.
    • The trace programs CB_COLOR7 with the same base (0x3075c0000), pitch 1664, 2 samples and 2 fragments, tiling index 14, COMPRESSION clear and bit 31 (alternate tiling) set, and a CB_COLOR7_SLICE of 1664 x 1920 elements: what the alternate layout pads 1800 rows to, not this PR's 1856 (see What). So this run shows that the title gets past the refusal, not that its texture is now laid out right, and Unblocks is none.
  • python tools/check_conventions.py --base origin/main with this title and description: all checks passed.
  • python tools/pr_overlap.py --branch: #22629 has merged. Open #20786 (Gag21, PS4 2D thick tile mode 20) changes the same lines of GcnTiling and TextureTiling.hpp, as it does #22629's; the two compose, and I will rebase if it lands first. #6280 (draft) and #7085 (Amoenus) change TextureTiling.hpp and TextureTiling.cpp too, next to lines this changes, and conflict with main, so pr_overlap could not compare them.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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 (#22629 has merged)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5080, driver 621.14, Windows 10 22H2
  • AI-assisted: yes

AI-assisted: Claude Code wrote the change and its tests from addrlib's formulas, ran the tests and the inFAMOUS starts, and drafted this description; separate review agents checked it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5394971014 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23672). Originally posted by [adam25136](https://github.com/adam25136) on 2026-11-19T12:33:40Z. --- ### What #22629 lays out a PS4 (GCN) 2D multisampled texture in a depth tile mode and still refuses the color tile modes (`PS4 multisampled textures outside the depth tile modes are not implemented`). This lays out a 2D multisampled T# in the two 2D color tile modes, display and thin (tiling indices 10 and 14, the 2D color modes `DecodeGcnColorBuffer` renders). It is the base PS4 layout: `main` reads PS4 Pro (Neo mode) alternate tiling for no PS4 surface, and this PR does not change that (see below). It builds on #22629, which has merged. - **Sample order:** in a color surface, addrlib stores the 64 elements of sample 0 of a micro tile, then the 64 of sample 1, and so on (`sampleOffset = sample * (microTileBits / numSamples)` in `ComputeSurfaceAddrFromCoordMacroTiled`, `r800/egbaddrlib.cpp`); a depth surface keeps the samples of an element together, as #22629 has it. In `GcnTiling`'s address equation the sample bits now follow the six pixel bits in a color mode and stay in front of them in a depth mode. (addrlib as read in OpenBSD's import of Mesa 25.0.7, xenocara `483f148565a7`; GitLab, which #22629 links for Mesa 25.2.8, refuses automated reads.) - **Tile split:** for a color mode, addrlib's tile split is the mode's sample split times the micro tile of one sample, at least 256 bytes and at most the DRAM row, and the macro tile mode comes from the smaller of that split and the micro tile with all its samples (`HwlComputeMacroModeIndex` in `r800/ciaddrlib.cpp`: `colorTileSplit = Max(256u, sampleSplit * tileBytes1x)`, `tileSplitC = Min(m_rowSize, tileSplit)`, `tileBytes = Min(tileSplitC, numSamples * tileBytes1x)`). addrlib reads the sample split from GB_TILE_MODE and gives no PS4 value; the sample split of 2 for these modes and the 1 KiB row are shadPS4's (`GetSampleSplit` and `DRAM_ROW_SIZE` in `src/video_core/amdgpu/tiling.cpp` at `8e23388af83f`, whose `CalculateTileSplit` and `CalculateMacrotileMode` compute the same formula), not a console measurement. `GcnTiling` on `main` already uses them for single-sample color modes; #22629 made its micro tile include the samples, and this commit takes the micro tile of one sample for the split again, the same number at one sample, so no single-sample layout changes. A micro tile larger than the split is cut into slices a whole surface apart, as for depth: 4 samples of 32 bits (1 KiB) split at 512 bytes into two slices, 8 samples of 8 bits (512 bytes) at 256 bytes into two. - **Size:** as for depth, one level of pitch x padded height x element bytes x samples, with a row pitch that holds every sample of a row. A 2-sample 32-bit thin 2D T# of pitch 1664 and height 1800, the one inFAMOUS samples (see Tested), has a 512-byte micro tile, which the 512-byte split leaves whole, in 128x64 macro tiles: 1664 x 1856 x 4 x 2 = 0x1790000 bytes. - **Alternate tiling, not modeled here or on `main`:** inFAMOUS Second Son's targets are alternate-tiled. Every CB_COLOR_INFO in its trace that enables a target (32 writes; the other 24 are 0, a disabled target) sets bit 31 (`alt_tile_mode` in shadPS4's `regs_color.h` at `ee0364a9c17a`), and its DB_DEPTH_INFO (0x00131241 in all 26 writes, fields as in GPCS4's `GnmRegInfo.h`) gives pipe config 18 (P16), 8 banks, bank height 4 and aspect 2: shadPS4's alternate values for the macro tile modes of its two depth targets, whose base values have 16 banks. With shadPS4's alternate tables (`GetAltPipeConfig`, `GetAltBankHeight`, `GetAltNumBanks` and `GetAltMacrotileAspect` at `8e23388af83f`: 16 pipes, and for the 512-byte tile's macro tile mode 3 bank height 2, 8 banks and aspect 1), the T# above has 128x128 macro tiles and pads to 1920 rows, the 1664 x 1920 the title programs in CB_COLOR7_SLICE. `main` reads neither bit (`GcnImageWords` drops T# word 6, and `DecodeGcnColorBuffer` does not read CB_COLOR_INFO bit 31), so every alternate-tiled PS4 surface, single-sample or not, gets the base layout, and with this PR so does inFAMOUS's color texture: its addresses here are not the title's. In addrlib's alternate tiling (`AltTilingEnabled()` in `CiLib::ReadGbTileMode` and `CiLib::ReadGbMacroTileCfg`) only the pipe config, bank height, bank count and macro tile aspect change, so this sample order and split carry over; shadPS4 also takes a bank swizzle from the T# base in that mode (`GetBankSwizzle` in `resource.h`). Modeling it is follow-up work, and a fragment entry records the gap. - **Still throwing:** multisampled color textures in a PRT, linear, 1D or thick tile mode, and, as before, block-compressed ones, ones of other than 2, 4 or 8 samples, and ones with mips or array layers. Only the size and the address equation are new. A PS4 T# has no FMASK pointer: this lays out each sample as the CB stores it without FMASK compression (inFAMOUS's CB_COLOR7 has COMPRESSION clear), and does not read FMASK. A PS4 multisampled color texture that no draw rendered to is still refused, by `createFilled` (`MultisampleTarget.cpp`), which has no PS4 tile modes; inFAMOUS stops there next. - **Technical debt:** a fragment adds an Unknown function info entry, `PS4 (GCN) multisampled color textures`, and a Functional entry, `PS4 Pro alternate tiling`. It also edits #22629's fragment so that it no longer lists color tile modes among what still throws: `tools/debt_fold.py` can only `change` an entry already in the debt file, so a direct edit is the only way while #22629's fragment is not folded yet; once it is, I will turn it into a `## change` in this PR's fragment. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 10 Pro 22H2 (19045), NVIDIA GeForce RTX 5080 (driver 621.14), WinLibs GCC 15.2.0 (r7), CMake 4.3.1, Release. Everything but the inFAMOUS starts, whose stack is described below, ran on this change at `6f33d481e9` on `main` `4fa81a86fb`. The head is the same change rebased onto `main` `20c535f30e` after #22629 merged, and differs from the tested commit only in two lines of the debt fragment; on it, `agc_driver_graphics` (which holds the tiling tests) passes. - **`RunTextureTilingTests` (ctest `agc_driver_graphics`)**, `gcnMultisampleTilingTests` extended: - both 2D color tile modes at 1, 2, 4, 8 and 16 bytes per element and 2, 4 and 8 samples: on a surface of 4 x 4 macro tiles, each sample of each element is placed by the equation where the test's per-element implementation of the same addrlib formulas (`referenceGcnAddress`, now with the color sample order and the color split from one sample's micro tile) places it, and no two samples share an address. That is 30 layouts, next to #22629's 80 depth layouts, which still pass; - in a 2-sample 32-bit color tile the sample bit is address bit 15 (sample 1 starts 256 bytes into the micro tile, above the 3 pipe and 4 bank bits), and in a depth tile address bit 2; - a 4-sample 32-bit color tile splits into two slices of 128x64 macro tiles, and an 8-sample 8-bit one into two; - a 2-sample 32-bit color T# of pitch 1664 and height 1800 is 1664 x 1856 x 4 x 2 bytes, not split, with a row pitch that holds both samples; - a multisampled T# in a 1D, linear or PRT color tile mode, and `GcnTiling` with samples in a 1D or PRT color mode, still throw. It passes, and each of 11 deliberate breaks fails it: color samples in the depth order, depth samples in the color order, the color split taken from the micro tile with its samples (as #22629 had it), a sample split of 1 and one of 4 in the code only, a 2 KiB row, the color sample bits one bit lower, the color refusal kept in `describeGcnMultisampled` or in `GcnTiling`, 1D modes accepted, and PRT color modes accepted. It also passes in a build configured with `-DANYPS5_ENABLE_SPIRV_TOOLS=ON`. - **The 3,267 tests `tools/select_tests.py` selects for the 5 changed files** (`ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`), on `main` and on this branch: the same 5 fail on both (`agc_driver_bda_device`, `agc_driver_msaa_dcc_unwatch` with `DCC unwatch did not preserve unchanged data or refused a real write incorrectly`, `agc_driver_stencil_plane_memory`, `agc_driver_store_over_untracked` and `agc_storage_write_back_host_retile`), and the same 19 are skipped on both. - **With `VK_LAYER_KHRONOS_validation`** 1.4.367 (`VK_ADD_LAYER_PATH=<the layer's folder> VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer VK_LOADER_LAYERS_DISABLE=~implicit~ ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`), the 56 tests matching `agc_driver_graphics$|gcn|tiling|detile|multisample|msaa`, `ctest -V`, on `main` and on this branch: each log has 55 `Insert instance layer "VK_LAYER_KHRONOS_validation"` lines, no "was not found" line and no `VUID-` message; on both, 52 pass, 3 are skipped and `agc_driver_msaa_dcc_unwatch` fails as above. - **inFAMOUS Second Son** (CUSA00223 01.07, my own dump), unwrapped by `main`'s `tools/unwrap_self.py` and converted with `--windows --registry --trace-imports`, on the local stack it needs to reach this shader: `main` `5d5ae377c0` (which has #22517) with #17711, #18184, #21961 and #22629 merged, plus local changes, none of them part of this PR: an answer for libSceDiscMap's `fJgP+wqifno` (fpPS4's; #23349 has since merged a different one), the SDWA decode of #23128, the multisample depth import layers that come after #22629, a bypass of the multisample depth write-back, and a change to `v_div_scale`'s destination that the Sea Islands ISA does not support. One traced start each: - without this change (stack `9dcdb4232c`): stops 29.4 s in, in compute shader `0x2f2fb2100`, at `PS4 multisampled textures outside the depth tile modes are not implemented` (a local print gave the T#: thin 2D, 4-byte format, 1600x1800, pitch 1664, 2 samples); - with it (`bff21104d5`: the same stack plus this PR's commit and a local print): gets past that, and stops 32.9 s in, in the same shader, at `sampling the 1600x1800 multisampled texture 0x3075c0000 of 2 samples, which no draw rendered to and whose tile mode 18 has no modeled multisampled color footprint, is not implemented` (`createFilled` in `MultisampleTarget.cpp`, which has no PS4 tile modes; tile mode 18 is the driver's thin 2D, tiling index 14). A local print gave the T#'s guest size as 0x1790000 bytes, as above. - The trace programs `CB_COLOR7` with the same base (0x3075c0000), pitch 1664, 2 samples and 2 fragments, tiling index 14, `COMPRESSION` clear and bit 31 (alternate tiling) set, and a `CB_COLOR7_SLICE` of 1664 x 1920 elements: what the alternate layout pads 1800 rows to, not this PR's 1856 (see What). So this run shows that the title gets past the refusal, not that its texture is now laid out right, and `Unblocks` is none. - **`python tools/check_conventions.py --base origin/main`** with this title and description: all checks passed. - **`python tools/pr_overlap.py --branch`:** #22629 has merged. Open #20786 (Gag21, PS4 2D thick tile mode 20) changes the same lines of `GcnTiling` and `TextureTiling.hpp`, as it does #22629's; the two compose, and I will rebase if it lands first. #6280 (draft) and #7085 (Amoenus) change `TextureTiling.hpp` and `TextureTiling.cpp` too, next to lines this changes, and conflict with `main`, so `pr_overlap` could not compare them. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.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 (#22629 has merged) <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: NVIDIA GeForce RTX 5080, driver 621.14, Windows 10 22H2 <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no --> AI-assisted: Claude Code wrote the change and its tests from addrlib's formulas, ran the tests and the inFAMOUS starts, and drafted this description; separate review agents checked it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-19 17:37:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T17:37:22Z.

Review: APPROVED


Reviewed — looks good

The review covers all five changed files at head 80ca72d2a56ef4fad4c8edfb5769a59b969892c3; no verified defect blocks merging.

What I ran

No build or tests were run during this review. The author reports tests and checks in the PR description; these were not rerun here.

Results

Check Result Note
Source and diff review passed All five changed files read
Build and tests not run Author-reported results only

Findings

Blocking

None.

Non-blocking

  • The description identifies PS4 Pro alternate tiling as unmodeled and says affected surfaces use the base layout. The tested inFAMOUS trace stops later in createFilled; it confirms the new refusal is passed, but does not validate the texture’s addresses. Console behavior and alternate-tiled address correctness remain unverified.

Not verified

  • Build, tests, validation-layer checks, and console behavior were not independently run. The reported test results are from the author.
  • No excluded changed files were listed. Read: TextureTiling.hpp, TextureTiling.cpp, tests/TextureTiling.cpp, feat-gcn-msaa-color-layout.md, and fix-gcn-msaa-depth-layout.md.

To get this to a good state

Nothing is required. Optional: model PS4 Pro alternate tiling and verify multisampled color addresses against a console or a trusted reference.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5980178236 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23672#pullrequestreview-5980178236). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T17:37:22Z. **Review:** APPROVED --- # Reviewed — looks good The review covers all five changed files at head `80ca72d2a56ef4fad4c8edfb5769a59b969892c3`; no verified defect blocks merging. ## What I ran No build or tests were run during this review. The author reports tests and checks in the PR description; these were not rerun here. ## Results | Check | Result | Note | |---|---|---| | Source and diff review | passed | All five changed files read | | Build and tests | not run | Author-reported results only | ## Findings ### Blocking None. ### Non-blocking - The description identifies PS4 Pro alternate tiling as unmodeled and says affected surfaces use the base layout. The tested inFAMOUS trace stops later in `createFilled`; it confirms the new refusal is passed, but does not validate the texture’s addresses. Console behavior and alternate-tiled address correctness remain unverified. ## Not verified - Build, tests, validation-layer checks, and console behavior were not independently run. The reported test results are from the author. - No excluded changed files were listed. Read: `TextureTiling.hpp`, `TextureTiling.cpp`, `tests/TextureTiling.cpp`, `feat-gcn-msaa-color-layout.md`, and `fix-gcn-msaa-depth-layout.md`. ## To get this to a good state Nothing is required. Optional: model PS4 Pro alternate tiling and verify multisampled color addresses against a console or a trusted reference.
MarcZX10 commented 2026-11-19 20:23:56 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Reviewed — comments

The color layout change is internally consistent with the stated addrlib formula, but review evidence is incomplete because the core color address and detile consumers were not read.

What I ran

Reviewed head 3656bbf265db9c2d77598a138ca5a5b93e473fc0 using the prepared diff and repo_read.py source reads. No tests were run.

Results

Check Result Note
Diff and changed code passed Reviewed layout and test changes
Tests not run Author reports test results in the PR description

Findings

Blocking

None identified in the code read.

Non-blocking

  • The change alters the address equation used for color multisampling, but the review did not inspect the downstream detiler and color-target paths that consume GcnTiling. Include those callers in a follow-up review to confirm sample addressing and bank/slice handling end to end.

Not verified

Read description.md, commits.md, manifest.json, diff.patch, TextureTiling.cpp lines 440–710, and tests/TextureTiling.cpp lines 140–180 and 610–715. All four changed files listed in manifest.json are included in the review bundle; the two debt fragments were reviewed in the diff. files.json was unavailable through the reader. Did not read the color-target, detiler, or state callers identified by search, and did not run tests or independently verify the author's reported results.

To get this to a good state

Nothing is required. Optional: inspect the downstream consumers of GcnTiling for the new color sample equation.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5982748378 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23672#pullrequestreview-5982748378). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T20:23:56Z. **Review:** COMMENTED --- # Reviewed — comments The color layout change is internally consistent with the stated addrlib formula, but review evidence is incomplete because the core color address and detile consumers were not read. ## What I ran Reviewed head `3656bbf265db9c2d77598a138ca5a5b93e473fc0` using the prepared diff and `repo_read.py` source reads. No tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | Reviewed layout and test changes | | Tests | not run | Author reports test results in the PR description | ## Findings ### Blocking None identified in the code read. ### Non-blocking - The change alters the address equation used for color multisampling, but the review did not inspect the downstream detiler and color-target paths that consume `GcnTiling`. Include those callers in a follow-up review to confirm sample addressing and bank/slice handling end to end. ## Not verified Read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, `TextureTiling.cpp` lines 440–710, and `tests/TextureTiling.cpp` lines 140–180 and 610–715. All four changed files listed in `manifest.json` are included in the review bundle; the two debt fragments were reviewed in the diff. `files.json` was unavailable through the reader. Did not read the color-target, detiler, or state callers identified by search, and did not run tests or independently verify the author's reported results. ## To get this to a good state Nothing is required. Optional: inspect the downstream consumers of `GcnTiling` for the new color sample equation.
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!23672
No description provided.