fix(agc): sample multisampled colour targets in a same-size format #18652

Merged
DealPotato merged 1 commit from upstream-pr/18652 into main 2026-11-15 02:28:14 +00:00
DealPotato commented 2026-11-12 00:01:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DealPotato on 2026-11-12T00:01:24Z.


What

A compute shader of WWE 2K26 (PPSA34299) reads its 4x B10G11R11 colour target as R32_UINT. A multisampled target sampled in another format of the same texel size is now copied, per use, into a multisampled image of that format, when the device can sample one; the copy image is kept with the target and released with it.

Tested

Windows 11 Pro (build 26300), NVIDIA GeForce RTX 4070, driver 610.88. Focused tests run with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V on main (3a0a54bbd8) and on this change, from one build directory; the loader inserted the validation layer in both runs.

Passed on main (without the new case) and on the change: agc_driver_multisample_retirement. Neither log has a VUID- message. The build also held four other fixes for the same title on other code; two of them are opened as pull requests next to this one.

The new agc_driver_multisample_retirement case reads a 4x B10G11R11 target as R32_UINT: it gets a copy image of its own, the next read reuses it, and both are released with the target.

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: none
  • Fixes: none
  • Unblocks: PPSA34299 (WWE 2K26; no Game bring-up discussion yet)
  • GPUs tested: NVIDIA GeForce RTX 4070, driver 610.88, Windows 11 Pro (build 26300)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5268720479 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18652). Originally posted by [DealPotato](https://github.com/DealPotato) on 2026-11-12T00:01:24Z. --- ### What A compute shader of WWE 2K26 (PPSA34299) reads its 4x B10G11R11 colour target as R32_UINT. A multisampled target sampled in another format of the same texel size is now copied, per use, into a multisampled image of that format, when the device can sample one; the copy image is kept with the target and released with it. ### Tested Windows 11 Pro (build 26300), NVIDIA GeForce RTX 4070, driver 610.88. Focused tests run with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V` on `main` (3a0a54bbd8) and on this change, from one build directory; the loader inserted the validation layer in both runs. Passed on `main` (without the new case) and on the change: `agc_driver_multisample_retirement`. Neither log has a `VUID-` message. The build also held four other fixes for the same title on other code; two of them are opened as pull requests next to this one. The new `agc_driver_multisample_retirement` case reads a 4x B10G11R11 target as R32_UINT: it gets a copy image of its own, the next read reuses it, and both are released with the target. ### Checklist - [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: none - [x] Fixes: none - [x] Unblocks: PPSA34299 (WWE 2K26; no Game bring-up discussion yet) - [x] GPUs tested: NVIDIA GeForce RTX 4070, driver 610.88, Windows 11 Pro (build 26300) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-12 00:36:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T00:36:50Z.

Review: APPROVED


Reviewed — looks good

The change copies a multisampled target into a same-size sampled format when direct sampling is unavailable, reuses that copy for repeated reads, and retains it with the target; I found no blocking defect.

What I ran

Head 3455540f174dd9e941d0ebac47a11b47a56ffb54; base 80b5a5016f352cf0298bd32f16653c96007dab4a. Environment: Debian 12, Python 3.11.2, GCC 12.2.0.

git diff --check 80b5a5016f352cf0298bd32f16653c96007dab4a...3455540f174dd9e941d0ebac47a11b47a56ffb54
/usr/bin/python3 tools/check_conventions.py --base 80b5a5016f352cf0298bd32f16653c96007dab4a --head 3455540f174dd9e941d0ebac47a11b47a56ffb54 --title 'fix(agc): sample multisampled colour targets in a same-size format' --body /tmp/anyps5-pr-precheck-18652/pr-body.md
/usr/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 80b5a5016f352cf0298bd32f16653c96007dab4a --head 3455540f174dd9e941d0ebac47a11b47a56ffb54 --json
/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 18652 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck-18652/stack
/usr/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck-18652/head-3455540f174d-e2305d78 --json core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp

The PR description reports agc_driver_multisample_retirement passing on Windows 11 with an RTX 4070 and Vulkan validation enabled, on both main and the change. It also reports the title passing the prior failure point in a build containing this PR and four other fixes. I did not run either GPU check locally.

Results

Check Result Note
Diff whitespace passed Exit 0.
Conventions passed “All conventions checks passed.”
Dependency/mergeability passed Report generated.
Test-quality heuristic passed No findings.
Focused GPU test author-reported pass Validation-layer test on an RTX 4070; not run locally.
Hosted CI incomplete Product build jobs were not completed in the saved snapshot.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

  • I did not build the C++ target or run the GPU test locally.
  • The new regression asserts allocation, reuse, and release; it does not compare sampled pixel values. The PR’s title run is author-reported and included four other fixes.
  • No console or second-GPU result was independently confirmed.

To get this to a good state

No follow-up is required for the reviewed head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5867246172 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18652#pullrequestreview-5867246172). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T00:36:50Z. **Review:** APPROVED --- # Reviewed — looks good The change copies a multisampled target into a same-size sampled format when direct sampling is unavailable, reuses that copy for repeated reads, and retains it with the target; I found no blocking defect. ## What I ran Head `3455540f174dd9e941d0ebac47a11b47a56ffb54`; base `80b5a5016f352cf0298bd32f16653c96007dab4a`. Environment: Debian 12, Python 3.11.2, GCC 12.2.0. ```sh git diff --check 80b5a5016f352cf0298bd32f16653c96007dab4a...3455540f174dd9e941d0ebac47a11b47a56ffb54 /usr/bin/python3 tools/check_conventions.py --base 80b5a5016f352cf0298bd32f16653c96007dab4a --head 3455540f174dd9e941d0ebac47a11b47a56ffb54 --title 'fix(agc): sample multisampled colour targets in a same-size format' --body /tmp/anyps5-pr-precheck-18652/pr-body.md /usr/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 80b5a5016f352cf0298bd32f16653c96007dab4a --head 3455540f174dd9e941d0ebac47a11b47a56ffb54 --json /usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 18652 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck-18652/stack /usr/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck-18652/head-3455540f174d-e2305d78 --json core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp ``` The PR description reports `agc_driver_multisample_retirement` passing on Windows 11 with an RTX 4070 and Vulkan validation enabled, on both main and the change. It also reports the title passing the prior failure point in a build containing this PR and four other fixes. I did not run either GPU check locally. ## Results | Check | Result | Note | |---|---|---| | Diff whitespace | passed | Exit 0. | | Conventions | passed | “All conventions checks passed.” | | Dependency/mergeability | passed | Report generated. | | Test-quality heuristic | passed | No findings. | | Focused GPU test | author-reported pass | Validation-layer test on an RTX 4070; not run locally. | | Hosted CI | incomplete | Product build jobs were not completed in the saved snapshot. | ## Findings ### Blocking None. ### Non-blocking None. ## Sources - [Capability check and same-size format copy at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3455540f174dd9e941d0ebac47a11b47a56ffb54/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp#L609-L640) - [Format selection for matching multisampled targets at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3455540f174dd9e941d0ebac47a11b47a56ffb54/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp#L1656-L1666) - [Regression coverage for copy allocation, reuse, and release at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3455540f174dd9e941d0ebac47a11b47a56ffb54/core/libs/prx/libSceAgcDriver/tests/execution/MultisampleRetirement.cpp#L594-L620) ## Not verified - I did not build the C++ target or run the GPU test locally. - The new regression asserts allocation, reuse, and release; it does not compare sampled pixel values. The PR’s title run is author-reported and included four other fixes. - No console or second-GPU result was independently confirmed. ## To get this to a good state No follow-up is required for the reviewed head.
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!18652
No description provided.