feat(agc): preserve initial native multisample color contents #6973

Merged
Amoenus merged 60 commits from upstream-pr/6973 into main 2026-11-05 00:12:11 +00:00
Amoenus commented 2026-10-16 23:03:17 +00:00 (Migrated from github.com)

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


What

Review snapshot — 4 November: ef2bcde6b320fbd0ae33f898c3873d6f2fc6bf2e includes tested main c37bd59e6f08a1a0eb3ad4573f1c9273da42e8e2. This pass enlarges the address-reuse fixture allocation to cover its entire 64KiB multisample surface placed at +32KiB; production topic code is unchanged.

Remaining gates: Reviewer reassessment of the earlier change request and current-head hosted CI.

Current qualification, controls and limitations. Clean merge preview against later main 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c; its AGC driver/shader trees and relevant memory primitives are unchanged.

Preserve guest-written color samples when a native multisample target is first created. Main clears a target without DCC to zero, so a partial first draw loses untouched samples.

  • Import supported uncompressed, single-layer SW_64KB_R_X contents using the merged #13146 guest-sample upload path (Prophet069), built on #6588's fragment layout and #9182's unsigned uploader. An exactly representable repeated texel uses a clear; other supported contents use unsigned storage writes. Unsupported layouts, subresources, metadata and capabilities throw.
  • Compose regular/array sampled views with tracked layouts, twin formats and #8223's claim-before-initialization rule. Initial-content, retirement/reuse and DCC recreate/readback regressions preserve the existing guards.
  • Release the host snapshot after detiling/clear detection. Keep the temporary upload in the recorder until the initial submission completes, using the caller's reusable buffer pool. Neither remains a target member or contributes to later target-use accounting. The synchronous path waits before release.
  • Remove the DCC registration's blanket validation-error regex at the maintainer's request. Verbose main/change validation comparison remains; unrelated baseline layer/driver diagnostics are no longer a special CTest failure condition for this one test.

Credited carried layout work: #6971, original head f65cecddab, original authorship preserved. Its remaining sampled-layout transition is carried here under the maintainer's landing plan; that PR was closed unmerged as a duplicate and is not a standalone prerequisite. #6215's owner/retirement and merged #7948/#8847 behavior remain.

The lifetime follows the existing DepthSurface recorder-upload pattern and changes no console format semantics. Image/view usage follows Vulkan view usage and image-format query contracts.

Related: #6480 and PPSA99902 bring-up #4443. This capability is carried in the Sonic composition, but its necessity for an isolated Sonic stop/wrong result remains unproved. General metadata import/publication is outside this root change.

Removed the regression pinning a valid nonuniform D_X initial target to refusal. The corrected drawn-owner replacement regression is in #6995, where automatic publication is implemented.

Tested

Full configured native libraries, relinker and actual selected fixtures build at the head above; conventions against origin/main and whitespace checks pass. This head: 10 physical-GPU fixture passes, no skip, timeout or selected validation error/warning/VUID. Main comparison: 8 common physical-GPU passes. Capability tests absent on main are recorded separately.

Windows11 Enterprise26200; NVIDIA GeForce RTX5080 /621.01 (32.0.16.2101), AMD Radeon Graphics 1002:13c0 /26.10.1 (32.0.21045.16010). Required Vulkan, shader cache off, pipeline journal off, loaded Khronos1.4.363, verbose serial CTest, 30-second limit. Exact pins, commands and raw logs.

Historical evidence retains its original sources: earlier descriptions and independent runs. No new title/FPS, full-suite, console-equivalence or combined foreign-stack claim.

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; #8223, #6628, #6588, #9182 and #6887 are merged and included
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5080 / NVIDIA 621.01 (32.0.16.2101), AMD Radeon(TM) Graphics 1002:13c0 / AMD 26.10.1 (32.0.21045.16010); Windows 11 Enterprise 26200
  • AI-assisted: yes (Codex); author responsible
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4895252853 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-16T23:03:17Z. --- ### What **Review snapshot — 4 November:** `ef2bcde6b320fbd0ae33f898c3873d6f2fc6bf2e` includes tested main `c37bd59e6f08a1a0eb3ad4573f1c9273da42e8e2`. This pass enlarges the address-reuse fixture allocation to cover its entire 64KiB multisample surface placed at +32KiB; production topic code is unchanged. **Remaining gates:** Reviewer reassessment of the earlier change request and current-head hosted CI. [Current qualification, controls and limitations](https://gist.github.com/Amoenus/5e1458109ca5e37a3d40ef4b974f5f82#file-report-md). Clean merge preview against later main `9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c`; its AGC driver/shader trees and relevant memory primitives are unchanged. Preserve guest-written color samples when a native multisample target is first created. Main clears a target without DCC to zero, so a partial first draw loses untouched samples. - Import supported uncompressed, single-layer SW_64KB_R_X contents using the merged #13146 guest-sample upload path (Prophet069), built on #6588's fragment layout and #9182's unsigned uploader. An exactly representable repeated texel uses a clear; other supported contents use unsigned storage writes. Unsupported layouts, subresources, metadata and capabilities throw. - Compose regular/array sampled views with tracked layouts, twin formats and #8223's claim-before-initialization rule. Initial-content, retirement/reuse and DCC recreate/readback regressions preserve the existing guards. - Release the host snapshot after detiling/clear detection. Keep the temporary upload in the recorder until the initial submission completes, using the caller's reusable buffer pool. Neither remains a target member or contributes to later target-use accounting. The synchronous path waits before release. - Remove the DCC registration's blanket validation-error regex at the maintainer's request. Verbose main/change validation comparison remains; unrelated baseline layer/driver diagnostics are no longer a special CTest failure condition for this one test. Credited carried layout work: #6971, original head f65cecddabd9bf40a49960b48873ca938754c1d6, original authorship preserved. Its remaining sampled-layout transition is carried here under the [maintainer's landing plan](https://github.com/boykopovar/AnyPS5/pull/6971#issuecomment-6361743781); that PR was closed unmerged as a duplicate and is not a standalone prerequisite. #6215's owner/retirement and merged #7948/#8847 behavior remain. The lifetime follows the existing DepthSurface recorder-upload pattern and changes no console format semantics. Image/view usage follows [Vulkan view usage](https://docs.vulkan.org/refpages/latest/refpages/source/VkImageViewUsageCreateInfo.html) and [image-format query](https://docs.vulkan.org/refpages/latest/refpages/source/vkGetPhysicalDeviceImageFormatProperties.html) contracts. Related: #6480 and PPSA99902 [bring-up #4443](https://github.com/boykopovar/AnyPS5/discussions/4443). This capability is carried in the Sonic composition, but its necessity for an isolated Sonic stop/wrong result remains unproved. General metadata import/publication is outside this root change. Removed the regression pinning a valid nonuniform D_X initial target to refusal. The corrected drawn-owner replacement regression is in #6995, where automatic publication is implemented. ### 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. --> Full configured native libraries, relinker and actual selected fixtures build at the head above; conventions against origin/main and whitespace checks pass. This head: **10 physical-GPU fixture passes**, no skip, timeout or selected validation error/warning/VUID. Main comparison: 8 common physical-GPU passes. Capability tests absent on main are recorded separately. Windows11 Enterprise26200; NVIDIA GeForce RTX5080 /621.01 (32.0.16.2101), AMD Radeon Graphics 1002:13c0 /26.10.1 (32.0.21045.16010). Required Vulkan, shader cache off, pipeline journal off, loaded Khronos1.4.363, verbose serial CTest, 30-second limit. [Exact pins, commands and raw logs](https://gist.github.com/Amoenus/5e1458109ca5e37a3d40ef4b974f5f82#file-report-md). Historical evidence retains its original sources: [earlier descriptions and independent runs](https://gist.github.com/Amoenus/5e1458109ca5e37a3d40ef4b974f5f82#file-pr-descriptions-before-md). No new title/FPS, full-suite, console-equivalence or combined foreign-stack claim. ### 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: none; #8223, #6628, #6588, #9182 and #6887 are merged and included - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 5080 / NVIDIA 621.01 (32.0.16.2101), AMD Radeon(TM) Graphics 1002:13c0 / AMD 26.10.1 (32.0.21045.16010); Windows 11 Enterprise 26200 - [x] AI-assisted: yes (Codex); author responsible
MarcZX10 commented 2026-10-16 23:05:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T23:05:55Z.


Integration note: my draft #6971 addresses #6957 by tracking the native multisample image layout across storage writes, sampled reads, and later attachment/storage use. It overlaps this branch in MultisampleTarget.cpp and the sampled Texture view path, including your new initial-sample upload. #6971 is already waiting for #6635 to land per its author’s requested order. A source-level git merge-tree check against #6973 confirms content conflicts in MultisampleTarget.hpp and MultisampleTarget.cpp; I have not resolved or validated the combined implementation. I will keep #6971 draft and verify that the layout tracking preserves this initializer/upload path before marking it ready. Please let me know if you prefer a specific merge order for the two changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6226346970 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6226346970). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T23:05:55Z. --- Integration note: my draft #6971 addresses #6957 by tracking the native multisample image layout across storage writes, sampled reads, and later attachment/storage use. It overlaps this branch in `MultisampleTarget.cpp` and the sampled `Texture` view path, including your new initial-sample upload. #6971 is already waiting for #6635 to land per its author’s requested order. A source-level `git merge-tree` check against #6973 confirms content conflicts in `MultisampleTarget.hpp` and `MultisampleTarget.cpp`; I have not resolved or validated the combined implementation. I will keep #6971 draft and verify that the layout tracking preserves this initializer/upload path before marking it ready. Please let me know if you prefer a specific merge order for the two changes.
akkadbakkad89 commented 2026-10-17 08:09:48 +00:00 (Migrated from github.com)

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


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 82bfd5250, all binaries rebuilt on this head, ctest serial:

