fix(agc): exclude neighboring stores from DCC invalidation #7132

Merged
MarcZX10 merged 3 commits from upstream-pr/7132 into main 2026-10-17 21:26:39 +00:00
MarcZX10 commented 2026-10-17 12:57:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T12:57:47Z.


What

Retain the existing unchanged-generation proof when resolving resident multisampled DCC targets, while accepting the finer StoredOver proof for unrelated stores within the same tracking block. Keep refusing actual overlapping writes and uncertain or evicted fine-grained history. Includes the focused adjacent-store regression.

Tested

Linux x86_64, GCC 12.2: CMake Release configure succeeded. The focused fixture and AGC driver build stopped before compiling changed files at the unrelated existing SrtDescriptorEvaluation.cpp template parse error. git diff --check passed. Candidate author reports 18 physical-GPU fixture passes (RTX 5080 and AMD Radeon Graphics) plus llvmpipe coverage at the exact candidate commit in issue #5336; these are author-reported results, not run in this environment.

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 under Silent stubs in their library's technical debt file
  • 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: #6869 (shared DCC validation path and fixture; rebase after it merges)
  • Fixes: none; this does not establish a fix for issue #5336's reported titles
  • Unblocks: none established
  • GPUs tested: NVIDIA RTX 5080, driver 32.0.16.1062, Windows 11 Enterprise 26200; AMD Radeon Graphics, driver 32.0.21036.18, Windows 11 Enterprise 26200; author-reported fixture runs at exact candidate commit. Local GPU tests not run.
  • AI-assisted: yes

Carries the three original commits by Romans Pokrovskis unchanged: 975c3ee6b3, 6eebcc2ce1, and e040cb7f75. The neighboring-store failure is separately reproduced; its causal relationship to the title failures in #5336 remains unknown.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4900240063 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T12:57:47Z. --- ### What Retain the existing unchanged-generation proof when resolving resident multisampled DCC targets, while accepting the finer `StoredOver` proof for unrelated stores within the same tracking block. Keep refusing actual overlapping writes and uncertain or evicted fine-grained history. Includes the focused adjacent-store regression. ### Tested Linux x86_64, GCC 12.2: CMake Release configure succeeded. The focused fixture and AGC driver build stopped before compiling changed files at the unrelated existing `SrtDescriptorEvaluation.cpp` template parse error. `git diff --check` passed. Candidate author reports 18 physical-GPU fixture passes (RTX 5080 and AMD Radeon Graphics) plus llvmpipe coverage at the exact candidate commit in [issue #5336](https://github.com/boykopovar/AnyPS5/issues/5336); these are author-reported results, not run in this environment. ### 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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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: #6869 (shared DCC validation path and fixture; rebase after it merges) - [x] Fixes: none; this does not establish a fix for issue #5336's reported titles - [x] Unblocks: none established - [x] GPUs tested: NVIDIA RTX 5080, driver 32.0.16.1062, Windows 11 Enterprise 26200; AMD Radeon Graphics, driver 32.0.21036.18, Windows 11 Enterprise 26200; author-reported fixture runs at exact candidate commit. Local GPU tests not run. - [x] AI-assisted: yes Carries the three original commits by Romans Pokrovskis unchanged: `975c3ee6b3`, `6eebcc2ce1`, and `e040cb7f75`. The neighboring-store failure is separately reproduced; its causal relationship to the title failures in #5336 remains unknown.
github-actions[bot] commented 2026-10-17 13:08:33 +00:00 (Migrated from github.com)

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


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6297 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6553 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6973 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6987 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6989 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6995 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234254787 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6234254787). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T13:08:33Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6297](https://www.github.com/boykopovar/AnyPS5/pull/6297) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6553](https://www.github.com/boykopovar/AnyPS5/pull/6553) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6973](https://www.github.com/boykopovar/AnyPS5/pull/6973) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6987](https://www.github.com/boykopovar/AnyPS5/pull/6987) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6989](https://www.github.com/boykopovar/AnyPS5/pull/6989) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6995](https://www.github.com/boykopovar/AnyPS5/pull/6995) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` |
akkadbakkad89 commented 2026-10-17 13:12:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-17T13:12:30Z.


First independent GPU run of this head (the PR lists author-reported runs only): head e040cb7f7, Windows 11, MinGW (WinLibs GCC 15.2.0), Release, serial fresh processes.

  • NVIDIA RTX 3070 (driver 617.42): agc_driver_alpha_to_coverage, agc_driver_alpha_to_coverage_state, agc_driver_sample_mask_multisample, agc_driver_sample_multisample_target — 4/4 pass.
  • Intel UHD 630 (ANYPS5_GPU=UHD, igvk64): same four, 4/4 pass.

The neighboring-store cases in the updated AlphaToCoverage.cpp fixture pass on both devices.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234290537 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6234290537). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-17T13:12:30Z. --- First independent GPU run of this head (the PR lists author-reported runs only): head `e040cb7f7`, Windows 11, MinGW (WinLibs GCC 15.2.0), Release, serial fresh processes. - NVIDIA RTX 3070 (driver 617.42): `agc_driver_alpha_to_coverage`, `agc_driver_alpha_to_coverage_state`, `agc_driver_sample_mask_multisample`, `agc_driver_sample_multisample_target` — 4/4 pass. - Intel UHD 630 (`ANYPS5_GPU=UHD`, igvk64): same four, 4/4 pass. The neighboring-store cases in the updated `AlphaToCoverage.cpp` fixture pass on both devices.
MarcZX10 commented 2026-10-17 13:13:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T13:13:58Z.


