feat(agc): upload nonuniform initial multisample draw contents #16086

Merged
Amoenus merged 4 commits from upstream-pr/16086 into main 2026-11-07 11:48:17 +00:00
Amoenus commented 2026-11-05 16:22:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-11-05T16:22:01Z.


What

Preserve differing initial samples of a plain R_X multisample color target at its first partial draw. Main zero-initializes the new image; #15986 preserves uniform values but rejects nonuniform contents. This follow-up feeds the safely captured bytes into the existing detile/compute uploader, retaining its caller-pool buffer through recorder completion and releasing it afterward. Ownership and guest bytes are rechecked before target creation.

Depends on #15986 (including #15985). This replaces the nonuniform initialization/lifetime portion of reverted #6973; it does not restore constructor-time guest reads or generic sampled-image layout changes. #6987 now adapts the saved guest baseline/readback onto this prerequisite (validation); the publisher and automatic-consumer refreshes remain outstanding.

The upload uses existing layout and shader semantics. Host requirements follow Vulkan buffer lifetime and multisample/formatless storage-write features; console equivalence remains unmeasured in library debt. StepFPV's depth-owner diagnosis informed the preserved nonmutating preflight.

Overlap review found no independent duplicate. #9508 changes the neighboring constructor inheritance and upload's heap owner argument: keep its HeapSlotOwner/dispatch owner when combining. This is a coordination point, not a semantic dependency; no combined heap validation is claimed. #6987 is adapted onto this initializer; the publisher and automatic consumers still require their own refresh.

Tested

Final head 45414a37afa68fe33eafa63d9ff9cc6c554639d1 is based on main 07fae3d172f4ffcdd8fb0eed76a475a8630e716d. The first pinned refresh at main 6185bdcfc4e05bbc5a7b61a74ba6345f941a2b6e passed 36 physical-GPU processes; the focused follow-up on this final head passes 16, with the exact group/source breakdown in the sweep report, commands, raw logs and hashes. Both use RTX5080 and AMD iGPU on the same machine. Main controls pass32 processes at the first pin and26 at the final pin; absent new capability registrations are not counted as main passes.

The final selection covers all four nonuniform upload/lifetime/capability/hook groups, uniform initialization and the three submit-progress modes. The repro-test and implementation commits remain separate, with unchanged topic patches. The old independent submit-progress failure remains recorded; its test-only-main arm did not build. Both new main and this head include the subsequent cold-deadline correction and pass locally; that does not establish the independent host result without a rerun.

Full configured native libraries/relinker and the selected real execution targets build. Required Vulkan, app shader cache/journal disabled, serial verbose CTest with30-second bound, loaded Khronos1.4.363 and actual device identity verified per GPU process. No skips, VUIDs, SYNC diagnostics or validation warnings/errors. Selected CPU checks, conventions and whitespace pass. Added/removed topic lines are unchanged by these mechanical updates; no new implementation or title/FPS claim. The newer main changes shared f16 probing/target/request serialization, which is why the focused follow-up was run.

Earlier qualification/fault controls retain their original pins: evidence 1, evidence 2. They are not rerun-control claims at this new head.

