Skip to content

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

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
MichonGoddijn231849:feat/standard-64k-color-targets
Oct 8, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
MichonGoddijn231849:feat/standard-64k-color-targets

Conversation

@MichonGoddijn231849

Copy link
Copy Markdown
Contributor

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

Color targets with the SW_64KB_S swizzle (CB_COLOR_ATTRIB3 tile mode 9) 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, aliasing texels).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@adriadam10

Copy link
Copy Markdown
Collaborator

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.

@adriadam10
adriadam10 force-pushed the feat/standard-64k-color-targets branch from 4fd67e1 to 6aa8e58 Compare October 8, 2026 08:44
@adriadam10
adriadam10 merged commit a5df1a8 into boykopovar:main Oct 8, 2026
4 checks passed
@MichonGoddijn231849
MichonGoddijn231849 deleted the feat/standard-64k-color-targets branch October 9, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants