feat(agc): accept 8_8_8_8 UINT color targets #1736

Merged
TheAggie merged 2 commits from upstream-pr/1736 into main 2026-10-10 06:00:00 +00:00
TheAggie commented 2026-10-08 17:52:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TheAggie on 2026-10-08T17:52:33Z.


What

COLOR_8_8_8_8 with number type UINT threw unsupported color format 10 number type 4 component swap 0. RADV renders into R8G8B8A8_UINT images through it. With #1073, ccleste (PPSA59322) writes such a target with a UINT16_ABGR export, and it was the last draw ccleste dropped.

This builds on #1073, which accepts that export and validates the uvec4 output. Its first commit is #1073's and drops out once that merges.

  • COLOR_8_8_8_8 UINT decodes to VK_FORMAT_R8G8B8A8_UINT for component swaps 0, 2 and 3, with the same reversed export mappings as the other 8_8_8_8 types.
  • The alternate swap (1) still throws. It would need B8G8R8A8_UINT, which Vulkan does not require as a color attachment, unlike R8G8B8A8_UINT.
  • Tests:
    • agc_driver_graphics (uint8x4TargetTests): the target decodes as R8G8B8A8_UINT with uintExport set, swaps 2 and 3 decode, and swap 1 throws.
    • New GPU test agc_driver_uint8x4_color_target draws a compressed UINT16_ABGR export into a linear 256x64 8_8_8_8_UINT target. It requires every channel's byte inside the scissor and the untouched bytes outside it. It fails with unsupported color format 10 number type 4 component swap 0 without this change.

Tested

Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, NVIDIA GeForce RTX 5070 Ti.

  • The full suite (459 tests, including #1073's agc_driver_pixel_uint16_export) passes on this branch. It was run from the generated CTestTestfile.cmake commands because antivirus blocks ctest.exe on this machine.
  • With this applied, ccleste draws every frame without a skipped draw. That testing was on a local branch with my own equivalent of #1073 and the other changes ccleste needs, and RADV_DEBUG=nonggc set. I found #1073 only afterwards, so this is now based on it.

Not tested on AMD, Intel or Linux.

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: #1073
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4790754352 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1736). Originally posted by [TheAggie](https://github.com/TheAggie) on 2026-10-08T17:52:33Z. --- ### What `COLOR_8_8_8_8` with number type UINT threw `unsupported color format 10 number type 4 component swap 0`. RADV renders into `R8G8B8A8_UINT` images through it. With #1073, ccleste (PPSA59322) writes such a target with a `UINT16_ABGR` export, and it was the last draw ccleste dropped. This builds on #1073, which accepts that export and validates the `uvec4` output. Its first commit is #1073's and drops out once that merges. - `COLOR_8_8_8_8` UINT decodes to `VK_FORMAT_R8G8B8A8_UINT` for component swaps 0, 2 and 3, with the same reversed export mappings as the other 8_8_8_8 types. - The alternate swap (1) still throws. It would need `B8G8R8A8_UINT`, which Vulkan does not require as a color attachment, unlike `R8G8B8A8_UINT`. - Tests: - `agc_driver_graphics` (`uint8x4TargetTests`): the target decodes as `R8G8B8A8_UINT` with `uintExport` set, swaps 2 and 3 decode, and swap 1 throws. - New GPU test `agc_driver_uint8x4_color_target` draws a compressed `UINT16_ABGR` export into a linear 256x64 `8_8_8_8_UINT` target. It requires every channel's byte inside the scissor and the untouched bytes outside it. It fails with `unsupported color format 10 number type 4 component swap 0` without this change. ### Tested Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, NVIDIA GeForce RTX 5070 Ti. - The full suite (459 tests, including #1073's `agc_driver_pixel_uint16_export`) passes on this branch. It was run from the generated `CTestTestfile.cmake` commands because antivirus blocks `ctest.exe` on this machine. - With this applied, ccleste draws every frame without a skipped draw. That testing was on a local branch with my own equivalent of #1073 and the other changes ccleste needs, and `RADV_DEBUG=nonggc` set. I found #1073 only afterwards, so this is now based on it. Not tested on AMD, Intel or Linux. ### 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: #1073 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
johnmaia commented 2026-10-08 18:59:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-08T18:59:13Z.


Linux run, since the description lists AMD and Linux as not tested: Ubuntu 24.04.5 (kernel 6.8), GCC 13.3, Release, AMD Radeon RX 7600 (RADV NAVI33, Mesa 25.2.8). This PR's head 0b9b70fa (including #1073's commit), merged onto main 6b56175a.

Full ctest: 481/481 pass, with the GPU tests running on the RX 7600 (none skipped). That includes the new agc_driver_uint8x4_color_target, #1073's agc_driver_pixel_uint16_export, and agc_driver_graphics with uint8x4TargetTests.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6066957462 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1736#issuecomment-6066957462). Originally posted by [johnmaia](https://github.com/johnmaia) on 2026-10-08T18:59:13Z. --- Linux run, since the description lists AMD and Linux as not tested: Ubuntu 24.04.5 (kernel 6.8), GCC 13.3, Release, AMD Radeon RX 7600 (RADV NAVI33, Mesa 25.2.8). This PR's head `0b9b70fa` (including #1073's commit), merged onto main `6b56175a`. Full ctest: 481/481 pass, with the GPU tests running on the RX 7600 (none skipped). That includes the new `agc_driver_uint8x4_color_target`, #1073's `agc_driver_pixel_uint16_export`, and `agc_driver_graphics` with `uint8x4TargetTests`.
adriadam10 commented 2026-10-10 05:59:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T05:59:57Z.


Checked on RADV (Radeon 660M): agc_driver_graphics and agc_driver_uint8x4_color_target pass, and both fail without the State.cpp change. The GPU test pins every channel byte and the untouched bytes outside the scissor. The existing UINT16_ABGR TechnicalDebt entry already covers out-of-range values into a narrower target. Also confirmed by @johnmaia on RX 7600 (481/481). Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6094441503 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1736#issuecomment-6094441503). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T05:59:57Z. --- Checked on RADV (Radeon 660M): `agc_driver_graphics` and `agc_driver_uint8x4_color_target` pass, and both fail without the `State.cpp` change. The GPU test pins every channel byte and the untouched bytes outside the scissor. The existing UINT16_ABGR TechnicalDebt entry already covers out-of-range values into a narrower target. Also confirmed by @johnmaia on RX 7600 (481/481). Merging.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1736
No description provided.