fix(agc): settle host imports under a native depth fill before its watch check #26034

Merged
birdmarty merged 3 commits from upstream-pr/26034 into main 2026-11-26 09:34:32 +00:00
birdmarty commented 2026-11-23 04:53:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by birdmarty on 2026-11-23T04:53:41Z.


What

A fill of a native multisampled depth target's whole HTILE refused with native multisample depth metadata fill over unwatched memory is not implemented while a host import of that HTILE was still waiting for its deferred settle. On Windows an import under 1 MiB is unwatched until it settles, so GuestMemory::Watched was false only for that moment: once the import settles, the memory is watched again. The native FMASK path in MultisampleTarget.cpp already settles before it checks (WatchedAfterSettle).

NoteDepthMetadataFill now settles the host imports under the fill, for each device that has a sampled native depth target there, before its watch checks. The host imports belong to one device at a time, and WatchedAfterSettle adopts the device it is given: for a device that does not own them it would park the owner's imports and drop their pending settles. The fill therefore settles through SettleOwnImports, which checks under the imports lock that the device owns the imports and otherwise does nothing. It does so after taking GpuMutex, which settling requires, and before taking the depth surface lock: the settle path takes the imports lock and then the surface lock (rewatchSettledImports → DepthSurfacePendingResultsOverlap), so settling under the surface lock would reverse that order. Memory that is still unwatched after the settle refuses as before.

Changes

  • core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp: settleImportsUnderFill, called at the start of NoteDepthMetadataFill.
  • core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp, Graphics/include/GuestBufferMemory.hpp: SettleOwnImports, a settle that never changes which device owns the host imports.
  • core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp, tests/cmake/agc_driver_native_multisample_depth_tests.cmake: agc_driver_native_depth_fill_over_pending_import, for 2, 4 and 8 samples, on the driver's device (the fixture device has no host imports). A native D32 target with HTILE is sampled, then a host import of its HTILE is made under the unwatch policy, so it waits for its settle and the HTILE reads as unwatched; the policy is restored right after, so only the HTILE is affected. A whole-HTILE fill follows, and sampling must still succeed and return a texture. A second Vulkan device then checks the ownership: with a pending import on the driver's device, SettleOwnImports for the other device must leave it, and the driver's device must then settle it. If no case gets a pending import, the test skips with skipped, the device does not defer the settle of a small host import. The test is registered on Windows only (048218f1e1, by oneandonlydean): the deferred settle exists only there.

No debt entry changes: the change closes no recorded gap and adds none.

Tested

Windows 11 Pro (build 26300), Intel Core i9-9900K, AMD Radeon RX 6800 (AMD driver 26.10.1, Windows driver 32.0.21045.16010, Vulkan 1.4.315), MinGW-w64 GCC 15.3.0, Release, main 03a717f38e.

Focused set (agc_driver_graphics, agc_shader_memory, agc_driver_sample_multisample_target, agc_driver_recorder, agc_driver_cached_image_multisample_guard, agc_driver_cmask_fast_clear, agc_driver_pipelined_metadata_pass*, agc_driver_native_*, agc_driver_fmask_*, agc_driver_msaa_*, agc_driver_multisample*, agc_driver_sampled_cache*, image_msaa*, agc_driver_depth*, agc_driver_htile*, agc_driver_stencil*, agc_driver_dispatch*, agc_driver_*fill*) with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.363) and VK_LOADER_DEBUG=layer, plus agc_*import* and agc_driver_settle*:

main 03a717f38e this change (15c841ab73)
Passed / failed 235 / 0 236 / 0 (adds agc_driver_native_depth_fill_over_pending_import)
Validation layer inserted 300 302 (the new test opens a second device)
VUID- lines 0 0

agc_driver_native_depth_driver_queued_fill skips on both (host imports are compared here). Without the fix (main's DepthSurface.cpp with this branch's test), the new test fails with AGC graphics: native multisample depth metadata fill over unwatched memory is not implemented. Without the owner check in SettleOwnImports, it fails with a pending host import did not settle when another device settled the same range first.

