fix(agc): admit inactive covered-centroid mode #4556

Merged
Amoenus merged 1 commit from upstream-pr/4556 into main 2026-10-13 14:43:06 +00:00
Amoenus commented 2026-10-12 15:35:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-12T15:35:15Z.


What

Accept PA_SC_AA_CONFIG.COVERED_CENTROID_IS_CENTER when no active perspective or linear centroid input consumes it (SPI_PS_INPUT_ENA & SPI_PS_INPUT_ADDR), or when the pixel program is skipped. Keep active or unspecified centroid inputs refused in both state decode and draw precheck. Other unsupported AA bits still throw. No interpolation, shader serialization, export or sample-location behavior is changed.

Sonic Unleashed Recompiled, PPSA99902 / 01.003.000, uses PA_SC_AA_CONFIG=0x2030e003 and SPI_PS_INPUT_ENA=SPI_PS_INPUT_ADDR=0x2 (perspective center only). Replaying each of two original full register captures through unchanged main's real driver reproduces:

coverage conversion or nonstandard multisampling is unsupported (register 0x2f8 = 0x2030e003)

In that historical captured-register comparison, the untouched draws on the change pass the precheck and reach DCC over a multisampled color target is unsupported. This removes the coverage-state refusal; it does not implement DCC MSAA targets or establish gameplay. That pinned-main CPU replay does not establish the current title frontier or a new clean-main launch. Bring-up and remaining work are maintained in discussion #4443.

Bit 29 is named in pinned GFX10.3 registers; RADV sets it on GFX10.3+. The active-input intersection follows the existing DecodePixelStageInfo. Active covered-centroid interpolation remains unmeasured on console and is documented in TechnicalDebt.

Tested

Current maintenance (2026-10-13): 44c4b3f8b on pinned main 0f2683cb7; covered-centroid contribution lines are unchanged. Full Windows Release build/patched libraries, conventions, registration and diff checks pass. The five original affected groups pass five repetitions on RTX5080 and AMD1002:13c0 in both requested GPL modes, with no selected skips; maximum selected test 4.98482 s. Official ANYPS5_AGC_EXECUTION_TESTS is empty (all sources), and selected Ninja rules contain no execution stub. Actual GPU identities are verified; the requested GPL-on setting does not establish that every draw selected GPL. No new full suite or title replay. Extra CMASK fast-clear passes five times on NVIDIA in both requested modes and AMD with GPL on; AMD GPL off fails on its first run with AGC graphics: vkQueueSubmit recorder: Vulkan result -4 (CMASK report). The exact unmodified pinned main reproduces that device-loss signature, and it reproduces after byte-exact branch restoration/full rebuild; the covered-centroid state fixture passes after restoration. This is a disclosed main/candidate CMASK residual, with no centroid-specific cause established. Additional Recorder ordering checks (agc_copied_direct_ordering) pass five runs on their independently selected device; that helper prefers discrete GPUs and does not establish AMD coverage from the environment setting. We track main promptly, preserve the focused contribution and rebuild changed dependencies, then repeat affected checks. Historical full suites and fault controls below retain their exact head/base scope; we repeat A/B controls when a relevant change or new failure needs attribution. New main/source preparation alone does not establish a new title result or full upstream CI pass.

Historical full-suite validation: exact head 5d0f57d7d, based on main 43e3a70f8143f014f621c48abbdb137fffd7346e. Rebase applied without code conflicts; the contribution code is unchanged. Full Windows Release build and patched system libraries, conventions, registration and diff checks pass.

Full NVIDIA suite: 1012 passed / 0 failed / 8 skipped of 1020, maximum observed test 21.421s (ctest --parallel 2 --timeout 30).

  • nvidia-gplon: all selected groups pass five repetitions, with no skips.

  • amd-gplon: all selected groups pass five repetitions, with no skips.

Windows 11 Enterprise 26200, WinLibs GCC15.2.0r7 / Ninja Release; RTX5080 driver610.62 and AMD1002:13c0 driver32.0.21036.18. AnyPS5 shader cache disabled; driver-cache coldness is unverified. GPL-on leaves APS5_NO_GPL absent; off sets 1. GPU campaigns ran sequentially. Driver-backed fixtures check the selected GPU; recorder-based helpers independently select NVIDIA and do not establish AMD coverage.

Skipped tests: agc_driver_stencil_ref_export, guest_video_out_high_frame_rate, video_out_flip_lifetime, video_out_flip_reopen, video_out_flip_controls, video_out_flip_overlay, video_out_flip_unopened, guest_video_out_wqhd_detection_no_vulkan.

