fix(agc): keep resident DCC targets watched under aligned block imports #8172

Merged
wachi35676 merged 1 commit from upstream-pr/8172 into main 2026-10-20 07:07:19 +00:00
wachi35676 commented 2026-10-20 01:17:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-20T01:17:38Z.


What

Fixes #8103. Since #6457, agc_driver_msaa_dcc_clear_4 has failed on Windows on both NVIDIA and AMD. Two separate problems cause it, and this PR fixes both.

1. ImportWatched unwatched the whole import (Execution/src/GuestMemory.cpp)

#6457 imports adjacent registered ranges as one aligned power-of-two block. In the test, that block is 0x200000000+0x400000, and it contains:

  • two 256 KiB blocks that earlier sub-settle-floor imports had taken out of the write watch, and
  • the resident 4x color target and its DCC metadata.

ImportWatched(..., staysWatched = true) checked whether the whole run was covered. One unwatched block made before false, and it then called unwatchLocked over the whole run, which took the resident target out of the watch. checkDccCurrent then failed with multisampled DCC target reuse requires watched guest memory.

The fix splits the run into maximal runs of watched 64 KiB blocks. For each run it:

  • saves the window copy,
  • walks it before the import, and
  • walks and compares it against the window after the import.

It unwatches only the parts that were not watched or whose walk failed.

  • A wholly covered run takes exactly the old path: one span, the same copy, the same walks and the same failure handling.
  • The !staysWatched path is unchanged.

2. DCC metadata generations came from a walk of the metadata pages only (Graphics/src/MultisampleTarget.cpp)

With (1) alone, the test got further and failed with writes to a resident multisampled DCC target or its metadata are not implemented (DCC range 0x2003b0000+0x1000). A diagnostic trace showed why:

  • The metadata is a 4 KiB range at the start of a 64 KiB block that the CPU wrote whole before the target became resident.
  • initialDccClear and absorbDccFill took the range's generation from CollectWritesUncached(range). That walk covered only the 4 KiB, so the other 15 pages still had write-watch bits pending.
  • The 4 MiB import's walk before the import stamped those pages as a CPU store newer than the generation. The window walk after the import then marked the metadata page as possibly stored over: the driver had resolved its write protection, and its bytes were unchanged. So both UnchangedSince and page-level StoredOver failed.

The generations are now taken from a walk of the whole 64 KiB blocks around the range (collectBlocks). If that walk returns 0, they fall back to a walk of the range alone. Every write collected this way was made before the generation, so this can only make the tracking more precise.

  • A CPU store to the metadata page after the generation is still refused (see the new negative check below).
  • A store to a neighbouring page after the generation stays allowed, as before, through the page-level StoredOver.

Why there are two changes. Each one fixes a separate refusal, and the test passes only with both (see Tested). Plan (a) in the bisect comment, changing importRun, was not used: sameRange also goes through importRun when imports are refreshed, so its result can't depend on the watch state. This PR leaves importRun and #6457's block selection unchanged.

Credit. @simonbbby's control in the issue, SetHostImportWindow(BlockBytes) in DccRefillTests, is what pointed at the multi-range block. Their Linux data (the test passes at 9127ea36d, 524259954 and main, because the Linux fixture's mmap addresses never form the block) confirms that the failure depends on the memory layout.

Regression tests. Both are layout-independent, so they do not rely on the Windows arena addresses:

  • agc_write_tracking, new CheckImportWindowOverUnwatchedBlock (GuestMemory level, no Vulkan, both platforms):
    • It unwatches one block of four and imports all four with staysWatched.
    • It requires the three watched blocks to stay watched and the unwatched one to stay unwatched.
    • It also checks the window stamps inside the kept blocks: a resolved page with unchanged bytes reads as unchanged; a store of new bytes inside the window, and a CPU store made before the import, read as written.
  • agc_driver_msaa_dcc_clear_{2,4,8}, new DccImportWindowTests:
    • It makes a DCC target resident, then imports its metadata block with a same-byte store to the metadata page, which stands in for a driver resolving write protection. The next draw must be accepted.
    • A second import stores a new byte there, and the next draw must be refused with writes to a resident multisampled DCC.