Forza Horizon 5 (PPSA22327 01.685.672), local stack of open PRs:

  • What the game does: a fill of the native 4x depth target's whole 32 KiB HTILE (0xd20a1b0000+0x8000, pattern 0) while a host import of that HTILE waits for its settle. A diagnostic print at the refusal showed accessible=1 watched=0 watchedAfterSettle=1.
  • Without this change: the refusal stopped 3 of 7 runs, at 148.8 s, 182.9 s and 164.9 s.
  • With this change: 3 runs on 6c4114784f, none with it. Two ran the full 610 s with no AGC error and got further into the intro than before; one stopped at a later, unrelated stop. 15c841ab73 was not run in the game; the game uses one device.

py -3 tools/check_conventions.py --base origin/main and py -3 tools/debt_fold.py --check pass. py -3 tools/pr_overlap.py --branch fix/agc-settle-imports-before-depth-fill (2,503 open PRs): all 61 mergeable PRs that share files merge cleanly. The 35 PRs that conflict with main were searched by hand; #1368 and #7256 only call NoteDepthMetadataFill from tests, #6808 adds the original check, #20315 uses WatchedAfterSettle for vertex inputs, and #4448 and #6197 call refreshImports on other import paths. None settles before this check or adds an owner-checked settle.

Not tested: Linux and macOS, where WatchedAfterSettle only reads the watch state and the test is not registered, a fill that two devices' active sampled surfaces cover at once (in every sequence I could build, the new device's surface over the same memory deactivates the old device's surface first), other GPUs, console behaviour.