Test Result
agc_driver_native_color_initial pass
agc_driver_msaa_layout pass
agc_driver_multisample_readback_uint8 pass
agc_driver_multisample_readback_uint16 pass
agc_driver_multisample_readback_uint64 pass
agc_driver_multisample_readback_uint128 pass
agc_driver_multisample_readback_depth pass
agc_driver_multisample_readback_upload pass
agc_driver_sample_multisample_target pass
agc_driver_sample_mask_multisample pass
agc_driver_native_multisample_depth pass
agc_driver_native_depth_retirement / clears / clear_refusals pass

All pass on Ampere — the guest-initial-content path into native MSAA color holds.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231571380 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6231571380). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-17T08:09:48Z. --- 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 82bfd5250, all binaries rebuilt on this head, ctest serial: | Test | Result | |---|---| | agc_driver_native_color_initial | pass | | agc_driver_msaa_layout | pass | | agc_driver_multisample_readback_uint8 | pass | | agc_driver_multisample_readback_uint16 | pass | | agc_driver_multisample_readback_uint64 | pass | | agc_driver_multisample_readback_uint128 | pass | | agc_driver_multisample_readback_depth | pass | | agc_driver_multisample_readback_upload | pass | | agc_driver_sample_multisample_target | pass | | agc_driver_sample_mask_multisample | pass | | agc_driver_native_multisample_depth | pass | | agc_driver_native_depth_retirement / clears / clear_refusals | pass | All pass on Ampere — the guest-initial-content path into native MSAA color holds.
savvaniss commented 2026-10-17 08:42:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-17T08:42:37Z.


Intel and AMD Windows data for head 82bfd5250. It no longer merges into main: tests/Graphics.cpp conflicts with 5f61879a9. So I ran the head as published. It predates #6452, so agc_driver_gpu_indirect_arguments_misaligned_writer_ahead doesn't build on Windows; everything else built.

Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, with VkCache emptied first. All 27 multisample tests of this head, agc_driver_graphics included:

Test UHD 770 RX 9070 XT
agc_driver_sample_multisample_target (#6957) pass ×5 pass ×5
agc_driver_multisampled_pass_order fails 4 of 4: initial multisample color footprint is not implemented fails 4 of 4, same
agc_driver_multisample_readback_upload fails 4 of 4: readback mismatch: format=13 first=0 byte=1 expected=0x1f actual=0x00 pass 8 of 8
the other 24 pass ×5 pass ×5

multisampled_pass_order comes from #6175 (f52e3f5a1). It stops at the refusal that 8c639dc64 adds in MultisampleTarget.cpp:382. Neither is on main, so the two only meet in this composition. multisample_readback_upload fails only on the UHD 770; the RTX 3070 run above passes it.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231873690 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6231873690). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-17T08:42:37Z. --- Intel and AMD Windows data for head `82bfd5250`. It no longer merges into `main`: `tests/Graphics.cpp` conflicts with `5f61879a9`. So I ran the head as published. It predates #6452, so `agc_driver_gpu_indirect_arguments_misaligned_writer_ahead` doesn't build on Windows; everything else built. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, `ANYPS5_NO_SHADER_CACHE=1`, serial CTest. Intel UHD Graphics 770 (`8086:a780`), driver 32.0.101.7088. AMD Radeon RX 9070 XT (`1002:7550`), driver 32.0.31041.1004, with `VkCache` emptied first. All 27 multisample tests of this head, `agc_driver_graphics` included: | Test | UHD 770 | RX 9070 XT | |---|---|---| | `agc_driver_sample_multisample_target` (#6957) | pass ×5 | pass ×5 | | `agc_driver_multisampled_pass_order` | fails 4 of 4: `initial multisample color footprint is not implemented` | fails 4 of 4, same | | `agc_driver_multisample_readback_upload` | fails 4 of 4: `readback mismatch: format=13 first=0 byte=1 expected=0x1f actual=0x00` | pass 8 of 8 | | the other 24 | pass ×5 | pass ×5 | `multisampled_pass_order` comes from #6175 (f52e3f5a1). It stops at the refusal that 8c639dc64 adds in `MultisampleTarget.cpp:382`. Neither is on `main`, so the two only meet in this composition. `multisample_readback_upload` fails only on the UHD 770; the RTX 3070 run above passes it. AI-assisted: yes (Claude Code)
blawesom commented 2026-10-17 08:44:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-17T08:44:01Z.


Rebase handoff for the stack base — since #6973 is the base your four follow-ups (#6987, #6989, #6995, #7002) are commit-stacked on, rebasing it onto main re-anchors the whole series; they should rebase onto it rather than onto main individually.

The rebase (22 commits, one resolved empty and dropped — its content was already carried by an earlier resolution) is on blawesom:rebase/6973 (1c33df60d): the conflicted commits were reconciled against main's newer allocate()/Allocation/makeStorable architecture — Allocation now carries the bytes your reclaim needs, and MultisampleTarget.cpp/.hpp end up byte-identical to your head. One intermediate commit in the series does not build on its own (the dca54b2 state, also true of your own integration history — it self-heals two commits later), so per-commit builds will show that one red.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite 1333/1336 — beyond the known main regression (agc_driver_tessellation segfault, #4727), two failures, and I checked them against your original head as a control: both fail identically there (agc_driver_multisampled_pass_order throws "initial multisample color footprint is not implemented" in 0.01 s; agc_driver_depth_storage_dispatch fails too), so they are the series' own on this device rather than rebase artifacts — possibly resolved by the upper stack PRs, but the base alone carries them.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/6973
git checkout <your branch>
git merge --ff-only FETCH_HEAD
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231888684 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6231888684). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-17T08:44:01Z. --- **Rebase handoff for the stack base** — since #6973 is the base your four follow-ups (#6987, #6989, #6995, #7002) are commit-stacked on, rebasing it onto `main` re-anchors the whole series; they should rebase onto it rather than onto `main` individually. The rebase (22 commits, one resolved empty and dropped — its content was already carried by an earlier resolution) is on `blawesom:rebase/6973` (`1c33df60d`): the conflicted commits were reconciled against `main`'s newer `allocate()`/`Allocation`/`makeStorable` architecture — `Allocation` now carries the bytes your reclaim needs, and `MultisampleTarget.cpp/.hpp` end up byte-identical to your head. One intermediate commit in the series does not build on its own (the `dca54b2` state, also true of your own integration history — it self-heals two commits later), so per-commit builds will show that one red. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; conventions pass; **full suite 1333/1336** — beyond the known `main` regression (`agc_driver_tessellation` segfault, #4727), two failures, and I checked them against your **original head** as a control: both fail identically there (`agc_driver_multisampled_pass_order` throws "initial multisample color footprint is not implemented" in 0.01 s; `agc_driver_depth_storage_dispatch` fails too), so they are the series' own on this device rather than rebase artifacts — possibly resolved by the upper stack PRs, but the base alone carries them. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/6973 git checkout <your branch> git merge --ff-only FETCH_HEAD ```
Amoenus commented 2026-10-17 09:26:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T09:26:18Z.


@blawesom thanks for the rebase handoff; I adopted it, reviewed the range diff and incorporated main through ef674f5af3e4d0fe44fda10e46d36ead2c262c0e. The refreshed head is b64742f8679010aba1209c01f1155f91f27ec860.

@savvaniss I reproduced the pass-order failure, and the depth-storage failure @blawesom reported, on NVIDIA, AMD and llvmpipe. Both fixtures still described their MSAA color target as linear, so they stopped at initial import before reaching their intended assertions. The fixture-only correction gives them RenderTarget geometry and a complete 64 KiB color allocation; production refusals and existing test assertions are unchanged. Both corrected tests and initial-samples pass 3/3 on all three devices (27/27 fresh processes). Windows and Linux relinker/libs builds and conventions pass. Exact pins, devices, the failing pre-correction control and analysis limitations are in the updated description.

The Intel upload mismatch is still open evidence: upload passes 3/3 on each of our three devices, which does not validate the Intel case. AI-assisted implementation and validation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6232273244 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6232273244). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T09:26:18Z. --- @blawesom thanks for the rebase handoff; I adopted it, reviewed the range diff and incorporated main through `ef674f5af3e4d0fe44fda10e46d36ead2c262c0e`. The refreshed head is `b64742f8679010aba1209c01f1155f91f27ec860`. @savvaniss I reproduced the pass-order failure, and the depth-storage failure @blawesom reported, on NVIDIA, AMD and llvmpipe. Both fixtures still described their MSAA color target as linear, so they stopped at initial import before reaching their intended assertions. The fixture-only correction gives them RenderTarget geometry and a complete 64 KiB color allocation; production refusals and existing test assertions are unchanged. Both corrected tests and initial-samples pass 3/3 on all three devices (27/27 fresh processes). Windows and Linux relinker/libs builds and conventions pass. Exact pins, devices, the failing pre-correction control and analysis limitations are in the updated description. The Intel upload mismatch is still open evidence: upload passes 3/3 on each of our three devices, which does not validate the Intel case. AI-assisted implementation and validation. <!-- codex-pr6973-fixture-review-reply-v1 -->
savvaniss commented 2026-10-17 13:29:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-17T13:29:46Z.


Retest of head b64742f86 on the Intel UHD 770, with the cause of the remaining upload failure.

Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, with VkCache emptied first. The head is tested as published: it conflicts with main 23f142350 in SampleMultisampleTarget.cpp.

28 multisample tests, ×3 UHD 770 RX 9070 XT
b64742f86 27 pass; agc_driver_multisample_readback_upload fails: readback mismatch: format=13 first=0 byte=1 expected=0x1f actual=0x00 28 pass

agc_driver_multisampled_pass_order and agc_driver_depth_storage_dispatch now pass on both GPUs.