Thanks for the independent GPU validation. This adds a second hardware report: the focused alpha-to-coverage/sample-mask/sample-multisample group passed 4/4 on both an RTX 3070 and Intel UHD 630, including the neighboring-store cases. I’ll keep the PR’s validation summary aligned with the distinction between these independent runs and the issue author’s broader title testing.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234305175 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6234305175). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T13:13:58Z. --- Thanks for the independent GPU validation. This adds a second hardware report: the focused alpha-to-coverage/sample-mask/sample-multisample group passed 4/4 on both an RTX 3070 and Intel UHD 630, including the neighboring-store cases. I’ll keep the PR’s validation summary aligned with the distinction between these independent runs and the issue author’s broader title testing.
MarcZX10 commented 2026-10-17 13:45:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T13:45:00Z.


Thanks for testing the exact head on both NVIDIA and Intel. The four focused cases pass on each device, including the neighboring-store regression cases; this is useful independent confirmation of the reported DCC invalidation behavior.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234611431 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6234611431). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T13:45:00Z. --- Thanks for testing the exact head on both NVIDIA and Intel. The four focused cases pass on each device, including the neighboring-store regression cases; this is useful independent confirmation of the reported DCC invalidation behavior.
MarcZX10 commented 2026-10-17 14:03:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T14:03:39Z.


Thanks for the first independent GPU run on this head. The RTX 3070 and UHD 630 results confirm the updated neighboring-store regression cases pass on both NVIDIA and Intel; I have recorded the exact device and driver scope.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234831431 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6234831431). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T14:03:39Z. --- Thanks for the first independent GPU run on this head. The RTX 3070 and UHD 630 results confirm the updated neighboring-store regression cases pass on both NVIDIA and Intel; I have recorded the exact device and driver scope.
Amoenus commented 2026-10-17 16:57:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T16:57:24Z.


@MarcZX100 thank you for carrying the three original commits unchanged with attribution. Our source audit confirms that exact e040/#7132 is already active in current integrationc784.

The latest Sonic validation distinguishes the remaining stop from the adjacent-store case: public-source observers7b/78db record unchanged=0 stored=1 reason=driver-overlap in the DCC plane. The rejected piece/generation matches BdaResources::markWrittenPages. Its page records do not identify the exact GPU store or prove a full-byte metadata clear, so the current refusal remains appropriate pending that analysis.