Remaining case, not fixed here: if the CPU stores to another page of the metadata's 64 KiB block after the generation, and an import window later covers the metadata page, the draw is still refused. The window conservatively counts a resolved page as possibly touched by the CPU, and I left that tracker rule alone.

Overlap:

  • #6308 (LeandroLP23) and #7505 (AlxcBTW, stacked on #6308) change the same fallback in ImportWatched to run the unwatch hook.
    • #6308's new test CheckImportWindowOverUnwatchedPart asserts the opposite of this PR: that an import over a partly unwatched range unwatches its watched blocks too.
    • With this PR, the staysWatched path unwatches only gaps that were already unwatched, plus spans whose own walk failed or that overlap a host region. The hook would then need to run only over those pieces.
    • Whichever lands second needs a rebase; I'm happy to do it on either side.
  • #6759 (Zenodeon) restores the watch for remapped pages. It touches GuestMemory.cpp, but not ImportWatched's run handling.

Tested

Windows 11 Home 26300, Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, Ninja, on main 525344688. Environment: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 APS5_NO_PIPELINE_JOURNAL=1.

The Khronos validation layer is not installed on this machine, so the VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation run was not done.

Focused tests:

main, original tests new tests + (2) only new tests + (1) only this PR
agc_write_tracking passes fails: took the watched blocks out of the write watch passes passes
agc_driver_msaa_dcc_clear_4 requires watched guest memory requires watched guest memory writes to a resident multisampled DCC passes
agc_driver_msaa_dcc_clear_2, _8 pass pass writes to a resident multisampled DCC (the new DccImportWindowTests) pass
  • The table holds on both the RTX 5070 Ti and the Radeon iGPU.
  • With this PR, agc_driver_msaa_dcc_clear_{2,4,8}, agc_driver_msaa_dcc_state and agc_write_tracking passed 3 runs of 3 on each GPU.

ctest -R "agc|shader|spirv|recomp|guest_memory|import|watch" -j6 (837 tests):

  • NVIDIA
    • main fails 3: agc_driver_msaa_dcc_clear_4, agc_driver_pass_input_hazard, agc_pipeline_journal.
    • This PR fails 2 of those: agc_driver_pass_input_hazard and agc_pipeline_journal, both of which also fail on main when run alone.
    • This PR's run also failed agc_driver_sgpr_pattern_fill_keys. That is a 10 s polling deadline that times out under load on main too: 2 of 8 parallel batches failed on main, and 0 of 8 with this PR on an idle machine. It passes serially.
  • AMD
    • main fails 7: agc_driver_msaa_dcc_clear_4, agc_driver_draw_cache_reuse{,_verify,_inline}, agc_driver_layered_volume_vertex_no_gpl, agc_driver_stencil_replay_no_gpl, agc_pipeline_journal.
    • This PR fails the same set minus agc_driver_msaa_dcc_clear_4, plus two others:
      • agc_driver_sgpr_pattern_fill_keys, the same load-dependent timeout as above.
      • agc_trimmed_import, which fails 5 of 5 serially on main on this iGPU too (after an unmap of 1440 KiB ... served from the import that pinned the old ones). It passed on main only in that run's parallel batch.

#6457's claims: importRun and the block choice are not touched. The tests that carry #6457's import counts and costs pass on both GPUs: agc_storage_writeback_blocks, agc_driver_graphics (the BdaResources mocks), agc_driver_storage_write_back_overhang and the host_import tests.

  • The only new cost is on an import whose range is only partly watched: it now copies, compares and walks its watched blocks. That is the same work a fully watched import of that size already did on main.
  • I did not take a title performance trace.