The upload failure is #6957 on the fixture's verification read. CheckReadback runs DispatchMultisampleReadback, which binds the array view as a sampled image in GENERAL. It runs right after DispatchMultisampleImage has written the same image with storage stores, also in GENERAL. This is the pattern this driver gets wrong. I made a local experiment, not a proposal: the readback descriptor uses SHADER_READ_ONLY_OPTIMAL (DEPTH_STENCIL_READ_ONLY_OPTIMAL for D32), and CheckReadback moves the image to that layout before the dispatch and back to GENERAL after it. With that change, agc_driver_multisample_readback_upload passes 3 of 3 on the UHD 770, and all seven agc_driver_multisample_readback* tests pass 3 of 3 on both GPUs. The diff is below.

At this head, DispatchMultisampleReadback has no caller outside tests. #6987 (8e8afdc68) adds one at MultisampleTarget.cpp:341, which samples a snapshot filled by vkCmdCopyImage in GENERAL. At that head the 30 multisample tests pass 3 of 3 on the UHD 770, except the same upload test. So the copy-filled snapshot reads correctly on this driver; the failure needs storage stores into the sampled image itself. The descriptor change in the diff would also need #6987's caller to move its snapshot to the read-only layout.

Experiment diff (local, against b64742f86)
--- a/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleReadback.cpp
+++ b/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleReadback.cpp
@@ -92,7 +92,7 @@
-    const VkDescriptorImageInfo image{VK_NULL_HANDLE, arrayView, VK_IMAGE_LAYOUT_GENERAL};
+    const VkDescriptorImageInfo image{VK_NULL_HANDLE, arrayView, format == VK_FORMAT_D32_SFLOAT ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL};
--- a/core/libs/prx/libSceAgcDriver/tests/execution/MultisampleReadback.cpp
+++ b/core/libs/prx/libSceAgcDriver/tests/execution/MultisampleReadback.cpp
@@ -293,10 +293,26 @@ std::vector<std::byte> CheckReadback(...)
     RecordMemoryBarrier(...);
+    const bool experimentDepth = surface.format == VK_FORMAT_D32_SFLOAT;
+    const auto experimentLayout = [&](VkImageLayout from, VkImageLayout to) {
+        VkImageMemoryBarrier barrier{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER};
+        barrier.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT;
+        barrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
+        barrier.oldLayout = from;
+        barrier.newLayout = to;
+        barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+        barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+        barrier.image = surface.image;
+        barrier.subresourceRange = {static_cast<VkImageAspectFlags>(experimentDepth ? VK_IMAGE_ASPECT_DEPTH_BIT : VK_IMAGE_ASPECT_COLOR_BIT), 0u, 1u, 0u, VK_REMAINING_ARRAY_LAYERS};
+        surface.context.Function<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(batch.Handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, 0u, nullptr, 0u, nullptr, 1u, &barrier);
+    };
+    const auto readLayout = experimentDepth ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
+    experimentLayout(VK_IMAGE_LAYOUT_GENERAL, readLayout);
     for (std::uint32_t repeat = 0u; repeat < repetitions; ++repeat) {
         reader.DispatchMultisampleReadback(...);
         ...
     }
+    experimentLayout(readLayout, VK_IMAGE_LAYOUT_GENERAL);
     RecordMemoryBarrier(..., VK_PIPELINE_STAGE_HOST_BIT, ...);

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234456057 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6234456057). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-17T13:29:46Z. --- Retest of head `b64742f86` on the Intel UHD 770, with the cause of the remaining upload failure. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, `ANYPS5_NO_SHADER_CACHE=1`, serial CTest. Intel UHD Graphics 770 (`8086:a780`), driver 32.0.101.7088. AMD Radeon RX 9070 XT (`1002:7550`), driver 32.0.31041.1004, with `VkCache` emptied first. The head is tested as published: it conflicts with `main` `23f142350` in `SampleMultisampleTarget.cpp`. | 28 multisample tests, ×3 | UHD 770 | RX 9070 XT | |---|---|---| | `b64742f86` | 27 pass; `agc_driver_multisample_readback_upload` fails: `readback mismatch: format=13 first=0 byte=1 expected=0x1f actual=0x00` | 28 pass | `agc_driver_multisampled_pass_order` and `agc_driver_depth_storage_dispatch` now pass on both GPUs. The upload failure is #6957 on the fixture's verification read. `CheckReadback` runs `DispatchMultisampleReadback`, which binds the array view as a sampled image in `GENERAL`. It runs right after `DispatchMultisampleImage` has written the same image with storage stores, also in `GENERAL`. This is the pattern this driver gets wrong. I made a local experiment, not a proposal: the readback descriptor uses `SHADER_READ_ONLY_OPTIMAL` (`DEPTH_STENCIL_READ_ONLY_OPTIMAL` for D32), and `CheckReadback` moves the image to that layout before the dispatch and back to `GENERAL` after it. With that change, `agc_driver_multisample_readback_upload` passes 3 of 3 on the UHD 770, and all seven `agc_driver_multisample_readback*` tests pass 3 of 3 on both GPUs. The diff is below. At this head, `DispatchMultisampleReadback` has no caller outside tests. #6987 (`8e8afdc68`) adds one at `MultisampleTarget.cpp:341`, which samples a snapshot filled by `vkCmdCopyImage` in `GENERAL`. At that head the 30 multisample tests pass 3 of 3 on the UHD 770, except the same upload test. So the copy-filled snapshot reads correctly on this driver; the failure needs storage stores into the sampled image itself. The descriptor change in the diff would also need #6987's caller to move its snapshot to the read-only layout. <details><summary>Experiment diff (local, against b64742f86)</summary> ```diff --- a/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleReadback.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleReadback.cpp @@ -92,7 +92,7 @@ - const VkDescriptorImageInfo image{VK_NULL_HANDLE, arrayView, VK_IMAGE_LAYOUT_GENERAL}; + const VkDescriptorImageInfo image{VK_NULL_HANDLE, arrayView, format == VK_FORMAT_D32_SFLOAT ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL}; --- a/core/libs/prx/libSceAgcDriver/tests/execution/MultisampleReadback.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/execution/MultisampleReadback.cpp @@ -293,10 +293,26 @@ std::vector<std::byte> CheckReadback(...) RecordMemoryBarrier(...); + const bool experimentDepth = surface.format == VK_FORMAT_D32_SFLOAT; + const auto experimentLayout = [&](VkImageLayout from, VkImageLayout to) { + VkImageMemoryBarrier barrier{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER}; + barrier.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT; + barrier.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT; + barrier.oldLayout = from; + barrier.newLayout = to; + barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; + barrier.image = surface.image; + barrier.subresourceRange = {static_cast<VkImageAspectFlags>(experimentDepth ? VK_IMAGE_ASPECT_DEPTH_BIT : VK_IMAGE_ASPECT_COLOR_BIT), 0u, 1u, 0u, VK_REMAINING_ARRAY_LAYERS}; + surface.context.Function<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(batch.Handle(), VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, 0u, nullptr, 0u, nullptr, 1u, &barrier); + }; + const auto readLayout = experimentDepth ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + experimentLayout(VK_IMAGE_LAYOUT_GENERAL, readLayout); for (std::uint32_t repeat = 0u; repeat < repetitions; ++repeat) { reader.DispatchMultisampleReadback(...); ... } + experimentLayout(readLayout, VK_IMAGE_LAYOUT_GENERAL); RecordMemoryBarrier(..., VK_PIPELINE_STAGE_HOST_BIT, ...); ``` </details> AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-19 11:17:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T11:17:57Z.


I carried the reporter's three-file layout experiment onto the current #6973 head (8068e758b8) in a local worktree. The driver and focused agc_driver_multisample_readback_tests executable build successfully, and the patch passes git diff --check plus check_conventions.py.

I also ran the seven focused CTest cases here. They abort before reaching their assertions because this Linux host's Xeon E5-1620 v2 lacks CPU extensions required by AnyPS5 (LZCNT, BMI1/2, MOVBE, AVX2 and FMA), so I cannot claim local runtime validation. The reporter's earlier UHD 770 and RX 9070 XT results remain the runtime evidence; they offered to rerun once the follow-up has a head.

The changed readback sources exist only in #6973's stack, so I am keeping this as a dependent follow-up rather than opening a competing main PR. After #6973 lands, I can rebase and publish the focused change for the offered GPU rerun.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6265961891 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6265961891). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T11:17:57Z. --- I carried the reporter's three-file layout experiment onto the current #6973 head (`8068e758b8`) in a local worktree. The driver and focused `agc_driver_multisample_readback_tests` executable build successfully, and the patch passes `git diff --check` plus `check_conventions.py`. I also ran the seven focused CTest cases here. They abort before reaching their assertions because this Linux host's Xeon E5-1620 v2 lacks CPU extensions required by AnyPS5 (LZCNT, BMI1/2, MOVBE, AVX2 and FMA), so I cannot claim local runtime validation. The reporter's earlier UHD 770 and RX 9070 XT results remain the runtime evidence; they offered to rerun once the follow-up has a head. The changed readback sources exist only in #6973's stack, so I am keeping this as a dependent follow-up rather than opening a competing `main` PR. After #6973 lands, I can rebase and publish the focused change for the offered GPU rerun.
MarcZX10 commented 2026-10-20 09:31:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T09:31:48Z.


FYI, I published the readback-layout follow-up as Amoenus/AnyPS5#3, based on this PR's exact head cafd4f749f68244322404b9468b8cd46bd58715c. It is a separate stacked branch; I did not modify this branch.

PR #3's conventions check and one-off CodeRabbit review pass with no actionable findings. The focused Linux CTest still aborts before assertions on this host's CPU-feature guard, so the offered UHD 770/RX 9070 XT retest remains useful.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287912983 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6287912983). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T09:31:48Z. --- FYI, I published the readback-layout follow-up as [Amoenus/AnyPS5#3](https://github.com/Amoenus/AnyPS5/pull/3), based on this PR's exact head `cafd4f749f68244322404b9468b8cd46bd58715c`. It is a separate stacked branch; I did not modify this branch. PR #3's conventions check and one-off CodeRabbit review pass with no actionable findings. The focused Linux CTest still aborts before assertions on this host's CPU-feature guard, so the offered UHD 770/RX 9070 XT retest remains useful.
oneandonlydean commented 2026-10-20 17:54:53 +00:00 (Migrated from github.com)

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


