feat(agc): preserve uniform initial multisample draw contents #15986

Merged
Amoenus merged 2 commits from upstream-pr/15986 into main 2026-11-07 11:48:19 +00:00
Amoenus commented 2026-11-05 06:13:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-11-05T06:13:24Z.


What

Preserve an exactly representable texel repeated over the complete mapped plain multisample color footprint at its first actual draw. Main clears the new native image to zero, so a partial draw loses the untouched initial samples. This slice captures outside the targets lock, checks depth/color ownership without retiring it, and initializes through the existing exact native clear. Nonuniform, unmapped, unsupported and unresolved-alias inputs throw.

This replaces only the uniform initial-draw part of reverted #6973. It excludes nonuniform R_X uploads, staging lifetime/accounting, guest publication and generic sampled-layout changes. The first commit is test-only prerequisite #15985; the feature itself is one commit. The nonuniform follow-up is now #16086; #6987 now supplies the saved-baseline/readback adaptation. #6989/#6995/#7002 still need their publisher/consumer refresh; this PR alone does not unblock that stack.

Attribution: StepFPV's depth-owner diagnosis and overlap-query idea informed the nonmutating preflight; this does not adopt the proposed zero-clear fallback. Host clear behavior follows vkCmdClearColorImage using existing AnyPS5 footprint/format conversion. Console equivalence and remaining paths are recorded in library debt.

Tested

Final head af5bfe4e5e74e2ff57a7726e6d013452904e7b92 is based on main 07fae3d172f4ffcdd8fb0eed76a475a8630e716d. The first pinned refresh at main 6185bdcfc4e05bbc5a7b61a74ba6345f941a2b6e passed 22 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 includes all three uniform/refusal/capture-hook groups, the four #15964 depth regression groups and ordinary multisample sampling. Its own feature commit remains separate from #15985. The first comparison also retains the corrected backing/order fixtures. Original alias/view assertions are retained; these are not restored constructor-time guest reads or a generic sampled-layout rewrite.

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: #15985
  • 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:5167070626 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15986). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-11-05T06:13:24Z. --- ### What Preserve an exactly representable texel repeated over the complete mapped plain multisample color footprint at its first actual draw. Main clears the new native image to zero, so a partial draw loses the untouched initial samples. This slice captures outside the targets lock, checks depth/color ownership without retiring it, and initializes through the existing exact native clear. Nonuniform, unmapped, unsupported and unresolved-alias inputs throw. This replaces only the uniform initial-draw part of reverted #6973. It excludes nonuniform R_X uploads, staging lifetime/accounting, guest publication and generic sampled-layout changes. The first commit is test-only prerequisite #15985; the feature itself is one commit. The nonuniform follow-up is now #16086; #6987 now supplies the saved-baseline/readback adaptation. #6989/#6995/#7002 still need their publisher/consumer refresh; this PR alone does not unblock that stack. Attribution: StepFPV's [depth-owner diagnosis and overlap-query idea](https://github.com/boykopovar/AnyPS5/pull/15935#issuecomment-6648293849) informed the nonmutating preflight; this does not adopt the proposed zero-clear fallback. Host clear behavior follows [vkCmdClearColorImage](https://docs.vulkan.org/refpages/latest/refpages/source/vkCmdClearColorImage.html) using existing AnyPS5 footprint/format conversion. Console equivalence and remaining paths are recorded in library debt. ### 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 `af5bfe4e5e74e2ff57a7726e6d013452904e7b92` is based on main `07fae3d172f4ffcdd8fb0eed76a475a8630e716d`. The first pinned refresh at main `6185bdcfc4e05bbc5a7b61a74ba6345f941a2b6e` passed **22 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 includes all three uniform/refusal/capture-hook groups, the four #15964 depth regression groups and ordinary multisample sampling. Its own feature commit remains separate from #15985. The first comparison also retains the corrected backing/order fixtures. Original alias/view assertions are retained; these are not restored constructor-time guest reads or a generic sampled-layout rewrite. 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/faa24d97ccee8fbc791d5591d1698f5c), [evidence 2](https://gist.github.com/Amoenus/1e7fc306b46f2d795c5d35c1fe668bd1). 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 --> #15985 - [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!15986
No description provided.