Linux: WSL Ubuntu 24.04, gcc 13.3, built from this branch and from main. Same suite:

  • main fails 18, and this PR fails 17, the same set minus agc_driver_sgpr_pattern_fill_keys.
  • WSL has no userfaultfd write protection ([memory] write watch unavailable), so agc_write_tracking is skipped and the DCC tests fail at initial multisampled DCC contents require watched guest memory, on main and here alike.
  • The new tests have therefore not run on a Linux machine with write watching.

python tools/check_conventions.py --base origin/main passes on Python 3.13 and 3.9.

Checklist

  • Based on current main; no other open PR implements the same functions (#6308 and #7505 change the same fallback differently; see Overlap)
  • 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 (none added)
  • 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 (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Fixes #8103
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1742), Windows 11; AMD Radeon(TM) Graphics iGPU, Ryzen 5 9600X (driver 32.0.21042.62), Windows 11; no validation layer run (layer not installed)
  • AI-assisted: yes. Written with Claude Code; the tests above were run on this machine.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4929607769 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8172). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-20T01:17:38Z. --- ### What Fixes #8103. Since #6457, `agc_driver_msaa_dcc_clear_4` has failed on Windows on both NVIDIA and AMD. Two separate problems cause it, and this PR fixes both. **1. `ImportWatched` unwatched the whole import** (`Execution/src/GuestMemory.cpp`) #6457 imports adjacent registered ranges as one aligned power-of-two block. In the test, that block is `0x200000000+0x400000`, and it contains: - two 256 KiB blocks that earlier sub-settle-floor imports had taken out of the write watch, and - the resident 4x color target and its DCC metadata. `ImportWatched(..., staysWatched = true)` checked whether the whole run was covered. One unwatched block made `before` false, and it then called `unwatchLocked` over the whole run, which took the resident target out of the watch. `checkDccCurrent` then failed with `multisampled DCC target reuse requires watched guest memory`. The fix splits the run into maximal runs of watched 64 KiB blocks. For each run it: - saves the window copy, - walks it before the import, and - walks and compares it against the window after the import. It unwatches only the parts that were not watched or whose walk failed. - A wholly covered run takes exactly the old path: one span, the same copy, the same walks and the same failure handling. - The `!staysWatched` path is unchanged. **2. DCC metadata generations came from a walk of the metadata pages only** (`Graphics/src/MultisampleTarget.cpp`) With (1) alone, the test got further and failed with `writes to a resident multisampled DCC target or its metadata are not implemented (DCC range 0x2003b0000+0x1000)`. A diagnostic trace showed why: - The metadata is a 4 KiB range at the start of a 64 KiB block that the CPU wrote whole before the target became resident. - `initialDccClear` and `absorbDccFill` took the range's generation from `CollectWritesUncached(range)`. That walk covered only the 4 KiB, so the other 15 pages still had write-watch bits pending. - The 4 MiB import's walk before the import stamped those pages as a CPU store newer than the generation. The window walk after the import then marked the metadata page as possibly stored over: the driver had resolved its write protection, and its bytes were unchanged. So both `UnchangedSince` and page-level `StoredOver` failed. The generations are now taken from a walk of the whole 64 KiB blocks around the range (`collectBlocks`). If that walk returns 0, they fall back to a walk of the range alone. Every write collected this way was made before the generation, so this can only make the tracking more precise. - A CPU store to the metadata page after the generation is still refused (see the new negative check below). - A store to a neighbouring page after the generation stays allowed, as before, through the page-level `StoredOver`. **Why there are two changes.** Each one fixes a separate refusal, and the test passes only with both (see Tested). Plan (a) in the bisect comment, changing `importRun`, was not used: `sameRange` also goes through `importRun` when imports are refreshed, so its result can't depend on the watch state. This PR leaves `importRun` and #6457's block selection unchanged. **Credit.** @simonbbby's control in the issue, `SetHostImportWindow(BlockBytes)` in `DccRefillTests`, is what pointed at the multi-range block. Their Linux data (the test passes at 9127ea36d, 524259954 and main, because the Linux fixture's mmap addresses never form the block) confirms that the failure depends on the memory layout. **Regression tests.** Both are layout-independent, so they do not rely on the Windows arena addresses: - `agc_write_tracking`, new `CheckImportWindowOverUnwatchedBlock` (GuestMemory level, no Vulkan, both platforms): - It unwatches one block of four and imports all four with `staysWatched`. - It requires the three watched blocks to stay watched and the unwatched one to stay unwatched. - It also checks the window stamps inside the kept blocks: a resolved page with unchanged bytes reads as unchanged; a store of new bytes inside the window, and a CPU store made before the import, read as written. - `agc_driver_msaa_dcc_clear_{2,4,8}`, new `DccImportWindowTests`: - It makes a DCC target resident, then imports its metadata block with a same-byte store to the metadata page, which stands in for a driver resolving write protection. The next draw must be accepted. - A second import stores a new byte there, and the next draw must be refused with `writes to a resident multisampled DCC`. **Remaining case, not fixed here:** if the CPU stores to another page of the metadata's 64 KiB block *after* the generation, and an import window later covers the metadata page, the draw is still refused. The window conservatively counts a resolved page as possibly touched by the CPU, and I left that tracker rule alone. **Overlap:** - #6308 (LeandroLP23) and #7505 (AlxcBTW, stacked on #6308) change the same fallback in `ImportWatched` to run the unwatch hook. - #6308's new test `CheckImportWindowOverUnwatchedPart` asserts the opposite of this PR: that an import over a partly unwatched range unwatches its watched blocks too. - With this PR, the staysWatched path unwatches only gaps that were already unwatched, plus spans whose own walk failed or that overlap a host region. The hook would then need to run only over those pieces. - Whichever lands second needs a rebase; I'm happy to do it on either side. - #6759 (Zenodeon) restores the watch for remapped pages. It touches `GuestMemory.cpp`, but not `ImportWatched`'s run handling. ### Tested Windows 11 Home 26300, Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, Ninja, on `main` 525344688. Environment: `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 APS5_NO_PIPELINE_JOURNAL=1`. The Khronos validation layer is not installed on this machine, so the `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` run was **not** done. **Focused tests:** | | main, original tests | new tests + (2) only | new tests + (1) only | this PR | | --- | --- | --- | --- | --- | | `agc_write_tracking` | passes | fails: `took the watched blocks out of the write watch` | passes | passes | | `agc_driver_msaa_dcc_clear_4` | `requires watched guest memory` | `requires watched guest memory` | `writes to a resident multisampled DCC` | passes | | `agc_driver_msaa_dcc_clear_2`, `_8` | pass | pass | `writes to a resident multisampled DCC` (the new `DccImportWindowTests`) | pass | - The table holds on both the RTX 5070 Ti and the Radeon iGPU. - With this PR, `agc_driver_msaa_dcc_clear_{2,4,8}`, `agc_driver_msaa_dcc_state` and `agc_write_tracking` passed 3 runs of 3 on each GPU. **`ctest -R "agc|shader|spirv|recomp|guest_memory|import|watch" -j6` (837 tests):** - **NVIDIA** - main fails 3: `agc_driver_msaa_dcc_clear_4`, `agc_driver_pass_input_hazard`, `agc_pipeline_journal`. - This PR fails 2 of those: `agc_driver_pass_input_hazard` and `agc_pipeline_journal`, both of which also fail on main when run alone. - This PR's run also failed `agc_driver_sgpr_pattern_fill_keys`. That is a 10 s polling deadline that times out under load on main too: 2 of 8 parallel batches failed on main, and 0 of 8 with this PR on an idle machine. It passes serially. - **AMD** - main fails 7: `agc_driver_msaa_dcc_clear_4`, `agc_driver_draw_cache_reuse{,_verify,_inline}`, `agc_driver_layered_volume_vertex_no_gpl`, `agc_driver_stencil_replay_no_gpl`, `agc_pipeline_journal`. - This PR fails the same set minus `agc_driver_msaa_dcc_clear_4`, plus two others: - `agc_driver_sgpr_pattern_fill_keys`, the same load-dependent timeout as above. - `agc_trimmed_import`, which fails 5 of 5 serially on main on this iGPU too (`after an unmap of 1440 KiB ... served from the import that pinned the old ones`). It passed on main only in that run's parallel batch. **#6457's claims:** `importRun` and the block choice are not touched. The tests that carry #6457's import counts and costs pass on both GPUs: `agc_storage_writeback_blocks`, `agc_driver_graphics` (the BdaResources mocks), `agc_driver_storage_write_back_overhang` and the `host_import` tests. - The only new cost is on an import whose range is only partly watched: it now copies, compares and walks its watched blocks. That is the same work a fully watched import of that size already did on main. - I did not take a title performance trace. **Linux:** WSL Ubuntu 24.04, gcc 13.3, built from this branch and from main. Same suite: - main fails 18, and this PR fails 17, the same set minus `agc_driver_sgpr_pattern_fill_keys`. - WSL has no userfaultfd write protection (`[memory] write watch unavailable`), so `agc_write_tracking` is skipped and the DCC tests fail at `initial multisampled DCC contents require watched guest memory`, on main and here alike. - The new tests have therefore **not** run on a Linux machine with write watching. `python tools/check_conventions.py --base origin/main` passes on Python 3.13 and 3.9. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions (#6308 and #7505 change the same fallback differently; see Overlap) - [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 (none added) - [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 (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: Fixes #8103 - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1742), Windows 11; AMD Radeon(TM) Graphics iGPU, Ryzen 5 9600X (driver 32.0.21042.62), Windows 11; no validation layer run (layer not installed) - [x] AI-assisted: yes. Written with Claude Code; the tests above were run on this machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-20 01:21:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T01:21:27Z.