Thanks for the stack. One composition problem with current main: it comes from main, not from your commits, but it only shows once they're merged together. Could you fix it on the rebase you need anyway for the debt-doc conflict?

Main's 388527d6b2 ("reimport a multisampled target recreated with another pipe-bank XOR") landed after this stack's base and merges in textually clean. Its path doesn't go through #6971's layout tracking:

  • In acquire (MultisampleTarget.cpp), when recreated(target->target, use) is true, it calls target->Recreate(use), guard(...) and target->ApplyFastClear(use), then returns. It never reaches PrepareForColorAttachment(use).
  • Recreate records vkCmdClearColorImage(image, VK_IMAGE_LAYOUT_GENERAL, ...) without ensureGeneralLayout() first.
  • ApplyFastClear returns before its ensureGeneralLayout() when no fast clear is pending.

So take a target that was sampled (its tracked layout is now SHADER_READ_ONLY_OPTIMAL) and is then recreated with another pipe-bank XOR. It gets cleared in GENERAL while it's actually in SHADER_READ_ONLY_OPTIMAL, and then it's used as an attachment with no transition back. The tracked layout no longer matches the image. That's the same class of bug #6971 fixes.

Suggested fix:

  1. In Recreate, call ensureGeneralLayout() before recording its clear.
  2. In acquire's recreate branch, call target->PrepareForColorAttachment(use) before returning, as the non-recreate branch does.

Test: main's recreate case in tests/execution/AlphaToCoverage.cpp never samples the target before recreating it, so it can't catch this. Could you add a case that renders the target, samples it (so its layout becomes SHADER_READ_ONLY_OPTIMAL), recreates it with another pipe-bank XOR, and then renders and reads it back? Check the samples against the expected values. Running it under VK_LAYER_KHRONOS_validation should also flag the layout mismatch on main's current path, and the fixed version should run clean under it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6297506843 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6297506843). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T17:54:53Z. --- Thanks for the stack. One composition problem with current main: it comes from main, not from your commits, but it only shows once they're merged together. Could you fix it on the rebase you need anyway for the debt-doc conflict? Main's 388527d6b2 ("reimport a multisampled target recreated with another pipe-bank XOR") landed after this stack's base and merges in textually clean. Its path doesn't go through #6971's layout tracking: - In `acquire` (MultisampleTarget.cpp), when `recreated(target->target, use)` is true, it calls `target->Recreate(use)`, `guard(...)` and `target->ApplyFastClear(use)`, then returns. It never reaches `PrepareForColorAttachment(use)`. - `Recreate` records `vkCmdClearColorImage(image, VK_IMAGE_LAYOUT_GENERAL, ...)` without `ensureGeneralLayout()` first. - `ApplyFastClear` returns before its `ensureGeneralLayout()` when no fast clear is pending. So take a target that was sampled (its tracked layout is now `SHADER_READ_ONLY_OPTIMAL`) and is then recreated with another pipe-bank XOR. It gets cleared in GENERAL while it's actually in `SHADER_READ_ONLY_OPTIMAL`, and then it's used as an attachment with no transition back. The tracked layout no longer matches the image. That's the same class of bug #6971 fixes. Suggested fix: 1. In `Recreate`, call `ensureGeneralLayout()` before recording its clear. 2. In `acquire`'s recreate branch, call `target->PrepareForColorAttachment(use)` before returning, as the non-recreate branch does. Test: main's recreate case in `tests/execution/AlphaToCoverage.cpp` never samples the target before recreating it, so it can't catch this. Could you add a case that renders the target, samples it (so its layout becomes `SHADER_READ_ONLY_OPTIMAL`), recreates it with another pipe-bank XOR, and then renders and reads it back? Check the samples against the expected values. Running it under `VK_LAYER_KHRONOS_validation` should also flag the layout mismatch on main's current path, and the fixed version should run clean under it.
Amoenus commented 2026-10-20 21:12:17 +00:00 (Migrated from github.com)

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


@oneandonlydean addressed in 419ad899c6: recreation now prepares GENERAL before clearing, then prepares color-attachment use on the acquire return path. Added the requested render → sample → change DCC/XOR → render/sample → resolve regression.

The identical test fails 3/3 per GPU without those calls (the two layout VUIDs you identified) and passes 3/3 per GPU with them under loaded Khronos. Full Windows build and the broader selected matrix pass: 54 physical-GPU checks plus 9 CPU/mock checks. Literal-main AMD's separate resolved-output failure is retained and distinguished in the maintained report.

#6971 authorship and the agreed dependency order are preserved. Could you re-review and request fresh full Linux/Windows CI when ready? The dependency PRs still need to land first. AI-assisted: yes (Codex); author responsible.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301592603 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6301592603). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-20T21:12:17Z. --- @oneandonlydean addressed in [419ad899c6](https://github.com/Amoenus/AnyPS5/commit/419ad899c6ddf362a1cada8bdd433e33662b8411): recreation now prepares GENERAL before clearing, then prepares color-attachment use on the acquire return path. Added the requested render → sample → change DCC/XOR → render/sample → resolve regression. The identical test fails 3/3 per GPU without those calls (the two layout VUIDs you identified) and passes 3/3 per GPU with them under loaded Khronos. Full Windows build and the broader selected matrix pass: 54 physical-GPU checks plus 9 CPU/mock checks. Literal-main AMD's separate resolved-output failure is retained and distinguished in the [maintained report](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6226366338). #6971 authorship and the agreed dependency order are preserved. Could you re-review and request fresh full Linux/Windows CI when ready? The dependency PRs still need to land first. AI-assisted: yes (Codex); author responsible.
oneandonlydean commented 2026-10-20 21:21:14 +00:00 (Migrated from github.com)

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


@Amoenus thanks, 419ad899c6 fixes the composition issue: recreation now moves the image to GENERAL before its clear, and the acquire return path prepares it for color-attachment use on the same image, so the tracked layout stays valid.

One non-blocking note on the new regression test: it only fails through the Validation Error: regular expression, and CI doesn't load the Khronos validation layer, so in CI it passes with or without the fix. Could it either require the layer (skip with 77 when the layer isn't present) or be marked as a manual check in its description?

#7002 doesn't have 419ad899c6 yet and now conflicts with main. When you have a moment, could you restack it on top of this head? The stack's CI and gate run after that.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301749350 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6301749350). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T21:21:14Z. --- @Amoenus thanks, 419ad899c6 fixes the composition issue: recreation now moves the image to GENERAL before its clear, and the acquire return path prepares it for color-attachment use on the same image, so the tracked layout stays valid. One non-blocking note on the new regression test: it only fails through the `Validation Error:` regular expression, and CI doesn't load the Khronos validation layer, so in CI it passes with or without the fix. Could it either require the layer (skip with 77 when the layer isn't present) or be marked as a manual check in its description? #7002 doesn't have 419ad899c6 yet and now conflicts with main. When you have a moment, could you restack it on top of this head? The stack's CI and gate run after that.
Amoenus commented 2026-10-20 21:47:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-20T21:47:44Z.


@oneandonlydean the manual validation-layer designation remains in the description/report. The restack is now pushed through #7002; all four follow-ups retain exact #6973 419ad899c6 and tested main e25333e39a.

PR Published head Exact-head positives / retained AMD assertion failures
#6987 6185950ed7 33 / 3
#6989 d5df0079b9 27 / 3
#6995 15a590902f 33 / 3
#7002 86571871ac 114 / 12

Each full incremental default build and explicit library/relinker build passes. The PR descriptions retain actual-device/layer verification, groups, analyzer limitations and historical controls at their own pins. The sources merge cleanly with checked newer main 5b59fbc553; that newer composition is not runtime-tested here.

The newer #6973/main parent and snapshot head both fail the AMD recreation numeric resolve assertion 3/3; NVIDIA passes 3/3. Rebuilding the parent and restoring the snapshot repeats the same result, with no VUIDs or validation errors/warnings. The maintained report separates this from the original successful 419/main-aa composition and from #7936's distinct DCC-clear assertion. #7002 additionally retains nine original DCC2/4/8 assertions matching literal main. These are failed tests, not skips or claimed passes; a common cause is unconfirmed.

AI-assisted: yes (Codex).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6302351411 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6302351411). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-20T21:47:44Z. --- @oneandonlydean the manual validation-layer designation remains in the description/report. The restack is now pushed through #7002; all four follow-ups retain exact #6973 `419ad899c6` and tested main `e25333e39a`. | PR | Published head | Exact-head positives / retained AMD assertion failures | |---|---|---| | #6987 | `6185950ed7` | 33 / 3 | | #6989 | `d5df0079b9` | 27 / 3 | | #6995 | `15a590902f` | 33 / 3 | | #7002 | `86571871ac` | 114 / 12 | Each full incremental default build and explicit library/relinker build passes. The PR descriptions retain actual-device/layer verification, groups, analyzer limitations and historical controls at their own pins. The sources merge cleanly with checked newer main `5b59fbc553`; that newer composition is not runtime-tested here. The newer #6973/main parent and snapshot head both fail the AMD recreation **numeric resolve** assertion 3/3; NVIDIA passes 3/3. Rebuilding the parent and restoring the snapshot repeats the same result, with no VUIDs or validation errors/warnings. The [maintained report](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6226366338) separates this from the original successful `419`/main-aa composition and from #7936's distinct DCC-clear assertion. #7002 additionally retains nine original DCC2/4/8 assertions matching literal main. These are failed tests, not skips or claimed passes; a common cause is unconfirmed. AI-assisted: yes (Codex).
oneandonlydean commented 2026-10-21 10:14:38 +00:00 (Migrated from github.com)

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


