feat(agc): publish completed native color snapshots #6989

Merged
Amoenus merged 111 commits from upstream-pr/6989 into main 2026-11-29 05:44:35 +00:00
Amoenus commented 2026-10-17 02:10:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T02:10:59Z.


What

Publish completed native MSAA color snapshots into registered guest memory before retiring their owner, for supported single-layer uncompressed R_X targets. Preserve compression state and reject unsupported raw imports/publication. Mapping pins honor HostWritable, including GPU-only writable mappings. The refresh preserves published history and integrates main 72a366bbe440.

Tested

25 November head a4516c95064020d9a1c57d2201aab23b2397f943, tested main 72a366bbe44057f7c5cc3e348b08aa46cb247292: full native libraries/relinker and selected real fixtures build; 74 physical-GPU testcase processes plus one Graphics host suite pass. No failures, skips or validation warnings/errors. The matched main matrix passes 54 GPU processes plus one host suite, including DCC-unwatch after merged #22950. Capability fixtures absent on main are reported separately from common cases.

Windows 11 Enterprise 10.0.26200, WinLibs GCC 15.2.0 UCRT r7, Release. NVIDIA RTX 5080 (10de:2c02), 621.01/32.0.16.2101; AMD Radeon Graphics (1002:13c0), 32.0.21045.16010. Required Vulkan, application shader cache off, Khronos 1.4.363; actual device/layer verified per process.

Exact sources, commands, raw logs and limits. The four native-depth recurrence cases use the unchanged main fixture; the matrix also includes main's new depth-to-color initial-owner and cold 2x/8x FMASK cases. Historical 20 November controls retain their own pins in the earlier report.

No fresh Linux execution of this head, console-equivalence, game/FPS, full CTest or analyzer-clean result is claimed. Quarantined shader-memory/cache executables remain unbuilt/unrun. Earlier independent Linux Pascal results on #6989/#6995 retain the old 2ecf7da072 / 4cc7d22168 plus main 3bf7091b75 pins; requested RTX 4090 confirmation remains outstanding.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5080 (10de:2c02), 621.01 / Windows 32.0.16.2101; AMD Radeon(TM) Graphics (1002:13c0), Windows 32.0.21045.16010; Windows 11 Enterprise 10.0.26200; Khronos validation 1.4.363
  • AI-assisted: yes (Codex); author responsible
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4896434905 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T02:10:59Z. --- ### What Publish completed native MSAA color snapshots into registered guest memory before retiring their owner, for supported single-layer uncompressed R_X targets. Preserve compression state and reject unsupported raw imports/publication. Mapping pins honor HostWritable, including GPU-only writable mappings. The refresh preserves published history and integrates main `72a366bbe440`. ### Tested 25 November head `a4516c95064020d9a1c57d2201aab23b2397f943`, tested main `72a366bbe44057f7c5cc3e348b08aa46cb247292`: full native libraries/relinker and selected real fixtures build; **74 physical-GPU testcase processes plus one Graphics host suite pass**. No failures, skips or validation warnings/errors. The matched main matrix passes 54 GPU processes plus one host suite, including DCC-unwatch after merged #22950. Capability fixtures absent on main are reported separately from common cases. Windows 11 Enterprise 10.0.26200, WinLibs GCC 15.2.0 UCRT r7, Release. NVIDIA RTX 5080 (10de:2c02), 621.01/32.0.16.2101; AMD Radeon Graphics (1002:13c0), 32.0.21045.16010. Required Vulkan, application shader cache off, Khronos 1.4.363; actual device/layer verified per process. [Exact sources, commands, raw logs and limits](https://gist.github.com/Amoenus/f1b72cd86791eb05b3badabc1377df11). The four native-depth recurrence cases use the unchanged main fixture; the matrix also includes main's new depth-to-color initial-owner and cold 2x/8x FMASK cases. Historical 20 November controls retain their own pins in the [earlier report](https://gist.github.com/Amoenus/3cfc704437e977bdb9b99f30f46763bc). No fresh Linux execution of this head, console-equivalence, game/FPS, full CTest or analyzer-clean result is claimed. Quarantined shader-memory/cache executables remain unbuilt/unrun. Earlier independent Linux Pascal results on #6989/#6995 retain the old `2ecf7da072` / `4cc7d22168` plus main `3bf7091b75` pins; requested RTX 4090 confirmation remains outstanding. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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) and the licence notice of code adapted from upstream (see AGENTS.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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> NVIDIA GeForce RTX 5080 (10de:2c02), 621.01 / Windows 32.0.16.2101; AMD Radeon(TM) Graphics (1002:13c0), Windows 32.0.21045.16010; Windows 11 Enterprise 10.0.26200; Khronos validation 1.4.363 - [x] AI-assisted: <!-- yes / no --> yes (Codex); author responsible
akkadbakkad89 commented 2026-10-17 08:14:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-17T08:14:18Z.


