fix(win): windows host import texture reuploads #2096

Merged
boykopovar merged 3 commits from upstream-pr/2096 into main 2026-10-09 09:56:46 +00:00
boykopovar commented 2026-10-09 08:22:29 +00:00 (Migrated from github.com)

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


What

Preserve CPU write tracking for Windows shared memory imported through a separate Vulkan alias. Avoid redundant texture uploads and write-backs. Retain byte comparisons for imports without reliable tracking.

The regression appeared presumably in 838d02a8 - fix(agc): compare Windows host imports after late driver writes

Tested

Windows, NVIDIA GeForce GTX 1050 Ti Dreaming Sarah: 12fps -> 60 fps

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
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4797954118 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2096). Originally posted by [boykopovar](https://github.com/boykopovar) on 2026-10-09T08:22:29Z. --- ### What Preserve CPU write tracking for Windows shared memory imported through a separate Vulkan alias. Avoid redundant texture uploads and write-backs. Retain byte comparisons for imports without reliable tracking. > The regression appeared presumably in 838d02a8 - fix(agc): compare Windows host imports after late driver writes ### Tested Windows, NVIDIA GeForce GTX 1050 Ti Dreaming Sarah: 12fps -> 60 fps ### 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [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
github-actions[bot] commented 2026-10-09 08:48:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T08:48:21Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1847 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp L1228-1229
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L292, L413-414
docs/dev/TechnicalDebt.md L249
#1860 docs/dev/TechnicalDebt.md L249
#1960 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp L1263
#1994 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L292
docs/dev/TechnicalDebt.md L249
#1995 docs/dev/TechnicalDebt.md L248-249
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077611665 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2096#issuecomment-6077611665). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T08:48:21Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1847 | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` [L1228-1229](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp#L1228-L1229)<br>`core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` [L292](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L292), [L413-414](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L413-L414)<br>`docs/dev/TechnicalDebt.md` [L249](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/docs/dev/TechnicalDebt.md#L249) | | | | #1860 | `docs/dev/TechnicalDebt.md` [L249](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/docs/dev/TechnicalDebt.md#L249) | | | | #1960 | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` [L1263](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp#L1263) | | | | #1994 | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` [L292](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L292)<br>`docs/dev/TechnicalDebt.md` [L249](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/docs/dev/TechnicalDebt.md#L249) | | | | #1995 | `docs/dev/TechnicalDebt.md` [L248-249](https://github.com/boykopovar/AnyPS5/blob/ede2a9cb1f61b3ec3336db94c6393e6c25a8aa4e/docs/dev/TechnicalDebt.md#L248-L249) | | |
popcoder565 commented 2026-10-09 09:52:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T09:52:55Z.


Corrected: the device loss below also happens without this PR, though less often. Only the refresh store failure comes from it (commit 0e1d25a8). Measurements are in #2155.

Windows run on the driver that shows #1434's late marking. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 3ed0d036 merged onto main b7218b3c.

  • agc_driver_dcc_keys_first_write and agc_driver_srgb8_color_target pass 30/30 each, so #1434 stays fixed here.
  • Full ctest: 494/494, twice.
  • agc_driver_recorder_tests (not in ctest; built with --target) fails 5 of 5.
    • In 2 runs it fails with the refresh's store of the results did not reach guest memory (Recorder.cpp:1672, storageRefreshTests). After a draw and image->Refresh(), the image holds the draw's texels but guest memory doesn't.
    • In 3 runs it fails at the start of the same function with vkQueueSubmit recorder: Vulkan result -4 (VK_ERROR_DEVICE_LOST). main b7218b3c also hits this, in 1 of 18 runs.

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6078569339 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2096#issuecomment-6078569339). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T09:52:55Z. --- **Corrected:** the device loss below also happens without this PR, though less often. Only the refresh store failure comes from it (commit 0e1d25a8). Measurements are in #2155. Windows run on the driver that shows #1434's late marking. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `3ed0d036` merged onto `main` b7218b3c. - `agc_driver_dcc_keys_first_write` and `agc_driver_srgb8_color_target` pass 30/30 each, so #1434 stays fixed here. - Full ctest: 494/494, twice. - `agc_driver_recorder_tests` (not in ctest; built with `--target`) fails 5 of 5. - In 2 runs it fails with `the refresh's store of the results did not reach guest memory` (`Recorder.cpp:1672`, `storageRefreshTests`). After a draw and `image->Refresh()`, the image holds the draw's texels but guest memory doesn't. - In 3 runs it fails at the start of the same function with `vkQueueSubmit recorder: Vulkan result -4` (`VK_ERROR_DEVICE_LOST`). `main` b7218b3c also hits this, in 1 of 18 runs. No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
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!2096
No description provided.