fix(agc): write host-only multisample memory as zeros in a capture snapshot #12566

Merged
chitters2004 merged 2 commits from upstream-pr/12566 into main 2026-10-29 20:19:02 +00:00
chitters2004 commented 2026-10-28 20:44:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by chitters2004 on 2026-10-28T20:44:28Z.


What

The capture snapshot reads every committed block with GuestMemory::ReadCommitted, which refuses memory under a multisampled color target, its FMASK or native multisample depth whose samples exist only on the host. The read throws, and the title aborts: on GTA V (PPSA04263) a capture of the North Yankton prologue ended with a CPU read of 0x2ee4a0000+0x4000000 overlaps multisampled color target 0x2f1c00000+0x80000 (2 samples), whose samples are only on the host and SIGABRT. @Tehshortbus hit the same in a GTA V cutscene, on 8 blocks of 64 KiB (#12235 comment).

  • Graphics::HostOnlySampleRanges returns the guarded multisample color ranges whose samples are only on the host and, through AppendHostWrittenDepthRanges, the native multisample depth ranges the host wrote.
  • AgcDriver::ReadAroundRanges reads a block around sorted, possibly overlapping ranges and writes them as zeros. FrameRecorder::readGuest calls it with those ranges for the snapshot and for the delta reads of late-added ranges and write-watched blocks, counts the bytes as host_only_sample_bytes in capture.json and adds a warning when any were zeroed, so the replay starts those targets without their earlier contents.

agc_frame_capture_tests covers ReadAroundRanges with a range in the middle of a block, over its start, over its end, overlapping ranges, ranges outside it and one over all of it: only those bytes are zero, every other byte matches guest memory, the count equals the zeroed length, and no guarded byte is read. SampleMultisampleTarget reads across a native target and its neighbor and checks that exactly the target's color bytes are zeroed.

Overlap: #6995 changes the same MultisampleTarget.hpp include block. Its author agreed this lands first (comment) and records it in #6995's Depends on; the rest of the two merge automatically. readGuest takes HostOnlySampleRanges before it reads, so once #6995 is in, a range that is still host-only is written as zeros without trying #6995's publication first, and bytes published earlier are read normally. So the two together don't make a capture over such a target lossless. The other PRs the overlap check lists only add next to the same lines.

Tested

Windows 11 Pro 26220, WinLibs GCC, Ninja Release, NVIDIA GeForce RTX 3080 (driver 621.01).

agc_driver_sample_multisample_target now also checks that HostOnlySampleRanges reports the draw-input source it has just guarded as a native target, and not the neighbouring block. These checks call the new function, so they do not build on main. No test captures a frame over a host-only target.

GTA V (PPSA04263), the same prologue scene with this series applied: the capture completes, 3 frames, with "host_only_sample_bytes":524288 (that 0x80000-byte 2-sample target) and the warning in capture.json.

Paired run on main and this branch merged into it, same machine and GPU, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R "frame_(capture|replay)|sample_multisample_target" -V: full builds on both sides with submodules at their pinned commits: main at bb04a4f1ea: 12 tests, all passed, 0 VUID- lines; this branch at fa2b143d5a merged into it (a049746c60): 12 tests, all passed, 0 VUID- lines. Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS.

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 (merge order agreed with #6995: this lands first)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3080, driver 621.01, Windows 11 Pro 26220
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5057419000 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12566). Originally posted by [chitters2004](https://github.com/chitters2004) on 2026-10-28T20:44:28Z. --- ### What The capture snapshot reads every committed block with `GuestMemory::ReadCommitted`, which refuses memory under a multisampled color target, its FMASK or native multisample depth whose samples exist only on the host. The read throws, and the title aborts: on GTA V (PPSA04263) a capture of the North Yankton prologue ended with `a CPU read of 0x2ee4a0000+0x4000000 overlaps multisampled color target 0x2f1c00000+0x80000 (2 samples), whose samples are only on the host` and `SIGABRT`. @Tehshortbus hit the same in a GTA V cutscene, on 8 blocks of 64 KiB ([#12235 comment](https://github.com/boykopovar/AnyPS5/issues/12235#issuecomment-6463925963)). - `Graphics::HostOnlySampleRanges` returns the guarded multisample color ranges whose samples are only on the host and, through `AppendHostWrittenDepthRanges`, the native multisample depth ranges the host wrote. - `AgcDriver::ReadAroundRanges` reads a block around sorted, possibly overlapping ranges and writes them as zeros. `FrameRecorder::readGuest` calls it with those ranges for the snapshot and for the delta reads of late-added ranges and write-watched blocks, counts the bytes as `host_only_sample_bytes` in `capture.json` and adds a warning when any were zeroed, so the replay starts those targets without their earlier contents. `agc_frame_capture_tests` covers `ReadAroundRanges` with a range in the middle of a block, over its start, over its end, overlapping ranges, ranges outside it and one over all of it: only those bytes are zero, every other byte matches guest memory, the count equals the zeroed length, and no guarded byte is read. `SampleMultisampleTarget` reads across a native target and its neighbor and checks that exactly the target's color bytes are zeroed. Overlap: #6995 changes the same `MultisampleTarget.hpp` include block. Its author agreed this lands first ([comment](https://github.com/boykopovar/AnyPS5/pull/6995#issuecomment-6489697477)) and records it in #6995's **Depends on**; the rest of the two merge automatically. `readGuest` takes `HostOnlySampleRanges` before it reads, so once #6995 is in, a range that is still host-only is written as zeros without trying #6995's publication first, and bytes published earlier are read normally. So the two together don't make a capture over such a target lossless. The other PRs the overlap check lists only add next to the same lines. ### 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. --> Windows 11 Pro 26220, WinLibs GCC, Ninja Release, NVIDIA GeForce RTX 3080 (driver 621.01). `agc_driver_sample_multisample_target` now also checks that `HostOnlySampleRanges` reports the draw-input source it has just guarded as a native target, and not the neighbouring block. These checks call the new function, so they do not build on `main`. No test captures a frame over a host-only target. GTA V (PPSA04263), the same prologue scene with this series applied: the capture completes, 3 frames, with `"host_only_sample_bytes":524288` (that 0x80000-byte 2-sample target) and the warning in `capture.json`. Paired run on `main` and this branch merged into it, same machine and GPU, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R "frame_(capture|replay)|sample_multisample_target" -V`: full builds on both sides with submodules at their pinned commits: `main` at `bb04a4f1ea`: 12 tests, all passed, 0 `VUID-` lines; this branch at `fa2b143d5a` merged into it (`a049746c60`): 12 tests, all passed, 0 `VUID-` lines. Neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. ### 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 (merge order agreed with #6995: this lands first) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3080, driver 621.01, Windows 11 Pro 26220 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-28 21:02:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T21:02:30Z.

Review: CHANGES_REQUESTED


Findings

Blocking: the new snapshot path has no test, and delta reads still reject guarded samples without documenting the limitation

The new readGuest() logic is currently called only by snapshot(). In writeDelta(), both a late-added range and a write-watched block still go through GuestMemory::ReadCommittedUnsynced(), which invokes GuardRead() and can reject an address under a guarded multisample target. Thus the change allows the initial snapshot to complete, but a later CPU write or newly tracked range overlapping still-guarded host-only samples can still stop the capture. The new debt entry only describes zeroing the snapshot, so it does not record this remaining delta failure.

Please either route the applicable delta reads through the host-only-aware helper, or document in the debt entry that delta reads can still refuse these ranges. Add a focused test of the changed readGuest() snapshot behavior: use a guarded range in the middle of a block and at each edge, then verify that only the guarded bytes become zero, surrounding bytes retain their contents, and host_only_sample_bytes matches the zeroed byte count. If delta reads remain unsupported, add a test that records that limitation rather than implying the whole capture path is covered.

I confirmed the current call sites and read guard in this PR's exact head: snapshot() calls readGuest(), while writeDelta() calls ReadCommittedUnsynced() for both late ranges and modified blocks; ReadCommittedUnsynced() invokes GuardRead().

Checks

  • Reviewed exact head 7b38bca9e56d75c2024c7017724805e6321b4473 and its focused range-reporting tests.
  • The hosted Windows job was still running when I checked; eligibility, conventions, intake, labels and report checks passed. Linux product tests were skipped.
  • I did not build/run the AGC/Vulkan tests locally. The GTA V capture and paired Vulkan validation results are author-provided.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5689651127 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12566#pullrequestreview-5689651127). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T21:02:30Z. **Review:** CHANGES_REQUESTED --- ## Findings ### Blocking: the new snapshot path has no test, and delta reads still reject guarded samples without documenting the limitation The new `readGuest()` logic is currently called only by `snapshot()`. In `writeDelta()`, both a late-added range and a write-watched block still go through `GuestMemory::ReadCommittedUnsynced()`, which invokes `GuardRead()` and can reject an address under a guarded multisample target. Thus the change allows the initial snapshot to complete, but a later CPU write or newly tracked range overlapping still-guarded host-only samples can still stop the capture. The new debt entry only describes zeroing the snapshot, so it does not record this remaining delta failure. Please either route the applicable delta reads through the host-only-aware helper, or document in the debt entry that delta reads can still refuse these ranges. Add a focused test of the changed `readGuest()` snapshot behavior: use a guarded range in the middle of a block and at each edge, then verify that only the guarded bytes become zero, surrounding bytes retain their contents, and `host_only_sample_bytes` matches the zeroed byte count. If delta reads remain unsupported, add a test that records that limitation rather than implying the whole capture path is covered. I confirmed the current call sites and read guard in this PR's exact head: `snapshot()` calls `readGuest()`, while `writeDelta()` calls `ReadCommittedUnsynced()` for both late ranges and modified blocks; `ReadCommittedUnsynced()` invokes `GuardRead()`. ## Checks - Reviewed exact head `7b38bca9e56d75c2024c7017724805e6321b4473` and its focused range-reporting tests. - The hosted Windows job was still running when I checked; eligibility, conventions, intake, labels and report checks passed. Linux product tests were skipped. - I did not build/run the AGC/Vulkan tests locally. The GTA V capture and paired Vulkan validation results are author-provided.
adriadam10 commented 2026-10-28 21:05:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-28T21:05:12Z.

Review: CHANGES_REQUESTED


Thanks, the approach is right and readGuest's cursor arithmetic checks out on the diff. Two things block it, the same ones @oneandonlydean and @MarcZX10 raised:

  • FrameRecorder.cpp readGuest has no test: the added checks in SampleMultisampleTarget.cpp only call HostOnlySampleRanges. Add a test in the existing frame capture tests that snapshots a block overlapping a guarded host-only target and asserts the overlap reads as zero, the bytes on either side are unchanged, and host_only_sample_bytes in capture.json equals the zeroed length. Cover the range in the middle, at the start and at the end of the block.
  • writeDelta still reads late-added ranges and write-watched blocks with ReadCommittedUnsynced, which goes through GuardRead and can still abort a capture over a guarded target. Either route those two reads through readGuest, or say in the Host-only multisample memory in frame capture entry of docs/dev/debt/libSceAgcDriver.md that delta reads of such memory still refuse (and then the PR text's "the gap is a new debt entry" is true).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5689679954 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12566#pullrequestreview-5689679954). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-28T21:05:12Z. **Review:** CHANGES_REQUESTED --- Thanks, the approach is right and `readGuest`'s cursor arithmetic checks out on the diff. Two things block it, the same ones @oneandonlydean and @MarcZX10 raised: - `FrameRecorder.cpp` `readGuest` has no test: the added checks in `SampleMultisampleTarget.cpp` only call `HostOnlySampleRanges`. Add a test in the existing frame capture tests that snapshots a block overlapping a guarded host-only target and asserts the overlap reads as zero, the bytes on either side are unchanged, and `host_only_sample_bytes` in `capture.json` equals the zeroed length. Cover the range in the middle, at the start and at the end of the block. - `writeDelta` still reads late-added ranges and write-watched blocks with `ReadCommittedUnsynced`, which goes through `GuardRead` and can still abort a capture over a guarded target. Either route those two reads through `readGuest`, or say in the `Host-only multisample memory in frame capture` entry of `docs/dev/debt/libSceAgcDriver.md` that delta reads of such memory still refuse (and then the PR text's "the gap is a new debt entry" is true).
MarcZX10 commented 2026-10-29 05:58:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T05:58:40Z.

Review: CHANGES_REQUESTED


Re-checked — changes requested

What I checked

  • Reviewed exact head fa2b143d5a133903f82fb09a9d8378339096c3d9 against fetched main 2960e9a6e7.
  • The earlier code/test gaps are addressed: readGuest now handles snapshots and both delta-read paths, and ReadAroundRanges tests cover middle/start/end, overlapping, outside, and fully covering ranges. The native-target test checks that only guarded target bytes are zeroed.
  • The current-main merge preview is clean and git diff --check passes. Hosted Windows, conventions, and eligibility checks pass; product Linux and specialized jobs were skipped.

Test evidence

The author reports the GTA V capture now completes and records 524288 host-only bytes. They also report paired Vulkan-validation CTest runs on an RTX 3080, with 12/12 focused tests and no VUID- lines on both main and the change; the full set was run on the immediately preceding revision, and the capture test was rerun on this head. I did not run these GPU tests locally.

Blocking repository coordination

The open #6995 changes the same MultisampleTarget.hpp area; a pairwise merge preview conflicts there. This PR mentions the overlap but still says Depends on: none, and I found no author agreement on which change lands first. CONTRIBUTING.md requires the authors to agree and record the order. Please coordinate with #6995’s author, update the checklist, and refresh/rerun the focused comparison on the agreed integration head. Until then I cannot approve this change.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693482407 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12566#pullrequestreview-5693482407). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T05:58:40Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes requested ## What I checked - Reviewed exact head `fa2b143d5a133903f82fb09a9d8378339096c3d9` against fetched `main` `2960e9a6e7`. - The earlier code/test gaps are addressed: `readGuest` now handles snapshots and both delta-read paths, and `ReadAroundRanges` tests cover middle/start/end, overlapping, outside, and fully covering ranges. The native-target test checks that only guarded target bytes are zeroed. - The current-main merge preview is clean and `git diff --check` passes. Hosted Windows, conventions, and eligibility checks pass; product Linux and specialized jobs were skipped. ## Test evidence The author reports the GTA V capture now completes and records `524288` host-only bytes. They also report paired Vulkan-validation CTest runs on an RTX 3080, with 12/12 focused tests and no `VUID-` lines on both main and the change; the full set was run on the immediately preceding revision, and the capture test was rerun on this head. I did not run these GPU tests locally. ## Blocking repository coordination The open #6995 changes the same `MultisampleTarget.hpp` area; a pairwise merge preview conflicts there. This PR mentions the overlap but still says `Depends on: none`, and I found no author agreement on which change lands first. `CONTRIBUTING.md` requires the authors to agree and record the order. Please coordinate with #6995’s author, update the checklist, and refresh/rerun the focused comparison on the agreed integration head. Until then I cannot approve this change.
MarcZX10 commented 2026-10-29 10:06:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T10:06:58Z.

Review: CHANGES_REQUESTED


Rechecked after the stack update

The agreement with #6995 is now explicit in both PR descriptions: #12566 first, then #6995. The earlier missing test and delta-read findings are also addressed by the current head's ReadAroundRanges coverage and the host-only-aware reads for snapshots and deltas.

Changes still requested

Please rerun the focused frame-capture and multisample-target checks on current main and on the PR merged into that same main. The latest reported paired run uses main 2960e9a6e7, while current main is f7e84c4cf1; since their merge base, core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp and docs/dev/debt/libSceAgcDriver.md changed on both sides. In particular, the PR adds AppendHostWrittenDepthRanges in DepthSurface.cpp, so the older paired run does not establish the combined behavior after the intervening depth-guard changes.

My current-main merge preview is clean and git diff --check passes. The hosted Windows job passes; Linux and specialized product jobs are skipped. I did not run the GPU/AGC suite locally. The author's 12/12 paired Vulkan-validation result is useful but predates these shared-file changes. Please record the exact main and merged-head commits and rerun the focused gate on the agreed #12566-before-#6995 integration.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5695979206 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12566#pullrequestreview-5695979206). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T10:06:58Z. **Review:** CHANGES_REQUESTED --- ## Rechecked after the stack update The agreement with #6995 is now explicit in both PR descriptions: #12566 first, then #6995. The earlier missing test and delta-read findings are also addressed by the current head's `ReadAroundRanges` coverage and the host-only-aware reads for snapshots and deltas. ## Changes still requested Please rerun the focused frame-capture and multisample-target checks on current `main` and on the PR merged into that same main. The latest reported paired run uses `main` `2960e9a6e7`, while current `main` is `f7e84c4cf1`; since their merge base, `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp` and `docs/dev/debt/libSceAgcDriver.md` changed on both sides. In particular, the PR adds `AppendHostWrittenDepthRanges` in `DepthSurface.cpp`, so the older paired run does not establish the combined behavior after the intervening depth-guard changes. My current-main merge preview is clean and `git diff --check` passes. The hosted Windows job passes; Linux and specialized product jobs are skipped. I did not run the GPU/AGC suite locally. The author's 12/12 paired Vulkan-validation result is useful but predates these shared-file changes. Please record the exact main and merged-head commits and rerun the focused gate on the agreed #12566-before-#6995 integration.
MarcZX10 commented 2026-10-29 18:46:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T18:46:35Z.

Review: APPROVED


Re-checked — new head, looks good

The prior current-base validation request is resolved by the reported paired run on bb04a4f1ea, and the exact-head capture unit test and negative control pass locally.

What I ran

  • Reviewed PR head fa2b143d5a133903f82fb09a9d8378339096c3d9 against current main bb04a4f1ea0175e9e4f149f0359a764d62ff3296.
  • git merge-tree --write-tree upstream/main HEAD completed cleanly with tree 7fd444989f40824be2bad5b10a2c6ef6c2f43ab8.
  • Environment: Debian Linux 6.1.190, x86_64, GCC 12.2.0, Ninja.
  • Built and ran the focused agc_frame_capture test on this head. A temporary mutation that removed the zero-fill made the test fail; after restoring the exact source, the test passed again.
  • Ran conventions and diff checks.
  • Read the author's Windows RTX 3080 comparison on current main and the PR integrated into that same base; those runs are author-reported, not local runs.
git merge-tree --write-tree upstream/main HEAD
cmake --build /dev/shm/AnyPS5-build-12915-full --target agc_frame_capture_tests -j 2
ctest --test-dir /dev/shm/AnyPS5-build-12915-full -R '^agc_frame_capture$' --output-on-failure
python3 tools/check_conventions.py --base upstream/main
git diff --check upstream/main...HEAD

Results

Check Result
Merge preview with current main Clean; tree 7fd444989f40824be2bad5b10a2c6ef6c2f43ab8
Focused capture unit build Passed
agc_frame_capture Passed
Conventions Passed
Diff check Passed
Author-reported paired GPU suite 12/12 passed on main and on the PR merged into that same base; zero VUID- lines on both
Hosted Windows job Passed
Hosted Linux and specialized jobs Skipped
Unedited local unit-test output
Internal ctest changing into directory: /dev/shm/AnyPS5-build-12915-full
Test project /dev/shm/AnyPS5-build-12915-full
    Start 589: agc_frame_capture
1/1 Test #589: agc_frame_capture ................   Passed    0.03 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.13 sec
Unedited negative-control and restored-test output
Internal ctest changing into directory: /dev/shm/AnyPS5-build-12915-full
Test project /dev/shm/AnyPS5-build-12915-full
    Start 589: agc_frame_capture
1/1 Test #589: agc_frame_capture ................***Failed    0.01 sec
FAILED: a range in the middle: byte 12 is wrong

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.14 sec

The following tests FAILED:
	589 - agc_frame_capture (Failed)
negative_control_ctest_exit=8
Internal ctest changing into directory: /dev/shm/AnyPS5-build-12915-full
Test project /dev/shm/AnyPS5-build-12915-full
    Start 589: agc_frame_capture
1/1 Test #589: agc_frame_capture ................   Passed    0.03 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.13 sec
restored_ctest_exit=0
Unedited conventions output
All conventions checks passed.

Negative control

Assertion Mutation Result
Skipped host-only bytes are zeroed and counted Removed the memset in ReadAroundRanges Test failed at the first middle-range byte assertion (exit 8); restored source passed

Findings

Blocking

None found.

Non-blocking

The Windows GPU comparison and GTA V capture are author-reported. I did not independently run the Vulkan integration suite, verify replay on a console, or test on PS5 hardware. The capture intentionally zeroes host-only samples, so it does not preserve their prior contents.

Sources

Not verified

  • I did not run the Windows/Vulkan integration suite or a physical-console capture/replay.
  • Hosted Linux and specialized product jobs were skipped.
  • The author-provided paired GPU run was not independently reproduced.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5703205704 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12566#pullrequestreview-5703205704). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T18:46:35Z. **Review:** APPROVED --- # Re-checked — new head, looks good The prior current-base validation request is resolved by the reported paired run on `bb04a4f1ea`, and the exact-head capture unit test and negative control pass locally. ## What I ran - Reviewed PR head `fa2b143d5a133903f82fb09a9d8378339096c3d9` against current `main` `bb04a4f1ea0175e9e4f149f0359a764d62ff3296`. - `git merge-tree --write-tree upstream/main HEAD` completed cleanly with tree `7fd444989f40824be2bad5b10a2c6ef6c2f43ab8`. - Environment: Debian Linux 6.1.190, x86_64, GCC 12.2.0, Ninja. - Built and ran the focused `agc_frame_capture` test on this head. A temporary mutation that removed the zero-fill made the test fail; after restoring the exact source, the test passed again. - Ran conventions and diff checks. - Read the author's Windows RTX 3080 comparison on current `main` and the PR integrated into that same base; those runs are author-reported, not local runs. ```sh git merge-tree --write-tree upstream/main HEAD cmake --build /dev/shm/AnyPS5-build-12915-full --target agc_frame_capture_tests -j 2 ctest --test-dir /dev/shm/AnyPS5-build-12915-full -R '^agc_frame_capture$' --output-on-failure python3 tools/check_conventions.py --base upstream/main git diff --check upstream/main...HEAD ``` ## Results | Check | Result | |---|---| | Merge preview with current `main` | Clean; tree `7fd444989f40824be2bad5b10a2c6ef6c2f43ab8` | | Focused capture unit build | Passed | | `agc_frame_capture` | Passed | | Conventions | Passed | | Diff check | Passed | | Author-reported paired GPU suite | 12/12 passed on `main` and on the PR merged into that same base; zero `VUID-` lines on both | | Hosted Windows job | Passed | | Hosted Linux and specialized jobs | Skipped | <details><summary>Unedited local unit-test output</summary> ```text Internal ctest changing into directory: /dev/shm/AnyPS5-build-12915-full Test project /dev/shm/AnyPS5-build-12915-full Start 589: agc_frame_capture 1/1 Test #589: agc_frame_capture ................ Passed 0.03 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 0.13 sec ``` </details> <details><summary>Unedited negative-control and restored-test output</summary> ```text Internal ctest changing into directory: /dev/shm/AnyPS5-build-12915-full Test project /dev/shm/AnyPS5-build-12915-full Start 589: agc_frame_capture 1/1 Test #589: agc_frame_capture ................***Failed 0.01 sec FAILED: a range in the middle: byte 12 is wrong 0% tests passed, 1 tests failed out of 1 Total Test time (real) = 0.14 sec The following tests FAILED: 589 - agc_frame_capture (Failed) negative_control_ctest_exit=8 Internal ctest changing into directory: /dev/shm/AnyPS5-build-12915-full Test project /dev/shm/AnyPS5-build-12915-full Start 589: agc_frame_capture 1/1 Test #589: agc_frame_capture ................ Passed 0.03 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 0.13 sec restored_ctest_exit=0 ``` </details> <details><summary>Unedited conventions output</summary> ```text All conventions checks passed. ``` </details> ## Negative control | Assertion | Mutation | Result | |---|---|---| | Skipped host-only bytes are zeroed and counted | Removed the `memset` in `ReadAroundRanges` | Test failed at the first middle-range byte assertion (exit 8); restored source passed | ## Findings ### Blocking None found. ### Non-blocking The Windows GPU comparison and GTA V capture are author-reported. I did not independently run the Vulkan integration suite, verify replay on a console, or test on PS5 hardware. The capture intentionally zeroes host-only samples, so it does not preserve their prior contents. ## Sources - [Host-only range reader at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/fa2b143d5a133903f82fb09a9d8378339096c3d9/core/libs/prx/libSceAgcDriver/Execution/src/FrameCapture.cpp) - [Snapshot and delta integration at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/fa2b143d5a133903f82fb09a9d8378339096c3d9/core/libs/prx/libSceAgcDriver/Execution/src/FrameRecorder.cpp) - [Host-only multisample range discovery at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/fa2b143d5a133903f82fb09a9d8378339096c3d9/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp) - [Host-written depth range discovery at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/fa2b143d5a133903f82fb09a9d8378339096c3d9/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp) - [Range-reader regressions at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/fa2b143d5a133903f82fb09a9d8378339096c3d9/core/libs/prx/libSceAgcDriver/tests/FrameCapture.cpp) - [Author's paired GPU test report](https://github.com/boykopovar/AnyPS5/pull/12566#issuecomment-6502061739) ## Not verified - I did not run the Windows/Vulkan integration suite or a physical-console capture/replay. - Hosted Linux and specialized product jobs were skipped. - The author-provided paired GPU run was not independently reproduced.
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!12566
No description provided.