fix(agc): settle DCC colour pages in imported resident runs #21155
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21155"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by VicRaster on 2026-11-15T21:25:55Z.
What
Follow-up to #20534, which must merge first. This branch includes that prerequisite; the additional correction handles cold colour pages inside an already-imported Windows resident run.
A neighbouring subrange import marks the containing resident run imported. The known-zero path deliberately excludes that run, so it can leave untouched colour pages cold when an initial multisample DCC owner captures its generation. A later import's read faults them in and write watching reports those first touches after the baseline, refusing unchanged colour as a resident write.
Materialise every readable, committed host page of the initial watched colour range through existing checked reads before collecting its generation. Metadata retains the known-zero path. Imported-run flags, zero provenance, compared imports, ownership and genuine-write refusals stay unchanged. No memory is cleared and no write-watch history is suppressed.
The synthetic four-sample regression imports a neighbouring 64 KiB subrange of a 2 MiB direct resident run, then checks the cold colour prefix across an overlapping import and an adjacent store. Real zero-over-zero and nonzero colour stores must still refuse.
Manual overlap review
The warning on this PR was reviewed across all 28 named PRs: the direct conflict with #19904 and all 27 incomplete comparisons. All changed-file pages were retrieved; 64 patches in the five shared files were inspected or revalidated against the earlier assessment. The reviewed heads were checked again before this rebase and had not changed.
No duplicate imported-run correction or additional dependency was established. Keep #20534 as the prerequisite. In particular, #20084 does not replace this change: imported runs are excluded from its known-zero spans, and it explicitly leaves
CopyMappedoutside zero synthesis. This PR uses that checked native copy to materialise the actual page before taking the baseline. #16483 preserves an already-valid baseline before later unwatching. Retain both mechanisms when combining them.Pairwise merge checks used main
0694c4cbd6f2df1e7cc95a6681746b4de40d1e70. #19904 merges into main alone but conflicts with main plus this change inagc_driver_sample_multisample_target_tests.cmake; the resolution is the mechanical preservation of both test additions described above. Every other named PR already conflicts with main and introduced no additional conflicting filename with this change included. This does not establish that their conflicting hunks combine automatically.A fresh branch overlap scan after the rebase probed 1,692 PR heads. It reported only #19904 and 26 previously reviewed comparisons that still conflict with main; closed #10049 is no longer reported. The separate function lookup completed across 1,691 open PRs, but its export-name lookup does not establish uniqueness of internal helpers. This is a source-level review of the named warning and pairwise merge checks, not runtime qualification of all PR combinations or a globally clean overlap claim.
Tested
Rebased and revalidated on 16 November 2026 against main
0694c4cbd6f2df1e7cc95a6681746b4de40d1e70. Candidate00bd9f54e757f99c5625439ea65d25b4e19f6bd8retains the exact #20534 head62e9dbca4635c448781f605a5646259149180c53through prerequisite merge332ab7d805d6cdbe0521e152eb46dc0d48b00a45. The rebase preserves the original three non-merge patches unchanged.Windows 11 build 26300, NVIDIA GeForce RTX 3080 Ti, NVIDIA 610.88 (Windows driver 32.0.16.1088); WinLibs GCC 15.2, Release. Khronos validation 1.4.363.1, newer than the pinned Vulkan headers.
Fresh isolated builds of the focused AGC and audio targets. Paired GPU validation uses the same final synthetic test executables and shared runtime dependencies in every arm; only the loaded graphics library is replaced, with hashes recorded. The comparison runtime and source checkout are restored to the candidate afterwards.
Every arm shows 14 actual Khronos layer insertions, no missing-layer message, no VUID, synchronisation hazard or other recognised validation error/warning. No selected GPU test is skipped, disabled or missing. Candidate controls preserve genuine zero/nonzero-store refusals and accept the adjacent store.
The fresh candidate also passes
audio_out2_port_layoutsandaudio_out2_device_state. The previous hosted Windows failure used mainff36fea1572534bfb070fa3313f0573d6e9c10a1, which contained #20960's AudioOut2 output rollback. Its layout assertion expected the first output to remain zero after the second output failed, while the rollback restored the old value. Upstream reverted that change in #21174, already included in the new base. A local comparison with unchanged test executables and runtime dependencies reproduced0xc0000409with the old AudioOut2 source and passed with the reverted source; only the audio library differed. This PR adds no audio fix.Conventions, strict main-sync and whitespace checks pass. No Linux/macOS runtime or performance claim is made; the new direct-memory fixture skips outside Windows. Full hosted builds remain separate.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:41:44Z.
Review: APPROVED
Reviewed — looks good
The review of head
13b394196d66291a5252cc6d424fee261b6782f3found no verified blocking defect; author-reported Windows GPU results were not rerun here.What I ran
Read the prepared description, commit list, manifest, diff, review README, and all five changed files at the pinned head. Followed up on committed-range discovery and mapped copying. No build or test command was run.
Results
Findings
Blocking
None.
Non-blocking
None.
Sources
Behavior reviewed in
GuestMemory.cppandMultisampleTarget.cppat head13b394196d66291a5252cc6d424fee261b6782f3; changed-line references includeGuestMemory.cpp:3448andMultisampleTarget.cpp:1014.Not verified
I did not rerun the author-reported Windows build, GPU tests, Khronos validation, or audio tests. I did not verify the manual PR-overlap audit or its pairwise merge checks. The five changed files read were
GuestMemory.hpp,GuestMemory.cpp,MultisampleTarget.cpp,agc_driver_sample_multisample_target_tests.cmake, andSampleMultisampleTarget.cpp; all five files listed as reviewed in the manifest were read.files.jsonwas not available in the prepared review folder.To get this to a good state
Nothing is required. The Windows build and GPU checks are optional confirmation for this source review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T01:28:02Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation and included regression coverage support the stated imported-run DCC correction.
What I ran
Reviewed head
ce886eae4dc7af02c039363a1a080d87f2ba1a24. I inspected the prepared diff and all five changed files included in the review bundle, plus the relevantCommittedRanges,CopyMapped, and DCC baseline code. I did not run build or test commands.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Builds and runtime tests were not run during this review. The description reports Windows GPU test results, which are author-reported. No Linux or macOS runtime behavior was confirmed; the imported resident-run fixture is Windows-only.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T07:12:02Z.
Review: COMMENTED
Actionable comments
31feb743-0edf-43db-aa17-3fd2db80c14aReviewing files that changed from the base of the PR and between
96401c8077and610b9ce89b.core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cppcore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_sample_multisample_target_tests.cmakecore/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T07:15:42Z.
Review: APPROVED
Reviewed — looks good
The changed code addresses the imported resident run case, and the reviewed evidence supports merging.
What I ran
Reviewed head
610b9ce89b2d600dd4961e23c5d32169f42df219using the pinnedrepo_read.pyreader. The environment was read-only; no tests or builds were run. The author-reported test results below were not run by me.Results
Negative control
Not run by me. The author reports controls that preserve refusal for genuine zero and nonzero stores.
Findings
Blocking
None.
Non-blocking
None.
Sources
The five changed files marked reviewed in
manifest.jsonwere inspected at their changed hunks and relevant context;files.jsonlists no excluded files.CopyMappedbefore returning.Not verified
No tests or builds were independently run. Windows runtime behavior, other operating systems, and hardware beyond the author-reported Windows 11 and RTX 3080 Ti run were not independently verified.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T08:07:56Z.
Review: APPROVED
Reviewed — looks good
The initial DCC color path now touches readable committed pages before taking the write-generation baseline, and I found no blocking defect in the six changed files.
What I ran
Reviewed head
1a9446dec15256250abd8835c17926d68c92f5deusing the pinnedrepo_read.pyreader and the prepared diff. The reader returned the requested source ranges but could not append its read log under read-only permissions. No tests or builds were run by me.Read all six changed files listed in
files.json:GuestMemory.hpp,GuestMemory.cpp,MultisampleTarget.hpp,MultisampleTarget.cpp,agc_driver_sample_multisample_target_tests.cmake, andSampleMultisampleTarget.cpp. The manifest lists no excluded files.Results
Negative control
Not run by me. The author reports the regression test preserves real zero and nonzero store refusals and checks retry after an injected materialization failure.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
I did not run the Windows GPU tests or verify behavior on Linux/macOS or physical console hardware. The PR description reports Windows 11 / RTX 3080 Ti runs; those are author-reported results.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T08:09:02Z.
Review: COMMENTED
Actionable comments
b5de9848-fe7a-4f4e-9b5c-67c348157d6aReviewing files that changed from the base of the PR and between
610b9ce89band1a9446dec1.core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hppcore/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cppcore/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T08:24:17Z.
Review: COMMENTED
Actionable comments
core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp, lines2623· 🩺 Stability & Availability · ⚡ Quick winbind(recreated)already callsKeep(). If the injected draw uses the same open batch, that earlier call retains the image even when the new recreationKeep()is removed. The test can therefore miss the resource-lifetime regression.c59568bc-359c-4dae-b696-829ca1d06dc3Reviewing files that changed from the base of the PR and between
1a9446dec1andbaf12fd192.core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hppcore/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cppcore/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T08:35:55Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this; the inspected source supports merging.
What I ran
Reviewed head
c6672f57cb4efee0eb971417f78447b328d924bdagainstmainusing the prepared diff andrepo_read.py. No merged-preview check or tests were run.Read all six changed files listed under
reviewedinfiles.json, including every added line shown in the diff. No files were excluded.Results
Negative control
Not run by this reviewer. The description reports author-run controls for genuine zero and nonzero stores; those results were not independently verified.
Findings
Blocking
None.
Non-blocking
None.
Sources
The new checked read visits committed color pages before collecting the initial generation (GuestMemory.cpp, MultisampleTarget.cpp). Recreation retains the target through recorded work and retires it if recreation fails (MultisampleTarget.cpp). The added Windows fixture covers imported-run pages and failure/retry cases (SampleMultisampleTarget.cpp, SampleMultisampleTarget.cpp).
Not verified
Author-reported Windows GPU tests, builds, validation-layer results, and audio checks were not run by this reviewer. Linux/macOS runtime behavior was not tested.
To get this to a good state
No follow-up is required. No commands need rerunning unless the reviewed head changes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T08:38:05Z.
Review: COMMENTED
Actionable comments
608ea8d1-4ac5-45b1-82e6-53fcb586bb99Reviewing files that changed from the base of the PR and between
baf12fd192andc6672f57cb.core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:18:15Z.
Review: COMMENTED
The trial merge onto
a1b75b0947was clean. I checked the path that temporarily removes guarded ranges during recreation and retires the target on failure before refreshing the unmap observer. The resident-run fixtures distinguish neighboring imports from overlapping imports and distinguish an actual zero store from demand-zero memory. Keep those controls together, since the decision depends on both address range and write evidence. Paired multisample validation is pending.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.