Skip to content

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

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
MarcZX10:codex/fix-adjacent-dcc-store-5336
Oct 17, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
MarcZX10:codex/fix-adjacent-dcc-store-5336

Conversation

@MarcZX10

Copy link
Copy Markdown
Contributor

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: fix(agc): identify invalidated multisample DCC ranges #6869 (shared DCC validation path and fixture; rebase after it merges)
  • Fixes: none; this does not establish a fix for issue AGC: normal rendering to an 8x MSAA DCC color target is refused (PPSA99902) #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.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

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

@akkadbakkad89

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

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.

@github-actions github-actions Bot added the agc libSceAgc* label Oct 17, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

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

Amoenus commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@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.

@MarcZX10

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor

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 5859889 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 (e040cb7) 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

Copy link
Copy Markdown
Contributor Author

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.

@oneandonlydean
oneandonlydean merged commit 2788ed5 into boykopovar:main Oct 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants