fix(agc): honor disabled color targets and their reset state #1346

Merged
TibixDev merged 1 commit from upstream-pr/1346 into main 2026-10-08 11:36:04 +00:00
TibixDev commented 2026-10-07 23:59:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-07T23:59:07Z.


What

Exclude COLOR_INVALID attachments from the effective color write mask. Preserve depth-only rendering and the export indices of later color targets. Initialize all eight color-format registers to their disabled reset state.

#1139 handles inactive pixel shaders and #1178 adds pixel-input defaults; neither handles these color targets.

Tested

Fedora 44, Release: driver, graphics, and PM4 tests. Covers disabled and partially written targets, depth-only draws, holes between color exports, missing registers, and context reset. Contribution checks pass. Windows was not tested.

Checklist

  • Current main; no duplicate open PR.
  • One topic.
  • No new code comments.
  • Unsupported paths still throw; UI stubs are documented.
  • No notes, logs, or images in the repository.
  • No new third-party code.
  • General behavior.
  • Depends on: none.
  • AI-assisted: yes.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4779926713 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1346). Originally posted by [TibixDev](https://github.com/TibixDev) on 2026-10-07T23:59:07Z. --- ### What Exclude COLOR_INVALID attachments from the effective color write mask. Preserve depth-only rendering and the export indices of later color targets. Initialize all eight color-format registers to their disabled reset state. #1139 handles inactive pixel shaders and #1178 adds pixel-input defaults; neither handles these color targets. ### Tested Fedora 44, Release: driver, graphics, and PM4 tests. Covers disabled and partially written targets, depth-only draws, holes between color exports, missing registers, and context reset. Contribution checks pass. Windows was not tested. ### Checklist - [x] Current `main`; no duplicate open PR. - [x] One topic. - [x] No new code comments. - [x] Unsupported paths still throw; UI stubs are documented. - [x] No notes, logs, or images in the repository. - [x] No new third-party code. - [x] General behavior. - [x] Depends on: none. - [x] AI-assisted: yes.
TibixDev commented 2026-10-08 07:23:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T07:23:18Z.


Rebased on 58a1bd66. Kept both the merged CMASK extent function and disabled-format write-mask handling.

Fedora 44 Release: agc_driver_tests, agc_driver_graphics_tests, agc_driver_pm4_tests build; the targeted tests and contribution checks pass. Windows CI is pending.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6054824223 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1346#issuecomment-6054824223). Originally posted by [TibixDev](https://github.com/TibixDev) on 2026-10-08T07:23:18Z. --- Rebased on `58a1bd66`. Kept both the merged CMASK extent function and disabled-format write-mask handling. Fedora 44 Release: `agc_driver_tests`, `agc_driver_graphics_tests`, `agc_driver_pm4_tests` build; the targeted tests and contribution checks pass. Windows CI is pending.
github-actions[bot] commented 2026-10-08 07:27:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T07:27:08Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1414 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp L580
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6054888756 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1346#issuecomment-6054888756). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T07:27:08Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1414 | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` [L580](https://github.com/boykopovar/AnyPS5/blob/4f41832dc0bce9274ceb3dd3fb835a881d93b632/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp#L580) | | |
adriadam10 commented 2026-10-08 11:36:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T11:36:00Z.


Checked build + full ctest on current main + this PR (442/442, agc_driver_graphics passes), CI green on the head. COLOR_INVALID targets no longer count in the write mask in the decode, precheck and rejection paths, later export indices are preserved (State.cpp:647 and the test at Graphics.cpp:627), and a missing register still throws. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6058986562 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1346#issuecomment-6058986562). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T11:36:00Z. --- Checked build + full ctest on current main + this PR (442/442, `agc_driver_graphics` passes), CI green on the head. COLOR_INVALID targets no longer count in the write mask in the decode, precheck and rejection paths, later export indices are preserved (State.cpp:647 and the test at Graphics.cpp:627), and a missing register still throws. 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!1346
No description provided.