Earlier unchanged-main/candidate captured-register comparisons and deliberate guard-fault controls remain historical evidence; see the original contribution and #4435.

No new title launch, console measurement or Linux run is claimed by this rebase. The conditional title evidence and remaining prerequisites are maintained in #4443. Historical later-main merge preview (90c683946) is clean; these results remain pinned to test base 43e3a70f8. This preview is not a build/test of that later merge. Full upstream Linux/Windows CI requires a maintainer-triggered workflow; these are local results. Depends on: none. AI-assisted: Codex.

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; silent stubs are listed in TechnicalDebt
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA99902 Game bring-up #4443 — the captured coverage-state refusal only
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4831610906 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4556). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-12T15:35:15Z. --- ### What Accept `PA_SC_AA_CONFIG.COVERED_CENTROID_IS_CENTER` when no active perspective or linear centroid input consumes it (`SPI_PS_INPUT_ENA & SPI_PS_INPUT_ADDR`), or when the pixel program is skipped. Keep active or unspecified centroid inputs refused in both state decode and draw precheck. Other unsupported AA bits still throw. No interpolation, shader serialization, export or sample-location behavior is changed. Sonic Unleashed Recompiled, **PPSA99902 / 01.003.000**, uses `PA_SC_AA_CONFIG=0x2030e003` and `SPI_PS_INPUT_ENA=SPI_PS_INPUT_ADDR=0x2` (perspective center only). Replaying each of two original full register captures through unchanged main's real driver reproduces: ```text coverage conversion or nonstandard multisampling is unsupported (register 0x2f8 = 0x2030e003) ``` In that historical captured-register comparison, the untouched draws on the change pass the precheck and reach `DCC over a multisampled color target is unsupported`. This removes the coverage-state refusal; it does not implement DCC MSAA targets or establish gameplay. That pinned-main CPU replay does not establish the current title frontier or a new clean-main launch. Bring-up and remaining work are maintained in [discussion #4443](https://github.com/boykopovar/AnyPS5/discussions/4443). Bit 29 is named in [pinned GFX10.3 registers](https://github.com/mihawk-99/PS5_Mesa/blob/0b2d6d1a61d9bbf89cf8beb88a696144f67c61f8/src/amd/registers/gfx103.json#L13380); [RADV sets it on GFX10.3+](https://github.com/mihawk-99/PS5_Mesa/blob/0b2d6d1a61d9bbf89cf8beb88a696144f67c61f8/src/amd/vulkan/radv_cmd_buffer.c#L13279-L13280). The active-input intersection follows the existing `DecodePixelStageInfo`. Active covered-centroid interpolation remains unmeasured on console and is documented in TechnicalDebt. ### Tested <!-- codex-current-maintenance --> **Current maintenance (2026-10-13):** [44c4b3f8b](https://github.com/Amoenus/AnyPS5/commit/44c4b3f8bf6c42c6d8c0ecb73e69ca79c71c4341) on pinned main `0f2683cb7`; covered-centroid contribution lines are unchanged. Full Windows Release build/patched libraries, conventions, registration and diff checks pass. The five original affected groups pass five repetitions on RTX5080 and AMD1002:13c0 in both requested GPL modes, with no selected skips; maximum selected test 4.98482 s. Official `ANYPS5_AGC_EXECUTION_TESTS` is empty (all sources), and selected Ninja rules contain no execution stub. Actual GPU identities are verified; the requested GPL-on setting does not establish that every draw selected GPL. No new full suite or title replay. Extra CMASK fast-clear passes five times on NVIDIA in both requested modes and AMD with GPL on; AMD GPL off fails on its first run with `AGC graphics: vkQueueSubmit recorder: Vulkan result -4` ([CMASK report](https://github.com/boykopovar/AnyPS5/issues/5150)). The exact unmodified pinned main reproduces that device-loss signature, and it reproduces after byte-exact branch restoration/full rebuild; the covered-centroid state fixture passes after restoration. This is a disclosed main/candidate CMASK residual, with no centroid-specific cause established. Additional Recorder ordering checks (agc_copied_direct_ordering) pass five runs on their independently selected device; that helper prefers discrete GPUs and does not establish AMD coverage from the environment setting. We track main promptly, preserve the focused contribution and rebuild changed dependencies, then repeat affected checks. Historical full suites and fault controls below retain their exact head/base scope; we repeat A/B controls when a relevant change or new failure needs attribution. New main/source preparation alone does not establish a new title result or full upstream CI pass. <!-- /codex-current-maintenance --> **Historical full-suite validation:** exact head [`5d0f57d7d`](https://github.com/Amoenus/AnyPS5/commit/5d0f57d7d8128f64a6b102ff869a63aafef3630f), based on main `43e3a70f8143f014f621c48abbdb137fffd7346e`. Rebase applied without code conflicts; the contribution code is unchanged. Full Windows Release build and patched system libraries, conventions, registration and diff checks pass. Full NVIDIA suite: **1012 passed / 0 failed / 8 skipped of 1020**, maximum observed test 21.421s (`ctest --parallel 2 --timeout 30`). - nvidia-gplon: all selected groups pass five repetitions, with no skips. - amd-gplon: all selected groups pass five repetitions, with no skips. Windows 11 Enterprise 26200, WinLibs GCC15.2.0r7 / Ninja Release; RTX5080 driver610.62 and AMD1002:13c0 driver32.0.21036.18. AnyPS5 shader cache disabled; driver-cache coldness is unverified. GPL-on leaves `APS5_NO_GPL` absent; off sets `1`. GPU campaigns ran sequentially. Driver-backed fixtures check the selected GPU; recorder-based helpers independently select NVIDIA and do not establish AMD coverage. Skipped tests: `agc_driver_stencil_ref_export`, `guest_video_out_high_frame_rate`, `video_out_flip_lifetime`, `video_out_flip_reopen`, `video_out_flip_controls`, `video_out_flip_overlay`, `video_out_flip_unopened`, `guest_video_out_wqhd_detection_no_vulkan`. Earlier unchanged-main/candidate captured-register comparisons and deliberate guard-fault controls remain historical evidence; see the original contribution and [#4435](https://github.com/boykopovar/AnyPS5/issues/4435#issuecomment-6127288530). No new title launch, console measurement or Linux run is claimed by this rebase. The conditional title evidence and remaining prerequisites are maintained in [#4443](https://github.com/boykopovar/AnyPS5/discussions/4443). Historical later-main merge preview (`90c683946`) is clean; these results remain pinned to test base `43e3a70f8`. This preview is not a build/test of that later merge. Full upstream Linux/Windows CI requires a maintainer-triggered workflow; these are local results. **Depends on: none.** AI-assisted: Codex. ### 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 - [x] Unimplemented paths throw; silent stubs are listed in TechnicalDebt - [x] No notes, investigation files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA99902 [Game bring-up #4443](https://github.com/boykopovar/AnyPS5/discussions/4443) — the captured coverage-state refusal only - [x] AI-assisted: yes (Codex)
xXPBSXx commented 2026-10-13 06:56:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T06:56:50Z.