Runtime datapoint on NVIDIA hardware. RTX 3070, Ampere, driver 617.42, Windows 11 26200, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1. Head 230b963a1, all binaries rebuilt on this head, ctest serial:

Test Result
agc_driver_native_color_publication pass
agc_driver_native_color_snapshot pass
agc_driver_native_color_readback pass
agc_driver_native_color_initial pass
agc_driver_msaa_layout pass
agc_driver_multisample_readback_* (uint8/16/64/128, depth, upload) pass x6
agc_driver_sample_multisample_target pass
agc_driver_sample_mask_multisample pass

14/14 pass on Ampere — the guest-write publication path holds.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231612217 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989#issuecomment-6231612217). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-17T08:14:18Z. --- Runtime datapoint on NVIDIA hardware. RTX 3070, Ampere, driver 617.42, Windows 11 26200, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1. Head 230b963a1, all binaries rebuilt on this head, ctest serial: | Test | Result | |---|---| | agc_driver_native_color_publication | pass | | agc_driver_native_color_snapshot | pass | | agc_driver_native_color_readback | pass | | agc_driver_native_color_initial | pass | | agc_driver_msaa_layout | pass | | agc_driver_multisample_readback_* (uint8/16/64/128, depth, upload) | pass x6 | | agc_driver_sample_multisample_target | pass | | agc_driver_sample_mask_multisample | pass | 14/14 pass on Ampere — the guest-write publication path holds.
oneandonlydean commented 2026-10-20 23:38:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T23:38:53Z.


@Amoenus Thanks for restacking #6987 onto #6973's 419ad899c6; the review carries. #6989 (3e728aadc5), #6995 (7b090b67d0) and #7002 (0cdc81ae9f, conflicting with main) don't contain 419ad899c6 yet. Could you restack those three the same way? We'll run CI on each new head, then gate the stack together.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304260587 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989#issuecomment-6304260587). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T23:38:53Z. --- @Amoenus Thanks for restacking #6987 onto #6973's `419ad899c6`; the review carries. #6989 (`3e728aadc5`), #6995 (`7b090b67d0`) and #7002 (`0cdc81ae9f`, conflicting with `main`) don't contain `419ad899c6` yet. Could you restack those three the same way? We'll run CI on each new head, then gate the stack together.
Amoenus commented 2026-10-20 23:56:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-20T23:56:17Z.


@oneandonlydean done: #6989 d5df0079b9, #6995 15a590902f, and #7002 86571871ac are pushed and each retains 419ad899c6. #7002 now merges cleanly with checked main 5b59fbc553 too.

Full incremental builds and focused checks are recorded per head in the descriptions; known AMD failures remain explicit. The maintained stack reply has the compact head/result table. AI-assisted: yes (Codex).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304490267 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989#issuecomment-6304490267). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-20T23:56:17Z. --- @oneandonlydean done: #6989 `d5df0079b9`, #6995 `15a590902f`, and #7002 `86571871ac` are pushed and each retains `419ad899c6`. #7002 now merges cleanly with checked main `5b59fbc553` too. Full incremental builds and focused checks are recorded per head in the descriptions; known AMD failures remain explicit. The [maintained stack reply](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6302351411) has the compact head/result table. AI-assisted: yes (Codex).
oneandonlydean commented 2026-10-21 10:14:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T10:14:41Z.


@Amoenus this PR is stacked on #6973 and inherits its conflicts with main in Texture.hpp and MultisampleTarget.cpp; see the note on #6973. Please rebase it after #6973 is reworked on current main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6313515111 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989#issuecomment-6313515111). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T10:14:41Z. --- @Amoenus this PR is stacked on #6973 and inherits its conflicts with `main` in `Texture.hpp` and `MultisampleTarget.cpp`; see the note on #6973. Please rebase it after #6973 is reworked on current `main`.
CnRJay commented 2026-10-21 17:42:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-21T17:42:56Z.

Review: COMMENTED


Careful on the commit side (pins the mappings over the footprint, checks pending writes and overlapping native owners, rechecks the original bytes inside write tracking, commits only the changed runs, and retires the owner only after the commit). The issue is what it is for.