These are current-integration observations, not new exact-PR-head results; the original e040 hardware validation retains its original pin. The observer builds pass on both OSes and its existing2x/4x/8x positive/refusal controls pass18 times across NVIDIA/AMD, plus6 Linux controls. This does not reduce the independently reproduced neighboring-store correction or establish a shared Ruffle/AMD cause.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6237121634 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6237121634). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T16:57:24Z. --- @MarcZX100 thank you for carrying the three original commits unchanged with attribution. Our source audit confirms that exact e040/#7132 is already active in current integrationc784. The latest Sonic validation distinguishes the remaining stop from the adjacent-store case: [public-source observers7b/78db](https://github.com/boykopovar/AnyPS5/issues/5336) record `unchanged=0 stored=1 reason=driver-overlap` in the DCC plane. The rejected piece/generation matches `BdaResources::markWrittenPages`. Its page records do not identify the exact GPU store or prove a full-byte metadata clear, so the current refusal remains appropriate pending that analysis. These are current-integration observations, not new exact-PR-head results; the original e040 hardware validation retains its original pin. The observer builds pass on both OSes and its existing2x/4x/8x positive/refusal controls pass18 times across NVIDIA/AMD, plus6 Linux controls. This does not reduce the independently reproduced neighboring-store correction or establish a shared Ruffle/AMD cause.
MarcZX10 commented 2026-10-17 17:02:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T17:02:55Z.


Thanks for tracing the remaining Sonic rejection to a newer driver-overlap piece in BdaResources::markWrittenPages. I agree that the page records identify the recording path but do not prove the bytes/value written, so the current refusal should remain. This separates the unresolved DCC writer semantics from #7132’s independently tested neighboring-store false positive; I’ll keep the PR scoped to that correction.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6237208892 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6237208892). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T17:02:55Z. --- Thanks for tracing the remaining Sonic rejection to a newer driver-overlap piece in `BdaResources::markWrittenPages`. I agree that the page records identify the recording path but do not prove the bytes/value written, so the current refusal should remain. This separates the unresolved DCC writer semantics from #7132’s independently tested neighboring-store false positive; I’ll keep the PR scoped to that correction.
milescoviello commented 2026-10-17 19:36:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-17T19:36:47Z.


A title data point for this PR. Ruffle (PPSA68091) on Linux, RTX 4070 Ti (NVIDIA 595.99.02), 60 s with scripted pad input.

Base is main 5859889b2 with #6543 and #7250 merged; #7250 takes a whole-range DCC fill of a resident multisampled target as its fast clear.

Build Result
base stops at 10 s: writes to a resident multisampled DCC target or its metadata are not implemented
base + this PR (e040cb7f7) runs to the 60 s limit, 105 presents per 10 s

A local print there showed the DCC range 0x4004606000+0x14000 reading the fill's key with nothing pending when the check failed. That fits a store to a neighbouring range in a shared 64 KiB tracker block, which is what this PR excludes.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6239711171 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6239711171). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-17T19:36:47Z. --- A title data point for this PR. Ruffle (PPSA68091) on Linux, RTX 4070 Ti (NVIDIA 595.99.02), 60 s with scripted pad input. Base is `main` 5859889b2 with #6543 and #7250 merged; #7250 takes a whole-range DCC fill of a resident multisampled target as its fast clear. | Build | Result | |---|---| | base | stops at 10 s: `writes to a resident multisampled DCC target or its metadata are not implemented` | | base + this PR (e040cb7f7) | runs to the 60 s limit, 105 presents per 10 s | A local print there showed the DCC range `0x4004606000+0x14000` reading the fill's key with nothing pending when the check failed. That fits a store to a neighbouring range in a shared 64 KiB tracker block, which is what this PR excludes. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-17 20:49:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T20:49:37Z.


Thanks for the independent Ruffle run on the PR head. The base/+PR comparison and the reported 0x4004606000+0x14000 fill state give a useful title-level datapoint for the neighboring-store correction. I agree the run only supports this specific correction: the separate driver-overlap DCC rejection still lacks byte/value proof and should continue to refuse. I have recorded the exact hardware, driver and tested commit.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240823003 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7132#issuecomment-6240823003). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T20:49:37Z. --- Thanks for the independent Ruffle run on the PR head. The base/+PR comparison and the reported `0x4004606000+0x14000` fill state give a useful title-level datapoint for the neighboring-store correction. I agree the run only supports this specific correction: the separate driver-overlap DCC rejection still lacks byte/value proof and should continue to refuse. I have recorded the exact hardware, driver and tested commit.
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!7132
No description provided.