fix(agc): keep Windows host imports watched while late driver marks settle #1847

Closed
JAB-dev wants to merge 2 commits from upstream-pr/1847 into main
JAB-dev commented 2026-10-08 21:45:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-08T21:45:50Z.


What

#1441 dropped PPSA22520 (Animal Well) on Windows from about 59 to 7.5 FPS. This restores the frame rate and keeps #1434 fixed.

Since #1441, Windows compares every host import instead of write-watching it, because the NVIDIA driver marks imported pages written again about 1.2-2 ms after the import window, and those marks dropped GPU results (#1434). The comparisons make every resource revalidation over an import a full walk. In PPSA22520 (Animal Well) that is 6.8 s of every 10 s and the frame rate falls from about 59 to 7.5 FPS.

Imports stay watched again, and the late marks are told apart from CPU stores by their bytes:

  • GuestMemory::ImportWatched keeps a copy of the import's bytes for a settle period after the import (1 s, APS5_IMPORT_SETTLE_MS). The late marks arrive about 2 ms after the import; the period only needs to outlast them, and a longer one only keeps the copy longer.
  • A page marked in that period whose bytes still equal the copy is stamped ImportWindow (maybe written), as the import window's own marks already are. Write-back keeps the GPU results over such a block.
  • A page whose bytes changed is a CPU store, stamped as before, and the copy takes its new bytes. A unit shadow over it is dropped as stale.
  • The driver's own stores into a settling import (StoreOwnBytes and the other storeOwn paths) refresh the copy, so a late mark over GPU results it wrote back still reads maybe written.
  • One walk of the import at the next collect after the period applies the same rule to the marks left, then the copy is dropped.
  • An import is compared as before when its copy would exceed 256 MiB, or 512 MiB together with the copies already kept, and when APS5_IMPORT_SETTLE_MS=0. Its import entry records that, so a refresh keeps it compared. Unwatching a range or giving it fresh private backing drops its copy.
  • APS5_WRITE_WATCH_IMPORTS is now read on Windows too: unwatch compares every import, as #1441 does; watch keeps imports watched without settling, the behaviour before #1441.