"Automatic consumer wiring, cached draw-recipe routing, general metadata/depth publication, console equivalence and concurrent unsynchronized guest writes remain separate", and no new title or performance claim. So the change adds an internal publisher with no caller outside its tests: code that nothing in main can reach, plus a debt entry for what it doesn't do. A reviewer can't judge whether the restrictions (completed, uncompressed, single-layer, R_X snapshots only) cover the cases a consumer needs, because the consumer isn't there.

  • Merge it with the first consumer, or name the consumer PR and what it will call, so the surface area is reviewed against a use. A publisher that the real caller later needs to widen (compressed, multi-layer) is a rewrite that this review would have approved the wrong shape of.
  • It sits on #6987 and the five files of this range are +203/-4; the description's "current parent-to-head range" shows the real size. Please rebase when #6987 lands so the diff here is just the publisher.
  • If it stays internal, the test should be the only thing exercising a path that writes guest memory and retires a native owner. Say how a future caller is kept from calling it with a snapshot that the restrictions exclude (the description says precommit failures retain ownership and the existing refusal; make sure it throws rather than returns a flag nobody checks).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5603821185 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989#pullrequestreview-5603821185). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-10-21T17:42:56Z. **Review:** COMMENTED --- Careful on the commit side (pins the mappings over the footprint, checks pending writes and overlapping native owners, rechecks the original bytes inside write tracking, commits only the changed runs, and retires the owner only after the commit). The issue is what it is for. "Automatic consumer wiring, cached draw-recipe routing, general metadata/depth publication, console equivalence and concurrent unsynchronized guest writes remain separate", and no new title or performance claim. So the change adds an internal publisher with no caller outside its tests: code that nothing in `main` can reach, plus a debt entry for what it doesn't do. A reviewer can't judge whether the restrictions (completed, uncompressed, single-layer, R_X snapshots only) cover the cases a consumer needs, because the consumer isn't there. - Merge it with the first consumer, or name the consumer PR and what it will call, so the surface area is reviewed against a use. A publisher that the real caller later needs to widen (compressed, multi-layer) is a rewrite that this review would have approved the wrong shape of. - It sits on #6987 and the five files of this range are +203/-4; the description's "current parent-to-head range" shows the real size. Please rebase when #6987 lands so the diff here is just the publisher. - If it stays internal, the test should be the only thing exercising a path that writes guest memory and retires a native owner. Say how a future caller is kept from calling it with a snapshot that the restrictions exclude (the description says precommit failures retain ownership and the existing refusal; make sure it throws rather than returns a flag nobody checks).
MarcZX10 commented 2026-11-16 17:00:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T17:00:32Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this review; the points below are optional.

What I ran

Reviewed head 952422213c4d6acbb25165716c934b36f204200b. No commands or tests were run in this review. The author reports selected builds and GPU test runs in the PR description; these are author-reported, not independently verified.

Results

Check Result Note
Diff and changed code passed All five changed files read
Tests and builds not run Author reports selected builds and GPU runs
Cache tests not run Author reports local quarantine; no pass claimed

Findings

Blocking

None.

Non-blocking

  • Console equivalence, unsynchronized guest writes during commit, and large-title costs remain unverified, as the change documentation states.

Not verified

No builds or tests were run by this review. The author reports 30 GPU testcase processes and one Graphics CPU process passed, along with selected builds; these results were not independently checked. Cache-test execution was blocked locally according to the description. Console behavior and fresh title/FPS validation were not verified. All changed files listed as reviewed in manifest.json were read; files.json was not present in the available review bundle.

To get this to a good state

Nothing is required. Optional: add console or title validation when available.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5924014971 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989#pullrequestreview-5924014971). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T17:00:32Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this review; the points below are optional. ## What I ran Reviewed head `952422213c4d6acbb25165716c934b36f204200b`. No commands or tests were run in this review. The author reports selected builds and GPU test runs in the PR description; these are author-reported, not independently verified. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | All five changed files read | | Tests and builds | not run | Author reports selected builds and GPU runs | | Cache tests | not run | Author reports local quarantine; no pass claimed | ## Findings ### Blocking None. ### Non-blocking - Console equivalence, unsynchronized guest writes during commit, and large-title costs remain unverified, as the change documentation states. ## Not verified No builds or tests were run by this review. The author reports 30 GPU testcase processes and one Graphics CPU process passed, along with selected builds; these results were not independently checked. Cache-test execution was blocked locally according to the description. Console behavior and fresh title/FPS validation were not verified. All changed files listed as reviewed in `manifest.json` were read; `files.json` was not present in the available review bundle. ## To get this to a good state Nothing is required. Optional: add console or title validation when available.
MarcZX10 commented 2026-11-20 13:22:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T13:22:12Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the reviewed code and reported focused checks support merging.

What I ran

