feat(agc): 64 KiB standard color targets #1177

Merged
MichonGoddijn231849 merged 1 commit from upstream-pr/1177 into main 2026-10-08 08:44:53 +00:00
MichonGoddijn231849 commented 2026-10-07 16:44:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-07T16:44:20Z.


What

Color targets with the SW_64KB_S swizzle (CB_COLOR_ATTRIB3 tile mode 9) are rendered into, instead of refused. They use the standard element order of the 4 KiB mode extended by the texture detiler's 64 KiB bits, and are resident like the other tiled targets.

The standard blocks are now wider than tall for 2- and 8-byte elements, as the standard swizzle and the texture layout have them. They were transposed, so texels aliased each other. tests/ColorTargetLayout.cpp checks that every element size and both standard block sizes cover their block exactly once, sized like the texture layout.

Tested

Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB, MinGW-w64 GCC 15.2.0.

  • GTA V PPSA04264 (01.005) runs with this change on the combined gta-v/testing branch (Performance mode, the prologue).
  • On this branch: builds, and ctest passes. Not run here: the relinker's Python tests (my local Python does not find their helper modules) and guest_gameupdate.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes. Written with Claude (Anthropic) under my direction; I reviewed and tested it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4775674723 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1177). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-07T16:44:20Z. --- ### What Color targets with the SW_64KB_S swizzle (CB_COLOR_ATTRIB3 tile mode 9) are rendered into, instead of refused. They use the standard element order of the 4 KiB mode extended by the texture detiler's 64 KiB bits, and are resident like the other tiled targets. The standard blocks are now wider than tall for 2- and 8-byte elements, as the standard swizzle and the texture layout have them. They were transposed, so texels aliased each other. `tests/ColorTargetLayout.cpp` checks that every element size and both standard block sizes cover their block exactly once, sized like the texture layout. ### Tested Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB, MinGW-w64 GCC 15.2.0. - GTA V PPSA04264 (01.005) runs with this change on the combined [`gta-v/testing`](https://github.com/MichonGoddijn231849/AnyPS5-fork/tree/gta-v/testing) branch (Performance mode, the prologue). - On this branch: builds, and `ctest` passes. Not run here: the relinker's Python tests (my local Python does not find their helper modules) and `guest_gameupdate`. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes. Written with Claude (Anthropic) under my direction; I reviewed and tested it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
adriadam10 commented 2026-10-08 08:44:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T08:44:45Z.


Checked the standard 4 KiB / 64 KiB element offsets and block dimensions against addrlib's 2D SW_4KB_S / SW_64KB_S for 1/2/4/8/16 B elements: all match, including the corrected block orientation. The new tests don't build without the change. Conflicted with main only in RunColorMetadataPass (metadataPassResident now exists); I rebased and applied the != Linear condition inside that helper. Build and ctest green after the rebase; merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6056164722 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1177#issuecomment-6056164722). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T08:44:45Z. --- Checked the standard 4 KiB / 64 KiB element offsets and block dimensions against addrlib's 2D SW_4KB_S / SW_64KB_S for 1/2/4/8/16 B elements: all match, including the corrected block orientation. The new tests don't build without the change. Conflicted with main only in `RunColorMetadataPass` (`metadataPassResident` now exists); I rebased and applied the `!= Linear` condition inside that helper. Build and ctest green after the rebase; merging once CI is green.
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!1177
No description provided.