Part of the Forza Horizon 5 (PPSA22327) bring-up, #25152. It was found on the stack of open PRs the game needs (#24960, #24994, #25151, #23688, #23545, #21479, #11825, #23778, #21155, #22306, #21199 and #25867–#25874) and stands alone: it applies to main by itself and needs none of them to build or pass its tests.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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
  • Fixes: none
  • Unblocks: PPSA22327 #25152
  • GPUs tested: AMD Radeon RX 6800 (vendor=0x1002, device=0x73bf), AMD proprietary driver 26.10.1 (Windows driver 32.0.21045.16010, Vulkan 1.4.315), Windows 11 Pro (build 26300); Khronos validation layer 1.4.363.0 on main and this change, 0 VUIDs
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5447332106 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26034). Originally posted by [birdmarty](https://github.com/birdmarty) on 2026-11-23T04:53:41Z. --- ### What A fill of a native multisampled depth target's whole HTILE refused with `native multisample depth metadata fill over unwatched memory is not implemented` while a host import of that HTILE was still waiting for its deferred settle. On Windows an import under 1 MiB is unwatched until it settles, so `GuestMemory::Watched` was false only for that moment: once the import settles, the memory is watched again. The native FMASK path in `MultisampleTarget.cpp` already settles before it checks (`WatchedAfterSettle`). `NoteDepthMetadataFill` now settles the host imports under the fill, for each device that has a sampled native depth target there, before its watch checks. The host imports belong to one device at a time, and `WatchedAfterSettle` adopts the device it is given: for a device that does not own them it would park the owner's imports and drop their pending settles. The fill therefore settles through `SettleOwnImports`, which checks under the imports lock that the device owns the imports and otherwise does nothing. It does so after taking `GpuMutex`, which settling requires, and before taking the depth surface lock: the settle path takes the imports lock and then the surface lock (`rewatchSettledImports` → `DepthSurfacePendingResultsOverlap`), so settling under the surface lock would reverse that order. Memory that is still unwatched after the settle refuses as before. #### Changes - `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp`: `settleImportsUnderFill`, called at the start of `NoteDepthMetadataFill`. - `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`, `Graphics/include/GuestBufferMemory.hpp`: `SettleOwnImports`, a settle that never changes which device owns the host imports. - `core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp`, `tests/cmake/agc_driver_native_multisample_depth_tests.cmake`: `agc_driver_native_depth_fill_over_pending_import`, for 2, 4 and 8 samples, on the driver's device (the fixture device has no host imports). A native D32 target with HTILE is sampled, then a host import of its HTILE is made under the unwatch policy, so it waits for its settle and the HTILE reads as unwatched; the policy is restored right after, so only the HTILE is affected. A whole-HTILE fill follows, and sampling must still succeed and return a texture. A second Vulkan device then checks the ownership: with a pending import on the driver's device, `SettleOwnImports` for the other device must leave it, and the driver's device must then settle it. If no case gets a pending import, the test skips with `skipped, the device does not defer the settle of a small host import`. The test is registered on Windows only (048218f1e1, by oneandonlydean): the deferred settle exists only there. No debt entry changes: the change closes no recorded gap and adds none. ### Tested Windows 11 Pro (build 26300), Intel Core i9-9900K, AMD Radeon RX 6800 (AMD driver 26.10.1, Windows driver 32.0.21045.16010, Vulkan 1.4.315), MinGW-w64 GCC 15.3.0, Release, `main` 03a717f38e. Focused set (`agc_driver_graphics`, `agc_shader_memory`, `agc_driver_sample_multisample_target`, `agc_driver_recorder`, `agc_driver_cached_image_multisample_guard`, `agc_driver_cmask_fast_clear`, `agc_driver_pipelined_metadata_pass*`, `agc_driver_native_*`, `agc_driver_fmask_*`, `agc_driver_msaa_*`, `agc_driver_multisample*`, `agc_driver_sampled_cache*`, `image_msaa*`, `agc_driver_depth*`, `agc_driver_htile*`, `agc_driver_stencil*`, `agc_driver_dispatch*`, `agc_driver_*fill*`) with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (1.4.363) and `VK_LOADER_DEBUG=layer`, plus `agc_*import*` and `agc_driver_settle*`: | | `main` 03a717f38e | this change (15c841ab73) | |---|---|---| | Passed / failed | 235 / 0 | 236 / 0 (adds `agc_driver_native_depth_fill_over_pending_import`) | | Validation layer inserted | 300 | 302 (the new test opens a second device) | | `VUID-` lines | 0 | 0 | `agc_driver_native_depth_driver_queued_fill` skips on both (`host imports are compared here`). Without the fix (`main`'s `DepthSurface.cpp` with this branch's test), the new test fails with `AGC graphics: native multisample depth metadata fill over unwatched memory is not implemented`. Without the owner check in `SettleOwnImports`, it fails with `a pending host import did not settle when another device settled the same range first`. Forza Horizon 5 (PPSA22327 01.685.672), local stack of open PRs: - **What the game does:** a fill of the native 4x depth target's whole 32 KiB HTILE (`0xd20a1b0000+0x8000`, pattern 0) while a host import of that HTILE waits for its settle. A diagnostic print at the refusal showed `accessible=1 watched=0 watchedAfterSettle=1`. - **Without this change:** the refusal stopped 3 of 7 runs, at 148.8 s, 182.9 s and 164.9 s. - **With this change:** 3 runs on 6c4114784f, none with it. Two ran the full 610 s with no AGC error and got further into the intro than before; one stopped at a later, unrelated stop. 15c841ab73 was not run in the game; the game uses one device. `py -3 tools/check_conventions.py --base origin/main` and `py -3 tools/debt_fold.py --check` pass. `py -3 tools/pr_overlap.py --branch fix/agc-settle-imports-before-depth-fill` (2,503 open PRs): all 61 mergeable PRs that share files merge cleanly. The 35 PRs that conflict with `main` were searched by hand; #1368 and #7256 only call `NoteDepthMetadataFill` from tests, #6808 adds the original check, #20315 uses `WatchedAfterSettle` for vertex inputs, and #4448 and #6197 call `refreshImports` on other import paths. None settles before this check or adds an owner-checked settle. Not tested: Linux and macOS, where `WatchedAfterSettle` only reads the watch state and the test is not registered, a fill that two devices' active sampled surfaces cover at once (in every sequence I could build, the new device's surface over the same memory deactivates the old device's surface first), other GPUs, console behaviour. ### Related Part of the Forza Horizon 5 (PPSA22327) bring-up, #25152. It was found on the stack of open PRs the game needs (#24960, #24994, #25151, #23688, #23545, #21479, #11825, #23778, #21155, #22306, #21199 and #25867–#25874) and stands alone: it applies to `main` by itself and needs none of them to build or pass its tests. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 - [x] Fixes: none - [x] Unblocks: PPSA22327 #25152 - [x] GPUs tested: AMD Radeon RX 6800 (vendor=0x1002, device=0x73bf), AMD proprietary driver 26.10.1 (Windows driver 32.0.21045.16010, Vulkan 1.4.315), Windows 11 Pro (build 26300); Khronos validation layer 1.4.363.0 on `main` and this change, 0 VUIDs - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-23 04:57:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T04:57:26Z.

Review: APPROVED


Reviewed — looks good

Nothing in the reviewed changes blocks merging; the targeted code and regression test support the described import-settling behavior.

What I ran

  • Read the prepared description, commit list, manifest, diff, and all three changed files at head 6c4114784f8e38317760668f18cc65c35f31906d.
  • Read the relevant WatchedAfterSettle implementation and the existing native FMASK call pattern.
  • No test command was run in this review; the test results in the description are author-reported.

Results

Check Result Note
Changed code review passed All changed files were read.
Targeted context passed Settle call and lock ordering inspected.
Tests run by reviewer not run No local test execution.

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • Linux and macOS behavior, other GPUs, and console behavior were not verified in this review.
  • files.json was not available through the review reader; the review folder listing and manifest identify three changed files, and all three were read.
  • The PR description's reported test runs and measurements were not independently reproduced.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6016751549 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26034#pullrequestreview-6016751549). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T04:57:26Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the reviewed changes blocks merging; the targeted code and regression test support the described import-settling behavior. ## What I ran - Read the prepared description, commit list, manifest, diff, and all three changed files at head `6c4114784f8e38317760668f18cc65c35f31906d`. - Read the relevant `WatchedAfterSettle` implementation and the existing native FMASK call pattern. - No test command was run in this review; the test results in the description are author-reported. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | All changed files were read. | | Targeted context | passed | Settle call and lock ordering inspected. | | Tests run by reviewer | not run | No local test execution. | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified - Linux and macOS behavior, other GPUs, and console behavior were not verified in this review. - `files.json` was not available through the review reader; the review folder listing and manifest identify three changed files, and all three were read. - The PR description's reported test runs and measurements were not independently reproduced. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-23 05:49:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T05:49:42Z.

Review: APPROVED


Reviewed — looks good

The reviewed change at 048218f1e10e98574286a2efd3b6a4fb6c7462bb addresses the pending Windows host-import case by settling matching imports before the depth-fill watch check; I found no verified blocking defects.

What I ran

Read the prepared description, commit summary, manifest, and diff, then inspected the changed functions and relevant import-settle and fill call paths through repo_read.py. No commands or tests were run during this review; the Windows hardware tests and other runs listed in the PR description are author-reported.

Results

Check Result Note
Changed-code review passed Three changed files read
Tests in this review not run Author reports Windows validation
Excluded files not applicable files.json was unavailable in the review bundle

Findings

Blocking

None.

Non-blocking

None.

Sources

Inspected DepthSurface.cpp, GuestBufferMemory.cpp, MultisampleTarget.cpp, BufferFill.cpp, PacketMemory.cpp, NativeMultisampleDepth.cpp, and agc_driver_native_multisample_depth_tests.cmake at the pinned head. The changed code collects contexts whose sampled depth ranges overlap the fill, calls WatchedAfterSettle while holding the GPU mutex, and only then takes the surface mutex and checks watch state. The settle implementation takes the imports mutex and checks pending depth results before rewatching, consistent with the ordering described in the PR.

Not verified

The review bundle did not provide files.json, so I could not independently confirm its exclusion list. No tests were run here, and Linux, macOS, other GPUs, and console behavior were not verified. The PR description reports Windows 11 / RX 6800 validation and game runs; those results were not reproduced during this review.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6017094630 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26034#pullrequestreview-6017094630). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T05:49:42Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change at `048218f1e10e98574286a2efd3b6a4fb6c7462bb` addresses the pending Windows host-import case by settling matching imports before the depth-fill watch check; I found no verified blocking defects. ## What I ran Read the prepared description, commit summary, manifest, and diff, then inspected the changed functions and relevant import-settle and fill call paths through `repo_read.py`. No commands or tests were run during this review; the Windows hardware tests and other runs listed in the PR description are author-reported. ## Results | Check | Result | Note | |---|---|---| | Changed-code review | passed | Three changed files read | | Tests in this review | not run | Author reports Windows validation | | Excluded files | not applicable | `files.json` was unavailable in the review bundle | ## Findings ### Blocking None. ### Non-blocking None. ## Sources Inspected `DepthSurface.cpp`, `GuestBufferMemory.cpp`, `MultisampleTarget.cpp`, `BufferFill.cpp`, `PacketMemory.cpp`, `NativeMultisampleDepth.cpp`, and `agc_driver_native_multisample_depth_tests.cmake` at the pinned head. The changed code collects contexts whose sampled depth ranges overlap the fill, calls `WatchedAfterSettle` while holding the GPU mutex, and only then takes the surface mutex and checks watch state. The settle implementation takes the imports mutex and checks pending depth results before rewatching, consistent with the ordering described in the PR. ## Not verified The review bundle did not provide `files.json`, so I could not independently confirm its exclusion list. No tests were run here, and Linux, macOS, other GPUs, and console behavior were not verified. The PR description reports Windows 11 / RX 6800 validation and game runs; those results were not reproduced during this review. ## To get this to a good state Nothing is required.
mihiii1337 commented 2026-11-23 07:10:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T07:10:24Z.

Review: CHANGES_REQUESTED


Reviewed exact head 048218f1e10e98574286a2efd3b6a4fb6c7462bb. The lock order is sound, but calling the state-adopting WatchedAfterSettle once per cached surface device is destructive when depth surfaces from two Vulkan devices coexist.

HostImports has one active state.device. A window attachment keeps the previous device in replacedDevices, and PrepareForReplacement does not clear its depth surfaces. If a fill overlaps sampled surfaces from old device A and current device B, settleImportsUnderFill can enumerate A first while B owns the live pending import. WatchedAfterSettle(A) sees a stale owner and calls refreshImports(A): on Windows that drains and clears B's pending/wanted/ready settle state, extracts every live B import into parked[B], and switches the active cache to A. The later call for B switches back with an empty live map; parked imports are not restored. The valid pending B import is therefore no longer available to settle, its guest range remains unwatched, and B's metadata-fill check can still refuse. This also churns the entire import cache merely because an old surface overlaps.

Please make this an owner-checked settle operation under the imports mutex (settle only when the requested/current device owns the active import cache), or otherwise select the actual current import owner once instead of adopting every surface device. Add an ownership-switch regression. The new runtime test should also require the post-fill CachedSampledTexture result to be non-null; currently discarding it lets a null result pass as long as no exception is thrown.

Both exact changed translation units passed WinLibs C++20 syntax checks. A CPU model embedding the exact new helper and the production owner-switch behavior passed the single-owner control and reproduced the A→B loss (B import parked, pending state cleared, range still unwatched). This is host-model evidence, not a two-device Vulkan execution. Hosted Windows is green but its job log skipped agc_driver_native_depth_fill_over_pending_import; the author RX 6800 run covers the single-device case. I did not run a local GPU workload.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6017697605 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26034#pullrequestreview-6017697605). Originally posted by [mihiii1337](https://github.com/mihiii1337) on 2026-11-23T07:10:24Z. **Review:** CHANGES_REQUESTED --- Reviewed exact head `048218f1e10e98574286a2efd3b6a4fb6c7462bb`. The lock order is sound, but calling the state-adopting `WatchedAfterSettle` once per cached surface device is destructive when depth surfaces from two Vulkan devices coexist. `HostImports` has one active `state.device`. A window attachment keeps the previous device in `replacedDevices`, and `PrepareForReplacement` does not clear its depth surfaces. If a fill overlaps sampled surfaces from old device A and current device B, `settleImportsUnderFill` can enumerate A first while B owns the live pending import. `WatchedAfterSettle(A)` sees a stale owner and calls `refreshImports(A)`: on Windows that drains and clears B's pending/wanted/ready settle state, extracts every live B import into `parked[B]`, and switches the active cache to A. The later call for B switches back with an empty live map; parked imports are not restored. The valid pending B import is therefore no longer available to settle, its guest range remains unwatched, and B's metadata-fill check can still refuse. This also churns the entire import cache merely because an old surface overlaps. Please make this an owner-checked settle operation under the imports mutex (settle only when the requested/current device owns the active import cache), or otherwise select the actual current import owner once instead of adopting every surface device. Add an ownership-switch regression. The new runtime test should also require the post-fill `CachedSampledTexture` result to be non-null; currently discarding it lets a null result pass as long as no exception is thrown. Both exact changed translation units passed WinLibs C++20 syntax checks. A CPU model embedding the exact new helper and the production owner-switch behavior passed the single-owner control and reproduced the A→B loss (B import parked, pending state cleared, range still unwatched). This is host-model evidence, not a two-device Vulkan execution. Hosted Windows is green but its job log skipped `agc_driver_native_depth_fill_over_pending_import`; the author RX 6800 run covers the single-device case. I did not run a local GPU workload. AI-assisted: yes.
mihiii1337 commented 2026-11-23 08:29:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T08:29:47Z.

Review: APPROVED


Re-reviewed fix head 15c841ab7326310ea1c56cd5ceae647b1cc2258e. This resolves my multi-device blocker. The fill path collects/deduplicates surface devices without holding surfacesMutex across the settle. SettleOwnImports then checks ownership atomically under the import mutex before any stale refresh or settle, so a foreign device can no longer park/drain imports or switch the active device; the owning device retains the generation refresh and synchronous settle.

The regression now keeps the post-fill CachedSampledTexture result and requires it to be non-null. Its two-logical-device subcase establishes pending/unwatched preconditions, calls the foreign helper first, then the owner helper and verifies rewatch. The author reports that removing only the owner guard reproduces the expected failure on RX 6800, while this head passes; their complete run changes 235/235 to 236/236 with validation enabled and 0 VUIDs.

Scope is recorded accurately: the two-device ownership transition is exercised directly and the full fill path is covered in the single-device case; the author could not construct simultaneous overlapping sampled surfaces for the full two-device fill path. I found no blocking gap in that boundary. I did not run a local GPU test. The exact-head hosted Windows job is still queued and remains under watch.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6018532655 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26034#pullrequestreview-6018532655). Originally posted by [mihiii1337](https://github.com/mihiii1337) on 2026-11-23T08:29:47Z. **Review:** APPROVED --- Re-reviewed fix head `15c841ab7326310ea1c56cd5ceae647b1cc2258e`. This resolves my multi-device blocker. The fill path collects/deduplicates surface devices without holding `surfacesMutex` across the settle. `SettleOwnImports` then checks ownership atomically under the import mutex before any stale refresh or settle, so a foreign device can no longer park/drain imports or switch the active device; the owning device retains the generation refresh and synchronous settle. The regression now keeps the post-fill `CachedSampledTexture` result and requires it to be non-null. Its two-logical-device subcase establishes pending/unwatched preconditions, calls the foreign helper first, then the owner helper and verifies rewatch. The author reports that removing only the owner guard reproduces the expected failure on RX 6800, while this head passes; their complete run changes 235/235 to 236/236 with validation enabled and 0 VUIDs. Scope is recorded accurately: the two-device ownership transition is exercised directly and the full fill path is covered in the single-device case; the author could not construct simultaneous overlapping sampled surfaces for the full two-device fill path. I found no blocking gap in that boundary. I did not run a local GPU test. The exact-head hosted Windows job is still queued and remains under watch. AI-assisted: yes.
MarcZX10 commented 2026-11-23 08:38:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T08:38:41Z.

Review: COMMENTED


Reviewed — no blocking findings

The changed depth-fill path and its focused test were reviewed at head 15c841ab7326310ea1c56cd5ceae647b1cc2258e; no concrete blocking defect was verified, but the complete changed-file set was not read, so approval is not justified.

What I ran

No commands were run. I read the prepared description, commit list, diff, manifest, and targeted source ranges through repo_read.py.

Results

Check Result Note
Source review not run One changed implementation file was excluded
Tests not run Author-reported results were not rerun

Findings

Blocking

None verified in the source inspected.

Non-blocking

None.

Not verified

GuestBufferMemory.cpp is listed in the manifest as excluded because it was too large for the review folder. Its changed implementation was inspected through the reader, but the full file was not read. files.json was not available through the reader interface, so I could not confirm its excluded-file inventory. No tests or prechecks were run. The description’s platform, hardware, and game results are author-reported, not independently verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6018621632 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26034#pullrequestreview-6018621632). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T08:38:41Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The changed depth-fill path and its focused test were reviewed at head `15c841ab7326310ea1c56cd5ceae647b1cc2258e`; no concrete blocking defect was verified, but the complete changed-file set was not read, so approval is not justified. ## What I ran No commands were run. I read the prepared description, commit list, diff, manifest, and targeted source ranges through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Source review | not run | One changed implementation file was excluded | | Tests | not run | Author-reported results were not rerun | ## Findings ### Blocking None verified in the source inspected. ### Non-blocking None. ## Not verified `GuestBufferMemory.cpp` is listed in the manifest as excluded because it was too large for the review folder. Its changed implementation was inspected through the reader, but the full file was not read. `files.json` was not available through the reader interface, so I could not confirm its excluded-file inventory. No tests or prechecks were run. The description’s platform, hardware, and game results are author-reported, not independently verified. ## To get this to a good state Nothing is required.
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!26034
No description provided.