@Amoenus a heads-up for the native colour publish stack (#6973 → #6987 → #6989 → #6995 → #7002). main's MSAA sample-order work, most recently #6683, changed the code this stack builds on, so the conflicts in Texture.hpp and MultisampleTarget.cpp need rework, not just a text merge:

  • The depth-image Texture constructor on main now takes owner and usage (Texture.hpp:66). #6973 adds a second overload with an imageLayout argument (:67). Please fold the layout into main's constructor or add it there, without a parallel overload.
  • MultisampleTarget now creates its image with allocate(usage, orderFlags) (MultisampleTarget.cpp:105), so the image can also be viewed in the sample-order format, and it adds OrderView() (:295). #6973's PrepareForColorAttachment() (:335) sits in the same place and calls allocate(usage, flags). It has to keep orderFlags and work alongside OrderView().

Since every PR above #6973 inherits those hunks, the order is: rework #6973 on current main first, then rebase #6987, #6989, #6995 and #7002 on it in turn. We'll review each one as it lands, starting with #6973.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6313514152 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6313514152). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T10:14:38Z. --- @Amoenus a heads-up for the native colour publish stack (#6973 → #6987 → #6989 → #6995 → #7002). `main`'s MSAA sample-order work, most recently #6683, changed the code this stack builds on, so the conflicts in `Texture.hpp` and `MultisampleTarget.cpp` need rework, not just a text merge: - The depth-image `Texture` constructor on `main` now takes `owner` and `usage` (Texture.hpp:66). #6973 adds a second overload with an `imageLayout` argument (:67). Please fold the layout into `main`'s constructor or add it there, without a parallel overload. - `MultisampleTarget` now creates its image with `allocate(usage, orderFlags)` (MultisampleTarget.cpp:105), so the image can also be viewed in the sample-order format, and it adds `OrderView()` (:295). #6973's `PrepareForColorAttachment()` (:335) sits in the same place and calls `allocate(usage, flags)`. It has to keep `orderFlags` and work alongside `OrderView()`. Since every PR above #6973 inherits those hunks, the order is: rework #6973 on current `main` first, then rebase #6987, #6989, #6995 and #7002 on it in turn. We'll review each one as it lands, starting with #6973.
EagleBearerYS commented 2026-10-22 12:42:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T12:42:25Z.


@Amoenus a merge-order note for this stack (#6973 → #6987 → #6989 → #6995 → #7002) and #9533, which has #9717 and #9742 stacked on it. They meet in MultisampleTarget.cpp, in the constructor and in Recreate, through #6973's lines; the four PRs above it conflict with #9533 only there.

  • #9533 records a target's cleared value and a drawn flag, so Alias() can say what a host-only colour target over a D32S8 stencil or depth plane holds: a fast clear, a fill, a clear with no draw since, or drawn.
  • #6973 changes what a target starts with: the known clear, the DCC or CMASK clear, or the guest's contents.
  • Composed, cleared takes initial only when it's a clear (the known clear, DCC or CMASK), and stays empty when the target starts from the guest's contents, so a plane under it stays unproven. Recreate keeps both your ensureGeneralLayout() and #9533's two assignments.

#9533 goes after #6973 and rebases over it, as well as after #7371 as agreed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6341017479 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6341017479). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T12:42:25Z. --- @Amoenus a merge-order note for this stack (#6973 → #6987 → #6989 → #6995 → #7002) and #9533, which has #9717 and #9742 stacked on it. They meet in `MultisampleTarget.cpp`, in the constructor and in `Recreate`, through #6973's lines; the four PRs above it conflict with #9533 only there. - #9533 records a target's `cleared` value and a `drawn` flag, so `Alias()` can say what a host-only colour target over a D32S8 stencil or depth plane holds: a fast clear, a fill, a clear with no draw since, or drawn. - #6973 changes what a target starts with: the known clear, the DCC or CMASK clear, or the guest's contents. - Composed, `cleared` takes `initial` only when it's a clear (the known clear, DCC or CMASK), and stays empty when the target starts from the guest's contents, so a plane under it stays unproven. `Recreate` keeps both your `ensureGeneralLayout()` and #9533's two assignments. #9533 goes after #6973 and rebases over it, as well as after #7371 as agreed.
Amoenus commented 2026-10-22 13:05:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-22T13:05:37Z.


@EagleBearerYS Agreed: #9533 should follow #6973 as well as #7371. I checked the constructor and Recreate against our published #6973 head 77dd406ddb. The constructor can import guest sample contents, so that path must leave cleared empty; only the known-clear/DCC/CMASK branches can supply clear provenance. Please retain ensureGeneralLayout() together with your cleared and drawn assignments in Recreate.

The four child PRs inherit that constructor change; they do not need separate implementations of the composition. This is source review of the proposed ordering, not a combined runtime result. Thanks for keeping the attribution and dependencies explicit.

Refresh is now published at 9290696549 on main 8b3e39832a, retaining that constructor provenance distinction and ensureGeneralLayout(). #8847's twin views/per-format resolve passes are retained. The shared current qualification and explicit unrelated-alias refusal expectation are in this PR's updated description; #7371 has now merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6341480444 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6341480444). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-22T13:05:37Z. --- @EagleBearerYS Agreed: #9533 should follow #6973 as well as #7371. I checked the constructor and `Recreate` against our published #6973 head `77dd406ddb`. The constructor can import guest sample contents, so that path must leave `cleared` empty; only the known-clear/DCC/CMASK branches can supply clear provenance. Please retain `ensureGeneralLayout()` together with your `cleared` and `drawn` assignments in `Recreate`. The four child PRs inherit that constructor change; they do not need separate implementations of the composition. This is source review of the proposed ordering, not a combined runtime result. Thanks for keeping the attribution and dependencies explicit. Refresh is now published at `9290696549` on main `8b3e39832a`, retaining that constructor provenance distinction and `ensureGeneralLayout()`. #8847's twin views/per-format resolve passes are retained. The shared current qualification and explicit unrelated-alias refusal expectation are in this PR's updated description; #7371 has now merged.
oneandonlydean commented 2026-10-22 13:38:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-22T13:38:00Z.


@Amoenus a heads-up for this stack: #8847 merged a few minutes ago (8b3e39832a) and also changes Graphics/src/MultisampleTarget.cpp, so #6973 through #7002 no longer merge cleanly. git merge-tree against current main shows two hunks, both from #6973:

  • Image creation in the constructor: #8847 adds the sRGB twin. It picks colorTwinFormat, checks it can be a colour attachment and storage image, and sets VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT. Your change builds the initial-contents storage image in the same place (initial / ImageElementFormat / MUTABLE_FORMAT | EXTENDED_USAGE). The composed version needs both: the twin's format checks and flags, plus your initial-storage requirements and usage.
  • Destruction: #8847 replaces the single resolvePass with a resolvePasses map (one per format) and destroys each entry; your branch destroys initialView and the single resolvePass. Composed: destroy initialView, then every entry in resolvePasses.

The four PRs above #6973 only conflict through #6973's lines, so rebasing #6973 and replaying the others should be enough. Once the stack is up again, I'll run the full CI on the new heads and then the stack gate.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6342153794 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6342153794). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-22T13:38:00Z. --- @Amoenus a heads-up for this stack: #8847 merged a few minutes ago (8b3e39832a) and also changes `Graphics/src/MultisampleTarget.cpp`, so #6973 through #7002 no longer merge cleanly. `git merge-tree` against current `main` shows two hunks, both from #6973: - **Image creation in the constructor:** #8847 adds the sRGB twin. It picks `colorTwinFormat`, checks it can be a colour attachment and storage image, and sets `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT`. Your change builds the initial-contents storage image in the same place (`initial` / `ImageElementFormat` / `MUTABLE_FORMAT | EXTENDED_USAGE`). The composed version needs both: the twin's format checks and flags, plus your initial-storage requirements and usage. - **Destruction:** #8847 replaces the single `resolvePass` with a `resolvePasses` map (one per format) and destroys each entry; your branch destroys `initialView` and the single `resolvePass`. Composed: destroy `initialView`, then every entry in `resolvePasses`. The four PRs above #6973 only conflict through #6973's lines, so rebasing #6973 and replaying the others should be enough. Once the stack is up again, I'll run the full CI on the new heads and then the stack gate.
MarcZX10 commented 2026-10-29 22:31:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T22:31:52Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The NVIDIA report for head 13aba93cbca83f5b1c892eed508df7e2ad33ffb3 identifies a sampled-read regression and a new test that fails on a known validation message before reaching its target assertions.

What I ran

Reviewed head 13aba93cbca83f5b1c892eed508df7e2ad33ffb3, PR base bb04a4f1ea0175e9e4f149f0359a764d62ff3296; the local merge preview against current upstream/main (4c8cff191609bc5f28bf9ee2f93672b531285aa4) merged cleanly. On Linux, without invoking a compiler, I ran:

git diff --check upstream/main...refs/pr/6973
python3 tools/check_conventions.py --base upstream/main --head refs/pr/6973
git merge-tree --write-tree upstream/main refs/pr/6973

I also read the exact-head source, the new NVIDIA report, and its rerun log. I did not build or run tests locally.

Results

Check Result
git diff --check Passed; no output.
Repository conventions Passed.
Current-main merge preview Clean; tree f58debcc81b60b1295ac0b44919c1e9635bd88a3.
NVIDIA GPU report (author-provided) Release build passed; agc_driver_sample_multisample_target failed on the PR and passed on main with the PR's test changes; agc_driver_msaa_dcc_recreate_layout failed on the PR. Not independently run by me.
Relevant raw output from the linked NVIDIA rerun log
1/2 Test  #894: agc_driver_msaa_dcc_recreate_layout ....***Failed  Error regular expression found in output. Regex=[Validation Error:]  2.69 sec
VUID-VkDeviceCreateInfo-pNext-pNext(ERROR / SPEC): msgNum: -1876993556 - Validation Error: [ VUID-VkDeviceCreateInfo-pNext-pNext ]
AGC graphics: a CPU read of 0x591dd1370000+0x10000 overlaps multisampled color target 0x591dd1370000+0x10000 (4 samples), whose samples are only on the host: guest access to it is not implemented
0% tests passed, 2 tests failed out of 2

Negative control

Assertion Change under test Result
Reading sample 0 from a drawn 4× target PR production changes, with its test changes Author's report: fails on this PR; the same test passes on main with the PR's test changes.
DCC recreation test rejects validation errors New test and its FAIL_REGULAR_EXPRESSION Could not compare the test on main because it is not defined there. Its PR log shows the known VUID-VkDeviceCreateInfo-pNext-pNext during device creation, before the DCC test's success message.

Findings

Blocking

  • Existing sampled-read behavior regresses. The report's controlled main comparison passes agc_driver_sample_multisample_target, while this head throws when CheckFirstSampleReads reads the guest range after drawing a 4× target. Please preserve the behavior exercised by that existing test, or provide a narrowly scoped implementation and test change that demonstrates the supported contract without silently converting a previously passing guest read into an error.
  • The DCC test fails on a known validation ID before exercising DCC. The added test fails on the generic Validation Error: expression because device creation emits VUID-VkDeviceCreateInfo-pNext-pNext; the same ID is listed in the report as already present on main. Please isolate test execution from that known startup message or compare/filter known baseline IDs so this test fails only for a new validation issue and reaches its DCC assertions.

Non-blocking

  • The PR is based on bb04a4f1ea0175e9e4f149f0359a764d62ff3296, while current main is 4c8cff191609bc5f28bf9ee2f93672b531285aa4. The merge preview is clean. Since this PR is in a dependency stack and #8223 remains open, I am not asking for a standalone rebase; rerun the focused checks on the dependency-safe, current integrated head when that stack is refreshed.

Sources

Not verified

I did not independently run the GPU tests, compile, or verify behavior on another GPU, OS, or console. The hardware results above are from the report on an NVIDIA RTX 2000 Ada under Ubuntu 26.04.1.

To get this to a good state

Resolve both failures, then rerun agc_driver_sample_multisample_target and agc_driver_msaa_dcc_recreate_layout with the validation layer on a dependency-safe current-main integration. I will recheck the exact new head and rerun the non-building checks above; the GPU run remains author/CI evidence unless independently available.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5705829013 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#pullrequestreview-5705829013). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T22:31:52Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The NVIDIA report for head `13aba93cbca83f5b1c892eed508df7e2ad33ffb3` identifies a sampled-read regression and a new test that fails on a known validation message before reaching its target assertions. ## What I ran Reviewed head `13aba93cbca83f5b1c892eed508df7e2ad33ffb3`, PR base `bb04a4f1ea0175e9e4f149f0359a764d62ff3296`; the local merge preview against current `upstream/main` (`4c8cff191609bc5f28bf9ee2f93672b531285aa4`) merged cleanly. On Linux, without invoking a compiler, I ran: ```sh git diff --check upstream/main...refs/pr/6973 python3 tools/check_conventions.py --base upstream/main --head refs/pr/6973 git merge-tree --write-tree upstream/main refs/pr/6973 ``` I also read the exact-head source, the new NVIDIA report, and its rerun log. I did not build or run tests locally. ## Results | Check | Result | |---|---| | `git diff --check` | Passed; no output. | | Repository conventions | Passed. | | Current-main merge preview | Clean; tree `f58debcc81b60b1295ac0b44919c1e9635bd88a3`. | | NVIDIA GPU report (author-provided) | Release build passed; `agc_driver_sample_multisample_target` failed on the PR and passed on main with the PR's test changes; `agc_driver_msaa_dcc_recreate_layout` failed on the PR. Not independently run by me. | <details> <summary>Relevant raw output from the linked NVIDIA rerun log</summary> ```text 1/2 Test #894: agc_driver_msaa_dcc_recreate_layout ....***Failed Error regular expression found in output. Regex=[Validation Error:] 2.69 sec VUID-VkDeviceCreateInfo-pNext-pNext(ERROR / SPEC): msgNum: -1876993556 - Validation Error: [ VUID-VkDeviceCreateInfo-pNext-pNext ] AGC graphics: a CPU read of 0x591dd1370000+0x10000 overlaps multisampled color target 0x591dd1370000+0x10000 (4 samples), whose samples are only on the host: guest access to it is not implemented 0% tests passed, 2 tests failed out of 2 ``` </details> ## Negative control | Assertion | Change under test | Result | |---|---|---| | Reading sample 0 from a drawn 4× target | PR production changes, with its test changes | Author's report: fails on this PR; the same test passes on main with the PR's test changes. | | DCC recreation test rejects validation errors | New test and its `FAIL_REGULAR_EXPRESSION` | Could not compare the test on main because it is not defined there. Its PR log shows the known `VUID-VkDeviceCreateInfo-pNext-pNext` during device creation, before the DCC test's success message. | ## Findings ### Blocking - **Existing sampled-read behavior regresses.** The report's controlled main comparison passes `agc_driver_sample_multisample_target`, while this head throws when `CheckFirstSampleReads` reads the guest range after drawing a 4× target. Please preserve the behavior exercised by that existing test, or provide a narrowly scoped implementation and test change that demonstrates the supported contract without silently converting a previously passing guest read into an error. - **The DCC test fails on a known validation ID before exercising DCC.** The added test fails on the generic `Validation Error:` expression because device creation emits `VUID-VkDeviceCreateInfo-pNext-pNext`; the same ID is listed in the report as already present on main. Please isolate test execution from that known startup message or compare/filter known baseline IDs so this test fails only for a new validation issue and reaches its DCC assertions. ### Non-blocking - The PR is based on `bb04a4f1ea0175e9e4f149f0359a764d62ff3296`, while current main is `4c8cff191609bc5f28bf9ee2f93672b531285aa4`. The merge preview is clean. Since this PR is in a dependency stack and #8223 remains open, I am not asking for a standalone rebase; rerun the focused checks on the dependency-safe, current integrated head when that stack is refreshed. ## Sources - [Multisample target guest-access guard at this head](https://github.com/boykopovar/AnyPS5/blob/13aba93cbca83f5b1c892eed508df7e2ad33ffb3/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp#L1575-L1585) - [Failing sampled-read test at this head](https://github.com/boykopovar/AnyPS5/blob/13aba93cbca83f5b1c892eed508df7e2ad33ffb3/core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp#L1141-L1153) - [DCC test's validation-error matcher at this head](https://github.com/boykopovar/AnyPS5/blob/13aba93cbca83f5b1c892eed508df7e2ad33ffb3/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L2495-L2498) - [NVIDIA build and rerun logs](https://gist.github.com/TechLevelZero/7446e8989e857f8e328fa961dc858f6e) ## Not verified I did not independently run the GPU tests, compile, or verify behavior on another GPU, OS, or console. The hardware results above are from the report on an NVIDIA RTX 2000 Ada under Ubuntu 26.04.1. ## To get this to a good state Resolve both failures, then rerun `agc_driver_sample_multisample_target` and `agc_driver_msaa_dcc_recreate_layout` with the validation layer on a dependency-safe current-main integration. I will recheck the exact new head and rerun the non-building checks above; the GPU run remains author/CI evidence unless independently available.
jotitadev commented 2026-10-30 21:44:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T21:44:11Z.

Review: COMMENTED


A Linux run of the stack, since the qualification so far is Windows. One test fails on both of my devices, and it is the stack's own test, not the device.

Setup. Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02, the driver the NVIDIA CI uses) and lavapipe (Mesa 26.0.3). ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, ctest -j1, Khronos validation layer 1.4.341 unless noted. #7002 head 8628c2da1a (it carries this PR's f8e5f3cca7) merged onto main 7d9a2fc713. I ran the 125 tests that use the eight test binaries the stack changes (recorder, sample_multisample_target, alpha_to_coverage, multisample_readback, srgb_twin, retirement, pass_order, depth_storage_dispatch).

Result. 124/125 pass 3/3 on the 3070 and 3/3 on lavapipe, with no VUID- errors. On lavapipe the 2-sample cases skip (native_color_initial_reuse and others: no 2-sample color). The failure is agc_driver_multisample_srgb_twin, 3/3 on each device:

AGC graphics: an unrelated-format owner over host-only samples was not refused

Cause. 225b170a9d ("claim reused color memory before initialization") adds ClaimMultisampleTargetMemory(use.address, ...) before a new owner is created in acquire(). In TwinFormatsShareTheirSamples, the R16G16_SFLOAT acquire over the resident R8G8B8A8_UNORM target now claims the range and retires that owner. It then reads guest memory without hitting the guard, so nothing throws and refusal stays empty. I printed it locally: refusal=[]. The test (changed earlier in this PR) still expects the "overlaps multisampled color target" refusal and an unchanged resident owner.

tree srgb_twin, 3070 srgb_twin, lavapipe
main 7d9a2fc713 pass not run
aa4706c4e1 (the parent of 225b170a9d) 3/3 pass 3/3 pass
this PR's head f8e5f3cca7 fail not run
#6987 head 10f005d00f fail not run
#7002 head 8628c2da1a, unmerged fail not run
#7002 merged onto main 3/3 fail 3/3 fail

So the claim fix and the refusal this test asserts contradict each other, and one of them has to change: the test expects the retirement, or the claim skips a resident owner that the guard should refuse. I don't see anything Linux-specific in that path, so I'd expect it on Windows too if agc_driver_multisample_srgb_twin is added to the selection. The NVIDIA CI reports for this head and for #6987, #6989, #6995 and #7002 do not list it, and I can't tell from them whether it ran there.

DCC test. This confirms your reading on Linux. agc_driver_msaa_dcc_recreate_layout fails on both devices with the layer the CI uses, VVL 1.3.275 (the ubuntu:24.04 package). Its only message is VUID-VkDeviceCreateInfo-pNext-pNext for sType 1000574000. It passes with 1.4.341 and with no layer. main's own agc_driver_image_table, which also has a VUID- fail regex, fails the same way under 1.3.275 on the 3070. With 1.3.275, the rest of the 125 report only IDs already present on main (pNext-pNext, vkCmdCopyImage-srcImage-01548/01551).

GPUs tested: NVIDIA RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5718992544 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#pullrequestreview-5718992544). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-30T21:44:11Z. **Review:** COMMENTED --- A Linux run of the stack, since the qualification so far is Windows. One test fails on both of my devices, and it is the stack's own test, not the device. **Setup.** Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02, the driver the NVIDIA CI uses) and lavapipe (Mesa 26.0.3). `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, ctest `-j1`, Khronos validation layer 1.4.341 unless noted. #7002 head `8628c2da1a` (it carries this PR's `f8e5f3cca7`) merged onto `main` `7d9a2fc713`. I ran the 125 tests that use the eight test binaries the stack changes (recorder, sample_multisample_target, alpha_to_coverage, multisample_readback, srgb_twin, retirement, pass_order, depth_storage_dispatch). **Result.** 124/125 pass 3/3 on the 3070 and 3/3 on lavapipe, with no `VUID-` errors. On lavapipe the 2-sample cases skip (`native_color_initial_reuse` and others: no 2-sample color). The failure is `agc_driver_multisample_srgb_twin`, 3/3 on each device: ``` AGC graphics: an unrelated-format owner over host-only samples was not refused ``` **Cause.** `225b170a9d` ("claim reused color memory before initialization") adds `ClaimMultisampleTargetMemory(use.address, ...)` before a new owner is created in `acquire()`. In `TwinFormatsShareTheirSamples`, the `R16G16_SFLOAT` acquire over the resident `R8G8B8A8_UNORM` target now claims the range and retires that owner. It then reads guest memory without hitting the guard, so nothing throws and `refusal` stays empty. I printed it locally: `refusal=[]`. The test (changed earlier in this PR) still expects the "overlaps multisampled color target" refusal and an unchanged resident owner. | tree | srgb_twin, 3070 | srgb_twin, lavapipe | |---|---|---| | `main` `7d9a2fc713` | pass | not run | | `aa4706c4e1` (the parent of `225b170a9d`) | 3/3 pass | 3/3 pass | | this PR's head `f8e5f3cca7` | fail | not run | | #6987 head `10f005d00f` | fail | not run | | #7002 head `8628c2da1a`, unmerged | fail | not run | | #7002 merged onto `main` | 3/3 fail | 3/3 fail | So the claim fix and the refusal this test asserts contradict each other, and one of them has to change: the test expects the retirement, or the claim skips a resident owner that the guard should refuse. I don't see anything Linux-specific in that path, so I'd expect it on Windows too if `agc_driver_multisample_srgb_twin` is added to the selection. The NVIDIA CI reports for this head and for #6987, #6989, #6995 and #7002 do not list it, and I can't tell from them whether it ran there. **DCC test.** This confirms your reading on Linux. `agc_driver_msaa_dcc_recreate_layout` fails on both devices with the layer the CI uses, VVL 1.3.275 (the ubuntu:24.04 package). Its only message is `VUID-VkDeviceCreateInfo-pNext-pNext` for sType 1000574000. It passes with 1.4.341 and with no layer. `main`'s own `agc_driver_image_table`, which also has a `VUID-` fail regex, fails the same way under 1.3.275 on the 3070. With 1.3.275, the rest of the 125 report only IDs already present on `main` (pNext-pNext, `vkCmdCopyImage-srcImage-01548/01551`). GPUs tested: NVIDIA RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
jotitadev commented 2026-10-31 01:07:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-31T01:07:43Z.

Review: COMMENTED


Re-run after dcbc99ddf7: agc_driver_multisample_srgb_twin now passes on both of my devices. That was the failure from my earlier run.

The whole stack was tested at #7002's head 6cd9f661f8 (it contains this PR's dcbc99ddf7), merged onto main de96e3efbd. Setup as before: Ubuntu 26.04, GCC 15.2, Release, RTX 3070 (NVIDIA 595.99.02) and lavapipe (Mesa 26.0.3), ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, ctest -j1.

  • The 116 tests of the executables the stack's test files build pass 116/116 in 3 of 3 runs on each device with the Khronos layer 1.4.341, with 0 VUID- lines. The run includes multisample_srgb_twin, sample_multisample_target, alpha_to_coverage, multisample_retirement and the recorder tests.
  • With layer 1.3.275, agc_driver_msaa_dcc_recreate_layout still fails on the RTX 3070, as in the NVIDIA CI. That is the layer's pNext-pNext message against the test's Validation Error: regex, which I described earlier; it passes with 1.4.341 (above).

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux); lavapipe (Mesa 26.0.3, Linux).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5720281093 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#pullrequestreview-5720281093). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-31T01:07:43Z. **Review:** COMMENTED --- Re-run after dcbc99ddf7: `agc_driver_multisample_srgb_twin` now passes on both of my devices. That was the failure from my earlier run. The whole stack was tested at #7002's head `6cd9f661f8` (it contains this PR's `dcbc99ddf7`), merged onto `main` `de96e3efbd`. Setup as before: Ubuntu 26.04, GCC 15.2, Release, RTX 3070 (NVIDIA 595.99.02) and lavapipe (Mesa 26.0.3), `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, `ctest -j1`. - The 116 tests of the executables the stack's test files build pass 116/116 in 3 of 3 runs on each device with the Khronos layer 1.4.341, with 0 `VUID-` lines. The run includes `multisample_srgb_twin`, `sample_multisample_target`, `alpha_to_coverage`, `multisample_retirement` and the recorder tests. - With layer 1.3.275, `agc_driver_msaa_dcc_recreate_layout` still fails on the RTX 3070, as in the NVIDIA CI. That is the layer's `pNext-pNext` message against the test's `Validation Error:` regex, which I described earlier; it passes with 1.4.341 (above). GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux); lavapipe (Mesa 26.0.3, Linux). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-31 02:02:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T02:02:08Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The new agc_driver_msaa_dcc_recreate_layout test fails in the NVIDIA run because its broad Validation Error: filter catches a device-creation VUID that the report also records on main, after the test's DCC assertions pass.

What I ran

Reviewed head dcbc99ddf7f634a26cb8d2ff92bc37a1c924a6bb, PR base e8efeed58af48d0682ab2e0eab72cfaf996e4886; the precheck's merge preview was clean against current main 4b7af94e1dfd1f7b601e8f1ca1dbe460f7680729. Environment: Linux 6.1.0-54-amd64, Python 3.11.2; no compiler or local build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 6973
curl -Ls 'https://gist.githubusercontent.com/TechLevelZero/4702edf80f22a1bfbbf2516e247557c0/raw/b9ad8e35b24eb64e4351c029b7bd07dee72cfca0/10-rerun.log' | grep -E 'agc_driver_msaa_dcc_recreate_layout|VUID-VkDeviceCreateInfo-pNext-pNext|sampled multisample DCC target recreation'

Results

Check Result
git diff --check Passed.
Repository conventions Passed.
Current-main merge preview Clean against 4b7af94e1dfd1f7b601e8f1ca1dbe460f7680729.
NVIDIA GPU run Build passed; agc_driver_msaa_dcc_recreate_layout failed CTest on exact head dcbc99ddf7f634a26cb8d2ff92bc37a1c924a6bb. The report lists the same VUID-VkDeviceCreateInfo-pNext-pNext among validation IDs seen on main.
Other GPU evidence The author reports 116/116 tests in three runs on both RTX 3070 and lavapipe with validation layer 1.4.341; I did not reproduce these runs.
Relevant unedited log lines
1/1 Test #952: agc_driver_msaa_dcc_recreate_layout ...***Failed  Error regular expression found in output. Regex=[Validation Error:]  2.42 sec

Findings

Blocking

  • CMakeLists.txt sets FAIL_REGULAR_EXPRESSION "Validation Error:" for this test. That rejects any validation error printed during device initialization, including the reported VUID-VkDeviceCreateInfo-pNext-pNext, even though the DCC recreation and read-back assertions complete. The same VUID is reported on main, so this filter makes the new test fail on the NVIDIA CI environment without demonstrating a regression in this change. Please keep checking validation output, but distinguish this known baseline diagnostic from errors produced by the tested operation, or use a validation-layer version that recognizes the structure and demonstrate the test passes in CI.

Non-blocking

  • The NVIDIA report could not compare this new test against main because the test is not defined there; a same-layer baseline comparison would help confirm the diagnostic source.

Sources

Not verified

  • I did not build locally or run the GPU test. The new test's behavior on the exact baseline implementation with the same validation-layer version was not reported.

To get this to a good state

Adjust the filter or CI validation-layer setup so the known baseline device-creation diagnostic does not fail this test while new diagnostics remain detectable, then rerun the focused test and NVIDIA CI on the updated head. I will repeat the same precheck and inspect the new run.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5720492265 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#pullrequestreview-5720492265). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T02:02:08Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The new `agc_driver_msaa_dcc_recreate_layout` test fails in the NVIDIA run because its broad `Validation Error:` filter catches a device-creation VUID that the report also records on `main`, after the test's DCC assertions pass. ## What I ran Reviewed head `dcbc99ddf7f634a26cb8d2ff92bc37a1c924a6bb`, PR base `e8efeed58af48d0682ab2e0eab72cfaf996e4886`; the precheck's merge preview was clean against current `main` `4b7af94e1dfd1f7b601e8f1ca1dbe460f7680729`. Environment: Linux 6.1.0-54-amd64, Python 3.11.2; no compiler or local build was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 6973 curl -Ls 'https://gist.githubusercontent.com/TechLevelZero/4702edf80f22a1bfbbf2516e247557c0/raw/b9ad8e35b24eb64e4351c029b7bd07dee72cfca0/10-rerun.log' | grep -E 'agc_driver_msaa_dcc_recreate_layout|VUID-VkDeviceCreateInfo-pNext-pNext|sampled multisample DCC target recreation' ``` ## Results | Check | Result | |---|---| | `git diff --check` | Passed. | | Repository conventions | Passed. | | Current-main merge preview | Clean against `4b7af94e1dfd1f7b601e8f1ca1dbe460f7680729`. | | NVIDIA GPU run | Build passed; `agc_driver_msaa_dcc_recreate_layout` failed CTest on exact head `dcbc99ddf7f634a26cb8d2ff92bc37a1c924a6bb`. The report lists the same `VUID-VkDeviceCreateInfo-pNext-pNext` among validation IDs seen on `main`. | | Other GPU evidence | The author reports 116/116 tests in three runs on both RTX 3070 and lavapipe with validation layer 1.4.341; I did not reproduce these runs. | <details><summary>Relevant unedited log lines</summary> ```text 1/1 Test #952: agc_driver_msaa_dcc_recreate_layout ...***Failed Error regular expression found in output. Regex=[Validation Error:] 2.42 sec ``` </details> ## Findings **Blocking** - `CMakeLists.txt` sets `FAIL_REGULAR_EXPRESSION "Validation Error:"` for this test. That rejects any validation error printed during device initialization, including the reported `VUID-VkDeviceCreateInfo-pNext-pNext`, even though the DCC recreation and read-back assertions complete. The same VUID is reported on `main`, so this filter makes the new test fail on the NVIDIA CI environment without demonstrating a regression in this change. Please keep checking validation output, but distinguish this known baseline diagnostic from errors produced by the tested operation, or use a validation-layer version that recognizes the structure and demonstrate the test passes in CI. **Non-blocking** - The NVIDIA report could not compare this new test against `main` because the test is not defined there; a same-layer baseline comparison would help confirm the diagnostic source. ## Sources - [Test registration and filter at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/dcbc99ddf7f634a26cb8d2ff92bc37a1c924a6bb/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L2640-L2641) - [NVIDIA report for head `dcbc99dd`](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6533585119) and [its rerun log pinned to the Gist revision](https://gist.githubusercontent.com/TechLevelZero/4702edf80f22a1bfbbf2516e247557c0/raw/b9ad8e35b24eb64e4351c029b7bd07dee72cfca0/10-rerun.log) ## Not verified - I did not build locally or run the GPU test. The new test's behavior on the exact baseline implementation with the same validation-layer version was not reported. ## To get this to a good state Adjust the filter or CI validation-layer setup so the known baseline device-creation diagnostic does not fail this test while new diagnostics remain detectable, then rerun the focused test and NVIDIA CI on the updated head. I will repeat the same precheck and inspect the new run.
MarcZX10 commented 2026-11-01 01:32:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T01:32:14Z.