FYI, I have PR #8169 open for the same #8103 report, with a narrower importRun guard that avoids selecting an aligned block spanning unwatched ranges. Your PR addresses the same initial watch-loss failure and also covers the later DCC metadata-generation refusal with separate tests. I am linking the two for comparison; I have not copied or changed your branch.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6281091174 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8172#issuecomment-6281091174). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T01:21:27Z. --- FYI, I have PR #8169 open for the same #8103 report, with a narrower `importRun` guard that avoids selecting an aligned block spanning unwatched ranges. Your PR addresses the same initial watch-loss failure and also covers the later DCC metadata-generation refusal with separate tests. I am linking the two for comparison; I have not copied or changed your branch.
github-actions[bot] commented 2026-10-20 01:26:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T01:26:09Z.


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
PR 6308 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp L1576
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp L1329
PR 7948 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L38
PR 7981 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp L1544-1563, L1574-1576
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp L1046, L1329-1330

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6185 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6187 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6273 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6628 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6683 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6718 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6759 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6820 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6868 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 6926 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6946 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6960 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6971 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 7332 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 7505 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 7604 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 7615 core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6281149396 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8172#issuecomment-6281149396). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T01:26:09Z. --- <!-- 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 | |---|---|---|---| | [PR 6308](https://www.github.com/boykopovar/AnyPS5/pull/6308) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` [L1576](https://github.com/boykopovar/AnyPS5/blob/49fd13a74150cfffdfcdfefd3c90404403e922b8/core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp#L1576)<br>`core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` [L1329](https://github.com/boykopovar/AnyPS5/blob/49fd13a74150cfffdfcdfefd3c90404403e922b8/core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp#L1329) | | | | [PR 7948](https://www.github.com/boykopovar/AnyPS5/pull/7948) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` [L38](https://github.com/boykopovar/AnyPS5/blob/49fd13a74150cfffdfcdfefd3c90404403e922b8/core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp#L38) | | | | [PR 7981](https://www.github.com/boykopovar/AnyPS5/pull/7981) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` [L1544-1563](https://github.com/boykopovar/AnyPS5/blob/49fd13a74150cfffdfcdfefd3c90404403e922b8/core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp#L1544-L1563), [L1574-1576](https://github.com/boykopovar/AnyPS5/blob/49fd13a74150cfffdfcdfefd3c90404403e922b8/core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp#L1574-L1576)<br>`core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` [L1046](https://github.com/boykopovar/AnyPS5/blob/49fd13a74150cfffdfcdfefd3c90404403e922b8/core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp#L1046), [L1329-1330](https://github.com/boykopovar/AnyPS5/blob/49fd13a74150cfffdfcdfefd3c90404403e922b8/core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp#L1329-L1330) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6185](https://www.github.com/boykopovar/AnyPS5/pull/6185) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6187](https://www.github.com/boykopovar/AnyPS5/pull/6187) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6209](https://www.github.com/boykopovar/AnyPS5/pull/6209) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6273](https://www.github.com/boykopovar/AnyPS5/pull/6273) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6628](https://www.github.com/boykopovar/AnyPS5/pull/6628) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6759](https://www.github.com/boykopovar/AnyPS5/pull/6759) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 6820](https://www.github.com/boykopovar/AnyPS5/pull/6820) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` | | [PR 6926](https://www.github.com/boykopovar/AnyPS5/pull/6926) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6960](https://www.github.com/boykopovar/AnyPS5/pull/6960) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` | | [PR 6971](https://www.github.com/boykopovar/AnyPS5/pull/6971) | `core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` | | [PR 7615](https://www.github.com/boykopovar/AnyPS5/pull/7615) | `core/libs/prx/libSceAgcDriver/tests/WriteTracking.cpp` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp` |
simonbbby commented 2026-10-20 02:25:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbbby on 2026-10-20T02:25:19Z.