Reviewed head 0c46b854f1ce930c3a7c63eda25cac5ac6815b2c. I read the PR description, commit list, manifest and diff, then inspected the changed publication, decoder, test and debt documentation code through repo_read.py. I did not run commands or tests.

Results

Check Result Note
Changed code review passed No concrete defect found in inspected code
Focused GPU and host checks not run Results are author-reported
Full CTest and excluded executables not run Not claimed in the description

Findings

Blocking

None.

Non-blocking

None.

Not verified

The changed Graphics.cpp and SampleMultisampleTarget.cpp files were listed as reviewed but their complete contents were not included in the review folder; only targeted ranges were read through repo_read.py. The full files were not read. GPU checks, full CTest, shader-memory/cache executables, console behavior and unwatched-memory generation proof were not independently verified. The description reports focused GPU and Graphics host-suite checks on the exact head; these are author-reported results.

Files read: description.md, commits.md, manifest.json, diff.patch; MultisampleTarget.hpp, MultisampleTarget.cpp, State.cpp, targeted ranges of Graphics.cpp and SampleMultisampleTarget.cpp, agc_driver_sample_multisample_target_tests.cmake, and native-color-publication.md. No other changed files were read; the tests files above were read only in targeted ranges.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5993350680 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989#pullrequestreview-5993350680). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T13:22:12Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the reviewed code and reported focused checks support merging. ## What I ran Reviewed head `0c46b854f1ce930c3a7c63eda25cac5ac6815b2c`. I read the PR description, commit list, manifest and diff, then inspected the changed publication, decoder, test and debt documentation code through `repo_read.py`. I did not run commands or tests. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | No concrete defect found in inspected code | | Focused GPU and host checks | not run | Results are author-reported | | Full CTest and excluded executables | not run | Not claimed in the description | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The changed `Graphics.cpp` and `SampleMultisampleTarget.cpp` files were listed as reviewed but their complete contents were not included in the review folder; only targeted ranges were read through `repo_read.py`. The full files were not read. GPU checks, full CTest, shader-memory/cache executables, console behavior and unwatched-memory generation proof were not independently verified. The description reports focused GPU and Graphics host-suite checks on the exact head; these are author-reported results. Files read: `description.md`, `commits.md`, `manifest.json`, `diff.patch`; `MultisampleTarget.hpp`, `MultisampleTarget.cpp`, `State.cpp`, targeted ranges of `Graphics.cpp` and `SampleMultisampleTarget.cpp`, `agc_driver_sample_multisample_target_tests.cmake`, and `native-color-publication.md`. No other changed files were read; the tests files above were read only in targeted ranges. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-21 01:24:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T01:24:08Z.

Review: APPROVED


Reviewed — looks good

The changed production paths and all listed non-test files were reviewed at head 2ecf7da07270a679c3319e575121b8262261a2c6; no concrete blocking defect was found. The full oversized graphics test source and the supplied build and runtime claims were not independently verified.

What I ran

No commands or tests were run. I read the prepared description, commits, manifest, diff, and targeted source ranges through repo_read.py.

Results

Check Result Note
Source review passed Production changes and debt note inspected
Tests not run Author-reported runs only

Findings

Blocking

None.

Non-blocking

None.

Not verified

The oversized changed file core/libs/prx/libSceAgcDriver/tests/Graphics.cpp was excluded by the review bundle and was not read. The included SampleMultisampleTarget.cpp was not read. No build or test command was run; the hardware, driver, fixture, and CI claims in the description are author-reported. Other than the excluded Graphics.cpp, all changed files in the manifest were included; relevant ranges of production source were inspected, rather than every line of each file. No repository files were excluded by files.json because that file was not available through the reader.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6001764552 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6989#pullrequestreview-6001764552). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T01:24:08Z. **Review:** APPROVED --- # Reviewed — looks good The changed production paths and all listed non-test files were reviewed at head `2ecf7da07270a679c3319e575121b8262261a2c6`; no concrete blocking defect was found. The full oversized graphics test source and the supplied build and runtime claims were not independently verified. ## What I ran No commands or tests were run. I read the prepared description, commits, manifest, diff, and targeted source ranges through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Production changes and debt note inspected | | Tests | not run | Author-reported runs only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The oversized changed file `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` was excluded by the review bundle and was not read. The included `SampleMultisampleTarget.cpp` was not read. No build or test command was run; the hardware, driver, fixture, and CI claims in the description are author-reported. Other than the excluded `Graphics.cpp`, all changed files in the manifest were included; relevant ranges of production source were inspected, rather than every line of each file. No repository files were excluded by `files.json` because that file was not available through the reader. ## To get this to a good state Nothing is required.
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!6989
No description provided.