Review: DISMISSED


Re-checked — new head, changes requested

The current head still adds a DCC test whose blanket validation-error filter failed on the prior exact NVIDIA run, and the new multisample initialization path has no matched GPU evidence for this head.

What I ran

Reviewed head ad0429b7642174f08ae285f11dfd30e1ca6b5208, with PR base a9ae365e546067b1ea98d209b1f045346691281f; the stack checker reports a clean preview onto current main 5f438847c5064961808425ce0465ed8675474dde. Environment: Linux 6.1.0-54-amd64, Python 3.11.2, GCC/G++ 12.2.0. No build or C++/GPU test was run.

git diff --check a9ae365e546067b1ea98d209b1f045346691281f...ad0429b7642174f08ae285f11dfd30e1ca6b5208
python3 tools/check_conventions.py --base a9ae365e546067b1ea98d209b1f045346691281f --head ad0429b7642174f08ae285f11dfd30e1ca6b5208
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 6973

Results

Check Result
Diff check Passed; no output.
Repository conventions and PR template Passed.
Precheck Diff, conventions, and live mergeability passed. ABI and test-quality helper checks could not run because those helper files are absent from the PR checkout. C++ tests were not run because they require a build.
Current-main preview Clean against 5f438847c5064961808425ce0465ed8675474dde.
Hosted CI at refresh Eligibility, library portability, and report passed; Windows, conventions, and labels were queued. Product Linux and specialized jobs were skipped.
Paired GPU validation No exact-head run found.
Unedited output: conventions and precheck
All conventions checks passed.
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-6973-ad0429b76421/report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-6973-ad0429b76421/report.json
Conclusion: checks failed

Findings

Blocking

  • The new agc_driver_msaa_dcc_recreate_layout registration still sets FAIL_REGULAR_EXPRESSION "Validation Error:" (current-head registration). On the previous exact head dcbc99ddf7f634a26cb8d2ff92bc37a1c924a6bb, the NVIDIA report recorded that this test failed because the filter caught VUID-VkDeviceCreateInfo-pNext-pNext, which the report also saw on main (run report, pinned rerun log). This head retains the same registration, so that known baseline diagnostic can still fail the new test. Please narrow the check to errors attributable to the operation under test, or use a validation-layer setup that does not emit the baseline diagnostic, then rerun the focused test.
  • This head adds AGC multisample initialization behavior and GPU tests, but no matched main/PR run for this exact head was available. The repository requires the same focused tests with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on the same machine and GPU, with new VUIDs compared against main (contribution rule at this head). Please attach those paired results and identify GPU, driver, and OS.

Non-blocking

  • The new fallback uploads guest samples through formatless multisampled storage writes. The PR records unsupported formats/layouts and console equivalence as unverified in its debt entry; I did not run hardware tests to verify this behavior.

Not verified

  • No local build, C++ test, Vulkan test, or GPU run; the Windows workflow was still queued at the last check refresh.
  • ABI and test-quality helper checks were unavailable in the isolated PR checkout.

To get this to a good state

Fix the test's baseline-sensitive validation filter and provide the required matched GPU runs for the exact head. I will rerun the same no-build checks and reassess the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5725890756 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6973#pullrequestreview-5725890756). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T01:32:14Z. **Review:** DISMISSED --- # Re-checked — new head, changes requested The current head still adds a DCC test whose blanket validation-error filter failed on the prior exact NVIDIA run, and the new multisample initialization path has no matched GPU evidence for this head. ## What I ran Reviewed head `ad0429b7642174f08ae285f11dfd30e1ca6b5208`, with PR base `a9ae365e546067b1ea98d209b1f045346691281f`; the stack checker reports a clean preview onto current `main` `5f438847c5064961808425ce0465ed8675474dde`. Environment: Linux 6.1.0-54-amd64, Python 3.11.2, GCC/G++ 12.2.0. No build or C++/GPU test was run. ```sh git diff --check a9ae365e546067b1ea98d209b1f045346691281f...ad0429b7642174f08ae285f11dfd30e1ca6b5208 python3 tools/check_conventions.py --base a9ae365e546067b1ea98d209b1f045346691281f --head ad0429b7642174f08ae285f11dfd30e1ca6b5208 python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 6973 ``` ## Results | Check | Result | |---|---| | Diff check | Passed; no output. | | Repository conventions and PR template | Passed. | | Precheck | Diff, conventions, and live mergeability passed. ABI and test-quality helper checks could not run because those helper files are absent from the PR checkout. C++ tests were not run because they require a build. | | Current-main preview | Clean against `5f438847c5064961808425ce0465ed8675474dde`. | | Hosted CI at refresh | Eligibility, library portability, and report passed; Windows, conventions, and labels were queued. Product Linux and specialized jobs were skipped. | | Paired GPU validation | No exact-head run found. | <details><summary>Unedited output: conventions and precheck</summary> ```text All conventions checks passed. /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-6973-ad0429b76421/report.md /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-6973-ad0429b76421/report.json Conclusion: checks failed ``` </details> ## Findings **Blocking** - The new `agc_driver_msaa_dcc_recreate_layout` registration still sets `FAIL_REGULAR_EXPRESSION "Validation Error:"` ([current-head registration](https://github.com/boykopovar/AnyPS5/blob/ad0429b7642174f08ae285f11dfd30e1ca6b5208/core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_alpha_to_coverage_tests.cmake#L6)). On the previous exact head `dcbc99ddf7f634a26cb8d2ff92bc37a1c924a6bb`, the NVIDIA report recorded that this test failed because the filter caught `VUID-VkDeviceCreateInfo-pNext-pNext`, which the report also saw on `main` ([run report](https://github.com/boykopovar/AnyPS5/pull/6973#issuecomment-6533585119), [pinned rerun log](https://gist.githubusercontent.com/TechLevelZero/4702edf80f22a1bfbbf2516e247557c0/raw/b9ad8e35b24eb64e4351c029b7bd07dee72cfca0/10-rerun.log)). This head retains the same registration, so that known baseline diagnostic can still fail the new test. Please narrow the check to errors attributable to the operation under test, or use a validation-layer setup that does not emit the baseline diagnostic, then rerun the focused test. - This head adds AGC multisample initialization behavior and GPU tests, but no matched `main`/PR run for this exact head was available. The repository requires the same focused tests with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` on the same machine and GPU, with new VUIDs compared against `main` ([contribution rule at this head](https://github.com/boykopovar/AnyPS5/blob/ad0429b7642174f08ae285f11dfd30e1ca6b5208/CONTRIBUTING.md#L73)). Please attach those paired results and identify GPU, driver, and OS. **Non-blocking** - The new fallback uploads guest samples through formatless multisampled storage writes. The PR records unsupported formats/layouts and console equivalence as unverified in its debt entry; I did not run hardware tests to verify this behavior. ## Not verified - No local build, C++ test, Vulkan test, or GPU run; the Windows workflow was still queued at the last check refresh. - ABI and test-quality helper checks were unavailable in the isolated PR checkout. ## To get this to a good state Fix the test's baseline-sensitive validation filter and provide the required matched GPU runs for the exact head. I will rerun the same no-build checks and reassess the updated 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!6973
No description provided.