Windows test (MinGW GCC 15.2, Release, Windows 10, RTX 4080 SUPER). Built on main 88107b7de together with thirteen other open GPU PRs (their own commits cherry-picked, no merge commits), so only the tests that belong to this PR say something about it:

  • tests/Graphics.cpp (agc_driver_graphics): 10 of 10 runs passed.

Not tested: no game run. The batch was built once, not per PR; nothing failed, so no bisect was needed.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6140096048 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4556#issuecomment-6140096048). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-13T06:56:50Z. --- Windows test (MinGW GCC 15.2, Release, Windows 10, RTX 4080 SUPER). Built on main `88107b7de` together with thirteen other open GPU PRs (their own commits cherry-picked, no merge commits), so only the tests that belong to this PR say something about it: - `tests/Graphics.cpp` (`agc_driver_graphics`): 10 of 10 runs passed. Not tested: no game run. The batch was built once, not per PR; nothing failed, so no bisect was needed. AI-assisted (Claude Code).
adriadam10 commented 2026-10-13 14:26:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T14:26:21Z.


Checked on current main (merged locally): agc_driver_graphics and the new agc_driver_covered_centroid_state pass, and both fail with the State.cpp change reverted. Active/unspecified centroid inputs and other AA bits still throw in both the decode and the draw precheck, and the TechnicalDebt line is accurate. Thanks @xXPBSXx for the Windows run. Merging once the full Build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6147819919 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4556#issuecomment-6147819919). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-13T14:26:21Z. --- Checked on current main (merged locally): `agc_driver_graphics` and the new `agc_driver_covered_centroid_state` pass, and both fail with the `State.cpp` change reverted. Active/unspecified centroid inputs and other AA bits still throw in both the decode and the draw precheck, and the TechnicalDebt line is accurate. Thanks @xXPBSXx for the Windows run. Merging once the full Build 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!4556
No description provided.