TechnicalDebt records the settle period, that it assumes a driver finishes marking within it, that a CPU store of identical bytes in the period reads as maybe written, and that a GPU write straight into a settling import (MarkWritten) cannot refresh the copy, as its bytes land later, so a late mark over it reads as a CPU store, as without settling. Treating those pages as maybe written instead makes agc_driver_recorder_tests lose a CPU store made after a GPU write ("a CPU store into a unit with results pending was not seen by the refresh"). Settling an import on an event instead (a GPU read of it and its fence, as #1434 suggests) would remove the timing assumption, but it can't be checked on a driver that doesn't mark late, and the import sites hold the host import and tracker locks.

A settle period that only reclassified marks by time was not enough: agc_driver_recorder_tests then publishes a stale unit shadow over a real CPU store ("a stale unit was published"), because PublishShadow only drops BlockWritten units. The byte check is what keeps that test passing.

Tested

Windows 11, RTX 4070 SUPER (driver 610.88), WinLibs GCC 15.2.0 r7, Release.

  • #1434, deterministically: this driver does not show the late marking on its own (agc_driver_dcc_keys_first_write and agc_driver_srgb8_color_target pass 30 of 30 with plain watching). On Windows, the write-watched run of agc_driver_dcc_keys_first_write now rewrites every page of the imported block with its own bytes between the import and the write-back, as the driver does, and pins a long settle period so a slow runner cannot race it. With APS5_WRITE_WATCH_IMPORTS=watch it fails in every run with #1434's message (the first write: the write-back stored 0 written and 0 cleared bytes of 65536, expected 128 written); by default and with APS5_WRITE_WATCH_IMPORTS=unwatch it passes.

  • Frame rate, PPSA22520, APS5_PROFILE_DRAW=1, 10 s windows:

    [present] per 10 s [rescache] revalidate
    main 4b6ab6bb 72-75 13016 calls, 6823 ms, 10725 full walks
    this PR 587-590 166612 calls, 303 ms, 0 full walks
    fe9beae0 (before #1441) 587-588 166756 calls, 299 ms, 0 full walks
  • agc_write_tracking: a new Windows case (with its settle period pinned to 100 ms) imports two blocks, then checks that a page rewritten with its own bytes in the settle period reads maybe written, that a changed page and a store next to the import read written, that the closing walk applies the same rule, that a mark after the period reads written, that an import watched without settling trusts its marks, that a late mark over the driver's own store reads maybe written, that a CPU store after a GPU write into a settling import reads written, and that unwatching a settling import leaves it unwatched.

  • agc_driver_recorder_tests (not registered in ctest) passes, including the unit-shadow stale publish case and the Windows import-watch default.

  • 8 mutations each fail a test: unchanged pages trusted as CPU stores, changed pages not trusted, no closing walk, imports not registered, the driver's stores not refreshing the copy, a settle period that never ends, Windows comparing by default, and Windows not settling by default.

  • Full ctest on this branch alone, on top of main: 479/479.

  • Linux and macOS: the change is Windows-only (#ifdef _WIN32), not built there.

Related: #1599 keeps GPU results over write-back blocks whose bytes the CPU left unchanged (images up to 1 MiB); it is compatible with this and does not restore watching. #1310 and #1361 speed up write tracking and import lookups on Linux.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4793164500 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1847). Originally posted by [JAB-dev](https://github.com/JAB-dev) on 2026-10-08T21:45:50Z. --- ### What **#1441 dropped PPSA22520 (Animal Well) on Windows from about 59 to 7.5 FPS. This restores the frame rate and keeps #1434 fixed.** Since #1441, Windows compares every host import instead of write-watching it, because the NVIDIA driver marks imported pages written again about 1.2-2 ms after the import window, and those marks dropped GPU results (#1434). The comparisons make every resource revalidation over an import a full walk. In PPSA22520 (Animal Well) that is 6.8 s of every 10 s and the frame rate falls from about 59 to 7.5 FPS. Imports stay watched again, and the late marks are told apart from CPU stores by their bytes: - `GuestMemory::ImportWatched` keeps a copy of the import's bytes for a settle period after the import (1 s, `APS5_IMPORT_SETTLE_MS`). The late marks arrive about 2 ms after the import; the period only needs to outlast them, and a longer one only keeps the copy longer. - A page marked in that period whose bytes still equal the copy is stamped `ImportWindow` (maybe written), as the import window's own marks already are. Write-back keeps the GPU results over such a block. - A page whose bytes changed is a CPU store, stamped as before, and the copy takes its new bytes. A unit shadow over it is dropped as stale. - The driver's own stores into a settling import (`StoreOwnBytes` and the other `storeOwn` paths) refresh the copy, so a late mark over GPU results it wrote back still reads maybe written. - One walk of the import at the next collect after the period applies the same rule to the marks left, then the copy is dropped. - An import is compared as before when its copy would exceed 256 MiB, or 512 MiB together with the copies already kept, and when `APS5_IMPORT_SETTLE_MS=0`. Its import entry records that, so a refresh keeps it compared. Unwatching a range or giving it fresh private backing drops its copy. - `APS5_WRITE_WATCH_IMPORTS` is now read on Windows too: `unwatch` compares every import, as #1441 does; `watch` keeps imports watched without settling, the behaviour before #1441. TechnicalDebt records the settle period, that it assumes a driver finishes marking within it, that a CPU store of identical bytes in the period reads as maybe written, and that a GPU write straight into a settling import (`MarkWritten`) cannot refresh the copy, as its bytes land later, so a late mark over it reads as a CPU store, as without settling. Treating those pages as maybe written instead makes `agc_driver_recorder_tests` lose a CPU store made after a GPU write ("a CPU store into a unit with results pending was not seen by the refresh"). Settling an import on an event instead (a GPU read of it and its fence, as #1434 suggests) would remove the timing assumption, but it can't be checked on a driver that doesn't mark late, and the import sites hold the host import and tracker locks. A settle period that only reclassified marks by time was not enough: `agc_driver_recorder_tests` then publishes a stale unit shadow over a real CPU store ("a stale unit was published"), because `PublishShadow` only drops `BlockWritten` units. The byte check is what keeps that test passing. ### Tested Windows 11, RTX 4070 SUPER (driver 610.88), WinLibs GCC 15.2.0 r7, Release. - **#1434, deterministically:** this driver does not show the late marking on its own (`agc_driver_dcc_keys_first_write` and `agc_driver_srgb8_color_target` pass 30 of 30 with plain watching). On Windows, the write-watched run of `agc_driver_dcc_keys_first_write` now rewrites every page of the imported block with its own bytes between the import and the write-back, as the driver does, and pins a long settle period so a slow runner cannot race it. With `APS5_WRITE_WATCH_IMPORTS=watch` it fails in every run with #1434's message (`the first write: the write-back stored 0 written and 0 cleared bytes of 65536, expected 128 written`); by default and with `APS5_WRITE_WATCH_IMPORTS=unwatch` it passes. - **Frame rate**, PPSA22520, `APS5_PROFILE_DRAW=1`, 10 s windows: | | `[present]` per 10 s | `[rescache] revalidate` | |---|---|---| | `main` 4b6ab6bb | 72-75 | 13016 calls, 6823 ms, 10725 full walks | | this PR | 587-590 | 166612 calls, 303 ms, 0 full walks | | fe9beae0 (before #1441) | 587-588 | 166756 calls, 299 ms, 0 full walks | - `agc_write_tracking`: a new Windows case (with its settle period pinned to 100 ms) imports two blocks, then checks that a page rewritten with its own bytes in the settle period reads maybe written, that a changed page and a store next to the import read written, that the closing walk applies the same rule, that a mark after the period reads written, that an import watched without settling trusts its marks, that a late mark over the driver's own store reads maybe written, that a CPU store after a GPU write into a settling import reads written, and that unwatching a settling import leaves it unwatched. - `agc_driver_recorder_tests` (not registered in ctest) passes, including the unit-shadow stale publish case and the Windows import-watch default. - 8 mutations each fail a test: unchanged pages trusted as CPU stores, changed pages not trusted, no closing walk, imports not registered, the driver's stores not refreshing the copy, a settle period that never ends, Windows comparing by default, and Windows not settling by default. - Full ctest on this branch alone, on top of `main`: 479/479. - Linux and macOS: the change is Windows-only (`#ifdef _WIN32`), not built there. Related: #1599 keeps GPU results over write-back blocks whose bytes the CPU left unchanged (images up to 1 MiB); it is compatible with this and does not restore watching. #1310 and #1361 speed up write tracking and import lookups on Linux. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
TheAggie commented 2026-10-08 22:09:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TheAggie on 2026-10-08T22:09:36Z.


A second title for this, with a different workload: ccleste (PPSA59322), a homebrew port that renders through RADV (Mesa's Vulkan driver on the PS5) and writes its frames through storage images. #1441 halved its frame rate here, and this PR restores it.

Windows 11 Pro (26200), RTX 5070 Ti (driver 610.88), WinLibs GCC 15.2.0 r7, Release, APS5_PROFILE_DRAW=1, 35 s runs on the title screen, 10 s windows. ccleste only renders on AnyPS5 with my open RADV PRs (#1732, #1733-#1736, #1819, #1825 and others), so both builds are main aa277b38 merged into the same local branch carrying them, with and without this PR:

FPS (title bar) [present] per 10 s GPU idle per present Graphics::Draw per draw [storage] uploads per 10 s
without this PR 15.5 152-154 21-22 ms 9672 us 3294 / 13994 MiB (3266 untracked)
with this PR 29.2 287 2.2 ms 193 us none
before #1441 (older base, for reference) 27.5 274-277 3.5-3.7 ms 185 us none

Without it, every draw re-uploads ccleste's storage images in full (reason untracked; [buffers] image mirrors reports 804 unwatched heaps), and draws hold the GPU mutex for about 10 ms each. With it, the uploads and unwatched heaps are gone and the log reads host imports stay watched; pages marked written while an import settles are compared, not trusted. The title screen renders the same in both.

To isolate the cause beforehand, I set only unwatchImports back to false in decideImportWatch on the slow build: 26.8 FPS. #1472 and #1474 made no difference.

I only measured the frame-rate side; I did not test the #1434 side here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6070012444 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1847#issuecomment-6070012444). Originally posted by [TheAggie](https://github.com/TheAggie) on 2026-10-08T22:09:36Z. --- A second title for this, with a different workload: ccleste (PPSA59322), a homebrew port that renders through RADV (Mesa's Vulkan driver on the PS5) and writes its frames through storage images. #1441 halved its frame rate here, and this PR restores it. Windows 11 Pro (26200), RTX 5070 Ti (driver 610.88), WinLibs GCC 15.2.0 r7, Release, `APS5_PROFILE_DRAW=1`, 35 s runs on the title screen, 10 s windows. ccleste only renders on AnyPS5 with my open RADV PRs (#1732, #1733-#1736, #1819, #1825 and others), so both builds are `main` `aa277b38` merged into the same local branch carrying them, with and without this PR: | | FPS (title bar) | `[present]` per 10 s | GPU idle per present | `Graphics::Draw` per draw | `[storage]` uploads per 10 s | |---|---|---|---|---|---| | without this PR | 15.5 | 152-154 | 21-22 ms | 9672 us | 3294 / 13994 MiB (3266 `untracked`) | | with this PR | 29.2 | 287 | 2.2 ms | 193 us | none | | before #1441 (older base, for reference) | 27.5 | 274-277 | 3.5-3.7 ms | 185 us | none | Without it, every draw re-uploads ccleste's storage images in full (reason `untracked`; `[buffers] image mirrors` reports 804 unwatched heaps), and draws hold the GPU mutex for about 10 ms each. With it, the uploads and unwatched heaps are gone and the log reads `host imports stay watched; pages marked written while an import settles are compared, not trusted`. The title screen renders the same in both. To isolate the cause beforehand, I set only `unwatchImports` back to `false` in `decideImportWatch` on the slow build: 26.8 FPS. #1472 and #1474 made no difference. I only measured the frame-rate side; I did not test the #1434 side here. AI-assisted (Claude Code).
fisherjoey commented 2026-10-09 01:05:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-09T01:05:01Z.


A possible gap in the byte check that I'd like to confirm with you. I found it by reading the code and can't run the Windows path here (Linux only), so it may not show up in practice.

Only Cpu walks refresh the settle copy. settlingKind returns early for StampKind::Driver (GuestMemory.cpp:1054), so after storeOwn writes GPU results into a settling import (Cpu walk, store, Driver walk at 1340-1342), the copy still has the pre-import bytes. #1434 says the late mark can come more than 150 ms after the import. If it lands after that store, the next collect compares the written-back bytes with the old copy, sees a difference and stamps the page Cpu. ChangedBlocks then reports the 64 KiB block as BlockWritten, and the next write-back over it skips the block (Texture.cpp:3423). That's the #1434 symptom again.

I ran a standalone copy of settlingKind: a late mark with unchanged bytes gives ImportWindow, and the same page after a storeOwn gives Cpu.

Minimal fix: let the Driver walk refresh the copy.

StampKind settlingKind(WriteTracker& tracker, std::uintptr_t page, StampKind kind) {
    if (kind == StampKind::ImportWindow) return kind;
    for (auto& entry : tracker.settling) {
        ...
        if (kind == StampKind::Driver) { std::memcpy(saved, current, WritePageBytes); return kind; }
        if (std::memcmp(saved, current, WritePageBytes) == 0) return StampKind::ImportWindow;
        ...

Could you run this on Windows? It's a test in the style of CheckImportSettle. If the gap is real it fails with the message below; if it passes, ignore the rest of this comment.

Require(ImportWatched(base, Block, [] { return true; }, true), "the import callback failed");
StoreOwnBytes(base + 8, 1, [&] { bytes[8] = 0x44; });
generations[0] = TrackerGeneration();
bytes[8] = bytes[8];
CollectWritesUncached(base, Block);
Require(state(base) == BlockMaybeWritten, "a late mark over the driver's own store read as a CPU store");

GPU writes that go straight into the import (MarkWritten, no walk) have the same problem. Refreshing the copy there would capture bytes before the GPU writes them, so I don't have a small fix for that case.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6072141277 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1847#issuecomment-6072141277). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-09T01:05:01Z. --- A possible gap in the byte check that I'd like to confirm with you. I found it by reading the code and can't run the Windows path here (Linux only), so it may not show up in practice. Only `Cpu` walks refresh the settle copy. `settlingKind` returns early for `StampKind::Driver` (GuestMemory.cpp:1054), so after `storeOwn` writes GPU results into a settling import (Cpu walk, store, Driver walk at 1340-1342), the copy still has the pre-import bytes. #1434 says the late mark can come more than 150 ms after the import. If it lands after that store, the next collect compares the written-back bytes with the old copy, sees a difference and stamps the page `Cpu`. `ChangedBlocks` then reports the 64 KiB block as `BlockWritten`, and the next write-back over it skips the block (Texture.cpp:3423). That's the #1434 symptom again. I ran a standalone copy of `settlingKind`: a late mark with unchanged bytes gives `ImportWindow`, and the same page after a `storeOwn` gives `Cpu`. Minimal fix: let the Driver walk refresh the copy. ```cpp StampKind settlingKind(WriteTracker& tracker, std::uintptr_t page, StampKind kind) { if (kind == StampKind::ImportWindow) return kind; for (auto& entry : tracker.settling) { ... if (kind == StampKind::Driver) { std::memcpy(saved, current, WritePageBytes); return kind; } if (std::memcmp(saved, current, WritePageBytes) == 0) return StampKind::ImportWindow; ... ``` Could you run this on Windows? It's a test in the style of `CheckImportSettle`. If the gap is real it fails with the message below; if it passes, ignore the rest of this comment. ```cpp Require(ImportWatched(base, Block, [] { return true; }, true), "the import callback failed"); StoreOwnBytes(base + 8, 1, [&] { bytes[8] = 0x44; }); generations[0] = TrackerGeneration(); bytes[8] = bytes[8]; CollectWritesUncached(base, Block); Require(state(base) == BlockMaybeWritten, "a late mark over the driver's own store read as a CPU store"); ``` GPU writes that go straight into the import (`MarkWritten`, no walk) have the same problem. Refreshing the copy there would capture bytes before the GPU writes them, so I don't have a small fix for that case. AI-assisted: yes
JAB-dev commented 2026-10-09 05:02:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-09T05:02:17Z.


@fisherjoey thanks, good catch, the storeOwn case was real. Without a fix your test fails here on Windows. 9a4b70f4 refreshes the copy for the stored range in storeOwn's stamping, so it also covers the store paths that don't walk, and your test is now part of CheckImportSettle.

For MarkWritten I left it as is: treating those pages as maybe written makes agc_driver_recorder_tests lose a CPU store made right after a GPU write, so it's noted in TechnicalDebt instead.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6074630427 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1847#issuecomment-6074630427). Originally posted by [JAB-dev](https://github.com/JAB-dev) on 2026-10-09T05:02:17Z. --- @fisherjoey thanks, good catch, the `storeOwn` case was real. Without a fix your test fails here on Windows. 9a4b70f4 refreshes the copy for the stored range in `storeOwn`'s stamping, so it also covers the store paths that don't walk, and your test is now part of `CheckImportSettle`. For `MarkWritten` I left it as is: treating those pages as maybe written makes `agc_driver_recorder_tests` lose a CPU store made right after a GPU write, so it's noted in TechnicalDebt instead.
popcoder565 commented 2026-10-09 08:22:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T08:22:26Z.


Ran this on the driver that shows #1434's late marking, as asked in #1434.

Setup: Windows 10 (19045), RTX 3060 Laptop GPU, NVIDIA 616.92, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. This PR's head 9a4b70f4 merged onto main 6cc0503d, plus #2093, which main currently needs to build. The earlier head ec961ed8 on main f1451396 gave the same numbers.

agc_driver_dcc_keys_first_write agc_driver_srgb8_color_target
main (compares every import, #1441) 30/30 30/30
this PR, default 30/30 30/30
this PR, APS5_WRITE_WATCH_IMPORTS=watch 0/20 9/20
this PR, APS5_WRITE_WATCH_IMPORTS=unwatch 20/20 20/20
  • Late marking: this driver still marks imported pages late on its own. With plain watching, srgb8_color_target fails 11 of 20 runs without any rewrite from the test, for example a multiply blend into an 8_SRGB target beside a linear target: byte 1 inside the scissor is 7, expected 2 from 7. By default the settle period absorbs those marks.
  • dcc_keys_first_write with watch: it fails every run with the expected message (the write-back stored 0 written and 0 cleared bytes of 65536, expected 128 written).
  • Full ctest: 494/494, with the GPU tests on the RTX 3060.
  • agc_driver_recorder_tests: built explicitly, since it's EXCLUDE_FROM_ALL.
    • It passes 5/5 by default and passes with watch.
    • With unwatch it stops at its check of the Windows default (Windows host imports were compared by default). That's expected when the default is overridden.

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077240672 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1847#issuecomment-6077240672). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T08:22:26Z. --- Ran this on the driver that shows #1434's late marking, as asked in #1434. Setup: Windows 10 (19045), RTX 3060 Laptop GPU, NVIDIA 616.92, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. This PR's head `9a4b70f4` merged onto `main` 6cc0503d, plus #2093, which `main` currently needs to build. The earlier head `ec961ed8` on `main` f1451396 gave the same numbers. | | `agc_driver_dcc_keys_first_write` | `agc_driver_srgb8_color_target` | |---|---|---| | `main` (compares every import, #1441) | 30/30 | 30/30 | | this PR, default | 30/30 | 30/30 | | this PR, `APS5_WRITE_WATCH_IMPORTS=watch` | 0/20 | 9/20 | | this PR, `APS5_WRITE_WATCH_IMPORTS=unwatch` | 20/20 | 20/20 | - **Late marking:** this driver still marks imported pages late on its own. With plain watching, `srgb8_color_target` fails 11 of 20 runs without any rewrite from the test, for example `a multiply blend into an 8_SRGB target beside a linear target: byte 1 inside the scissor is 7, expected 2 from 7`. By default the settle period absorbs those marks. - **`dcc_keys_first_write` with `watch`:** it fails every run with the expected message (`the write-back stored 0 written and 0 cleared bytes of 65536, expected 128 written`). - **Full ctest:** 494/494, with the GPU tests on the RTX 3060. - **`agc_driver_recorder_tests`:** built explicitly, since it's `EXCLUDE_FROM_ALL`. - It passes 5/5 by default and passes with `watch`. - With `unwatch` it stops at its check of the Windows default (`Windows host imports were compared by default`). That's expected when the default is overridden. No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
Rohan03x commented 2026-10-09 11:38:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Rohan03x on 2026-10-09T11:38:07Z.


Tested on Windows with another title and GPU.

Setup: Windows 11 22621, Ryzen 7 5700X, RTX 3070, Dreaming Sarah (PPSA02929), GCC 15.2.0 UCRT Release. PR merged onto main f1451396; ctest 488/488.

Build FPS uploads / 10 s reason "untracked" refresh write-backs presents refreshed first
main f1451396 17.1 2716 / 21463 MiB 2710 / 21356 MiB 1449 / 11059 MiB 207 of 207
this PR 59.95 7 / 110.6 MiB none none 0 of 1782
#1994, APS5_WRITE_WATCH_IMPORTS=watch 59.97 none reported none none 0 of 1190

On main, APS5_PROFILE_GPU shows storage-upload 2200 ms and storage-writeback 1378 ms of about 3715 ms timed per 10 s; the two 3840x2160 display buffers are re-uploaded on every draw and present. Average recorded draw: 1019 µs on main, 19 µs with this PR.

Limits: runs were under a minute and stayed on the title screen and main menu, not gameplay. No crash and no visible difference in that time. agc_driver_recorder_tests is not registered in ctest, so it was not run.

AI-assisted: yes (build, log analysis and this write-up).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6080097305 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1847#issuecomment-6080097305). Originally posted by [Rohan03x](https://github.com/Rohan03x) on 2026-10-09T11:38:07Z. --- Tested on Windows with another title and GPU. **Setup:** Windows 11 22621, Ryzen 7 5700X, RTX 3070, Dreaming Sarah (PPSA02929), GCC 15.2.0 UCRT Release. PR merged onto main `f1451396`; ctest 488/488. | Build | FPS | uploads / 10 s | reason "untracked" | refresh write-backs | presents refreshed first | |---|---|---|---|---|---| | main `f1451396` | 17.1 | 2716 / 21463 MiB | 2710 / 21356 MiB | 1449 / 11059 MiB | 207 of 207 | | this PR | 59.95 | 7 / 110.6 MiB | none | none | 0 of 1782 | | #1994, `APS5_WRITE_WATCH_IMPORTS=watch` | 59.97 | none reported | none | none | 0 of 1190 | On main, `APS5_PROFILE_GPU` shows storage-upload 2200 ms and storage-writeback 1378 ms of about 3715 ms timed per 10 s; the two 3840x2160 display buffers are re-uploaded on every draw and present. Average recorded draw: 1019 µs on main, 19 µs with this PR. **Limits:** runs were under a minute and stayed on the title screen and main menu, not gameplay. No crash and no visible difference in that time. `agc_driver_recorder_tests` is not registered in ctest, so it was not run. AI-assisted: yes (build, log analysis and this write-up).
JAB-dev commented 2026-10-09 15:22:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-09T15:22:30Z.


Closing this, #2096 fixed the same regression on main a different way (shared aliases keep their write tracking, direct imports compare against a texture snapshot). On main d70b8998 Animal Well now runs at 587–588 presents/10 s with 0 full rescache walks, the same as with this PR, so there's nothing left for it to do.

Thanks @popcoder565 and @Rohan03x for testing on the 616.92 driver and Dreaming Sarah, and @fisherjoey for the review.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6083874493 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1847#issuecomment-6083874493). Originally posted by [JAB-dev](https://github.com/JAB-dev) on 2026-10-09T15:22:30Z. --- Closing this, #2096 fixed the same regression on main a different way (shared aliases keep their write tracking, direct imports compare against a texture snapshot). On main d70b8998 Animal Well now runs at 587–588 presents/10 s with 0 full rescache walks, the same as with this PR, so there's nothing left for it to do. Thanks @popcoder565 and @Rohan03x for testing on the 616.92 driver and Dreaming Sarah, and @fisherjoey for the review.

Pull request closed

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!1847
No description provided.