Native Linux with working write watching fills the WSL coverage gap for exact head 58f0e89ca353671960a1f38c31a3765ae93d60f5 (parent 5253446882472f584358007637dd18d77c48e16a). I rebuilt the fixtures and runtime dependencies, retaining the new tests in all controls.

The mixed-watch regression is discriminating on Linux:

  • With both production files restored to the exact parent, agc_write_tracking fails 3/3 fresh processes: an import window over an unwatched block took the watched blocks out of the write watch.
  • Restoring only this PR's GuestMemory.cpp, while leaving MultisampleTarget.cpp at the parent, makes it pass 3/3.
  • The complete PR passes 3/3 before the controls and 3/3 after restoring/rebuilding the exact head. No write-watch skip occurred.

DCC compatibility passes, with an important negative-control limit:

  • Complete head, both before and after the controls: 2x/4x/8x pass 3/3 each on RTX 3090 and RADV gfx1036; lavapipe 4x passes 3/3. Actual devices verified from the restricted ICD and loader's Using records. These are 42 GPU test processes across the two complete-head batches.
  • With both production changes reverted, 4x still passes 3/3 on each of those three drivers, consistent with the earlier Linux stock-fixture result in #8103.
  • With only the metadata-generation change reverted, 4x also passes 3/3 on each driver. Thus this Linux result independently validates the mixed-watch fix and compatibility of the DCC checks, but does not reproduce the Windows metadata-generation refusal or prove that second change is necessary here. I have not constructed the Windows 4 MiB allocation layout.