The green hosted Windows job is a narrow registration/link/changed-guest-test check; full build, libs and AGC CTest were skipped. Full hosted Linux/Windows validation remains a maintainer action, and older independent reports retain their actual heads.

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: #15986
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5080, driver621.01 /32.0.16.2101; AMD Radeon Graphics iGPU, Vulkan26.10.1 /Windows32.0.21045.16010; Windows11 Enterprise26200; loaded Khronos1.4.363.
  • AI-assisted: yes (Codex); author responsible
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5174896220 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16086). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-11-05T16:22:01Z. --- ### What Preserve differing initial samples of a plain R_X multisample color target at its first partial draw. Main zero-initializes the new image; #15986 preserves uniform values but rejects nonuniform contents. This follow-up feeds the safely captured bytes into the existing detile/compute uploader, retaining its caller-pool buffer through recorder completion and releasing it afterward. Ownership and guest bytes are rechecked before target creation. Depends on #15986 (including #15985). This replaces the nonuniform initialization/lifetime portion of reverted #6973; it does not restore constructor-time guest reads or generic sampled-image layout changes. #6987 now adapts the saved guest baseline/readback onto this prerequisite ([validation](https://gist.github.com/Amoenus/d7b35d3b676be1682cca2bc1362c0d99#file-report-md)); the publisher and automatic-consumer refreshes remain outstanding. The upload uses existing layout and shader semantics. Host requirements follow [Vulkan buffer lifetime](https://docs.vulkan.org/refpages/latest/refpages/source/vkDestroyBuffer.html) and [multisample/formatless storage-write features](https://docs.vulkan.org/refpages/latest/refpages/source/VkPhysicalDeviceFeatures.html); console equivalence remains unmeasured in library debt. StepFPV's [depth-owner diagnosis](https://github.com/boykopovar/AnyPS5/pull/15935#issuecomment-6648293849) informed the preserved nonmutating preflight. Overlap review found no independent duplicate. #9508 changes the neighboring constructor inheritance and upload's heap owner argument: keep its HeapSlotOwner/dispatch owner when combining. This is a coordination point, not a semantic dependency; no combined heap validation is claimed. #6987 is adapted onto this initializer; the publisher and automatic consumers still require their own refresh. ### Tested <!-- 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. --> Final head `45414a37afa68fe33eafa63d9ff9cc6c554639d1` is based on main `07fae3d172f4ffcdd8fb0eed76a475a8630e716d`. The first pinned refresh at main `6185bdcfc4e05bbc5a7b61a74ba6345f941a2b6e` passed **36 physical-GPU processes**; the focused follow-up on this final head passes **16**, with the exact group/source breakdown in the [sweep report, commands, raw logs and hashes](https://gist.github.com/Amoenus/a21b8d408b1de9d928ee6de016834a75#file-report-md). Both use RTX5080 and AMD iGPU on the same machine. Main controls pass32 processes at the first pin and26 at the final pin; absent new capability registrations are not counted as main passes. The final selection covers all four nonuniform upload/lifetime/capability/hook groups, uniform initialization and the three submit-progress modes. The repro-test and implementation commits remain separate, with unchanged topic patches. The old independent submit-progress failure remains recorded; its test-only-main arm did not build. Both new main and this head include the subsequent cold-deadline correction and pass locally; that does not establish the independent host result without a rerun. Full configured native libraries/relinker and the selected real execution targets build. Required Vulkan, app shader cache/journal disabled, serial verbose CTest with30-second bound, loaded Khronos1.4.363 and actual device identity verified per GPU process. No skips, VUIDs, SYNC diagnostics or validation warnings/errors. Selected CPU checks, conventions and whitespace pass. Added/removed topic lines are unchanged by these mechanical updates; no new implementation or title/FPS claim. The newer main changes shared f16 probing/target/request serialization, which is why the focused follow-up was run. Earlier qualification/fault controls retain their original pins: [evidence 1](https://gist.github.com/Amoenus/d7b35d3b676be1682cca2bc1362c0d99), [evidence 2](https://gist.github.com/Amoenus/d556ae467306b2706ea88afb3e156e70). They are not rerun-control claims at this new head. The green hosted Windows job is a narrow registration/link/changed-guest-test check; full build, libs and AGC CTest were skipped. Full hosted Linux/Windows validation remains a maintainer action, and older independent reports retain their actual heads. ### 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) - [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 --> #15986 - [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, driver621.01 /32.0.16.2101; AMD Radeon Graphics iGPU, Vulkan26.10.1 /Windows32.0.21045.16010; Windows11 Enterprise26200; loaded Khronos1.4.363. - [x] AI-assisted: <!-- yes / no --> yes (Codex); author responsible
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!16086
No description provided.