After exact restoration, the registered agc_write_tracking, agc_driver_graphics, agc_driver_msaa_dcc_state, agc_storage_writeback_blocks, agc_host_import_unmap, agc_host_import_retirement, agc_driver_host_import_lifetime, and agc_driver_host_import_mutation_race tests pass 8/8, no skips (3.43 s). These nearby fixture tests are not counted as eight additional GPU executions. The source tree is clean; raw logs are retained.

Ubuntu 24.04, kernel 7.0.0-38, Ryzen 9950X, GCC 13.3, Release; RTX 3090/NVIDIA 595.99.02; gfx1036 1002:13c0/Mesa 25.2.8; lavapipe LLVM 20.1.2. DCC runs use ANYPS5_REQUIRE_VULKAN=1, shader cache and pipeline journal disabled, and other AnyPS5/Vulkan overrides removed. No Khronos validation layer is installed; no validation-layer, Windows, title-performance, or full-suite claim.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6281881570 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8172#issuecomment-6281881570). Originally posted by [simonbbby](https://github.com/simonbbby) on 2026-10-20T02:25:19Z. --- Native Linux with working write watching fills the WSL coverage gap for exact head `58f0e89ca353671960a1f38c31a3765ae93d60f5` (parent `5253446882472f584358007637dd18d77c48e16a`). I rebuilt the fixtures and runtime dependencies, retaining the new tests in all controls. **The mixed-watch regression is discriminating on Linux:** - With both production files restored to the exact parent, `agc_write_tracking` fails 3/3 fresh processes: `an import window over an unwatched block took the watched blocks out of the write watch`. - Restoring only this PR's `GuestMemory.cpp`, while leaving `MultisampleTarget.cpp` at the parent, makes it pass 3/3. - The complete PR passes 3/3 before the controls and 3/3 after restoring/rebuilding the exact head. No write-watch skip occurred. **DCC compatibility passes, with an important negative-control limit:** - Complete head, both before and after the controls: 2x/4x/8x pass 3/3 each on RTX 3090 and RADV gfx1036; lavapipe 4x passes 3/3. Actual devices verified from the restricted ICD and loader's `Using` records. These are 42 GPU test processes across the two complete-head batches. - With both production changes reverted, 4x still passes 3/3 on each of those three drivers, consistent with the earlier Linux stock-fixture result in #8103. - With **only the metadata-generation change reverted**, 4x also passes 3/3 on each driver. Thus this Linux result independently validates the mixed-watch fix and compatibility of the DCC checks, but does **not** reproduce the Windows metadata-generation refusal or prove that second change is necessary here. I have not constructed the Windows 4 MiB allocation layout. After exact restoration, the registered `agc_write_tracking`, `agc_driver_graphics`, `agc_driver_msaa_dcc_state`, `agc_storage_writeback_blocks`, `agc_host_import_unmap`, `agc_host_import_retirement`, `agc_driver_host_import_lifetime`, and `agc_driver_host_import_mutation_race` tests pass **8/8**, no skips (3.43 s). These nearby fixture tests are not counted as eight additional GPU executions. The source tree is clean; raw logs are retained. Ubuntu 24.04, kernel 7.0.0-38, Ryzen 9950X, GCC 13.3, Release; RTX 3090/NVIDIA 595.99.02; gfx1036 `1002:13c0`/Mesa 25.2.8; lavapipe LLVM 20.1.2. DCC runs use `ANYPS5_REQUIRE_VULKAN=1`, shader cache and pipeline journal disabled, and other AnyPS5/Vulkan overrides removed. No Khronos validation layer is installed; no validation-layer, Windows, title-performance, or full-suite claim.
oneandonlydean commented 2026-10-20 02:52:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T02:52:00Z.


The Linux result matches our CI on this head: agc_write_tracking passes on Linux and Windows in run 39353242551. The controls make it usable: the mixed-watch failure at the parent, gone with GuestMemory.cpp alone, is exactly the part Linux can show.

Your limit stands, and the PR should be read that way: the metadata-generation change in MultisampleTarget.cpp is supported only by the Windows ablation in the PR, since the Linux 4x runs pass without it. Neither run shows it necessary on Linux.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6282208532 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8172#issuecomment-6282208532). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T02:52:00Z. --- The Linux result matches our CI on this head: `agc_write_tracking` passes on Linux and Windows in run 39353242551. The controls make it usable: the mixed-watch failure at the parent, gone with `GuestMemory.cpp` alone, is exactly the part Linux can show. Your limit stands, and the PR should be read that way: the metadata-generation change in `MultisampleTarget.cpp` is supported only by the Windows ablation in the PR, since the Linux 4x runs pass without it. Neither run shows it necessary on Linux.
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!8172
No description provided.