AGC: StoreOverUntracked's NeighbourCopied case intermittently misses its pending result on Windows / RTX 4080 #6383

Closed
opened 2026-10-15 13:43:44 +00:00 by Neithennn · 3 comments
Neithennn commented 2026-10-15 13:43:44 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Neithennn on 2026-10-15T13:43:44Z.


Failure

Unchanged main 0e4ea13a0: agc_driver_store_over_untracked intermittently fails in the case loop of main() at:

AGC graphics: store over untracked: the result was never held pending

A local message-only diagnostic (not kept) names the case each time: an image copy into another block of the surface (Kind::NeighbourCopied) returns Outcome::Missed on all 256 attempts. The other eight cases and RunSecondStore are not involved. This is a synthetic regression, not a reproduced game failure.

Reproduce

Windows 11 Pro 26200, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, bundled dependencies, BUILD_TESTING=ON. Source clean except for the diagnostic message, reverted afterwards.

cmake --build build --target agc_driver_store_over_untracked_tests
$env:ANYPS5_NO_SHADER_CACHE = '1'
build\tests\agc_driver_store_over_untracked_tests.exe

Fresh process per run.

Physical GPU (selected in every run) Build NeighbourCopied missed 256/256 Largest run
NVIDIA GeForce RTX 4080, driver 617.42 main 0e4ea13a0 5/40 runs not measured
NVIDIA GeForce RTX 4080, driver 617.42 main + #6359 (2bc3a760f) 8/40 runs 1.05 s

On unchanged main, the runs where this case passes reach RunSecondStore and fail at #6347's the first result was not stored; #6359 removes that one (0/110), and the NeighbourCopied miss remains. Reported first in #6359 (comment).

Where

StoreOverUntracked.cpp, Run(), Kind::NeighbourCopied branch: after the third Store(surface.Texels()), the wait loop returns Outcome::Missed the first time StorageTexture::FindLive(address, SurfaceBytes) is non-null while StorageTexture::AnyPending() is false. Unlike HoldPending, it does not keep polling until the result reaches guest memory.

Not verified: that the results were already flushed when the image was first seen live. This is a hypothesis consistent with the code, not a measurement. No AMD or Linux run.

AI-assisted: yes (runs and diagnostic done with Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5867305235 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6383). Originally posted by [Neithennn](https://github.com/Neithennn) on 2026-10-15T13:43:44Z. --- ### Failure Unchanged main `0e4ea13a0`: `agc_driver_store_over_untracked` intermittently fails in the case loop of `main()` at: ```text AGC graphics: store over untracked: the result was never held pending ``` A local message-only diagnostic (not kept) names the case each time: `an image copy into another block of the surface` (`Kind::NeighbourCopied`) returns `Outcome::Missed` on all 256 attempts. The other eight cases and `RunSecondStore` are not involved. This is a synthetic regression, not a reproduced game failure. ### Reproduce Windows 11 Pro 26200, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, bundled dependencies, `BUILD_TESTING=ON`. Source clean except for the diagnostic message, reverted afterwards. ```powershell cmake --build build --target agc_driver_store_over_untracked_tests $env:ANYPS5_NO_SHADER_CACHE = '1' build\tests\agc_driver_store_over_untracked_tests.exe ``` Fresh process per run. | Physical GPU (selected in every run) | Build | `NeighbourCopied` missed 256/256 | Largest run | | --- | --- | --- | --- | | NVIDIA GeForce RTX 4080, driver 617.42 | main `0e4ea13a0` | 5/40 runs | not measured | | NVIDIA GeForce RTX 4080, driver 617.42 | main + #6359 (`2bc3a760f`) | 8/40 runs | 1.05 s | On unchanged main, the runs where this case passes reach `RunSecondStore` and fail at #6347's `the first result was not stored`; #6359 removes that one (0/110), and the `NeighbourCopied` miss remains. Reported first in [#6359 (comment)](https://github.com/boykopovar/AnyPS5/pull/6359#issuecomment-6193484750). ### Where `StoreOverUntracked.cpp`, `Run()`, `Kind::NeighbourCopied` branch: after the third `Store(surface.Texels())`, the wait loop returns `Outcome::Missed` the first time `StorageTexture::FindLive(address, SurfaceBytes)` is non-null while `StorageTexture::AnyPending()` is false. Unlike `HoldPending`, it does not keep polling until the result reaches guest memory. Not verified: that the results were already flushed when the image was first seen live. This is a hypothesis consistent with the code, not a measurement. No AMD or Linux run. AI-assisted: yes (runs and diagnostic done with Claude Code).
MarcZX10 commented 2026-10-15 13:57:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T13:57:47Z.


I traced this to the fixture returning Missed as soon as it saw a live image with no pending result. PR #6396 waits for that same image to become pending, or for the stored value to reach guest memory, before deciding the outcome. The change is limited to the NeighbourCopied test path; #6359's separate RunSecondStore change is not a dependency.

The target built here, but this Linux host cannot execute the test because it lacks the CPU features required by the runtime. If convenient, could you rerun the Windows RTX 4080 case on #6396 and report whether the intermittent miss is gone?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193846292 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6383#issuecomment-6193846292). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-15T13:57:47Z. --- I traced this to the fixture returning `Missed` as soon as it saw a live image with no pending result. PR #6396 waits for that same image to become pending, or for the stored value to reach guest memory, before deciding the outcome. The change is limited to the `NeighbourCopied` test path; #6359's separate `RunSecondStore` change is not a dependency. The target built here, but this Linux host cannot execute the test because it lacks the CPU features required by the runtime. If convenient, could you rerun the Windows RTX 4080 case on #6396 and report whether the intermittent miss is gone?
Neithennn commented 2026-10-15 14:02:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Neithennn on 2026-10-15T14:02:11Z.


@MarcZX100 Ran it on the RTX 4080 (Windows 11 Pro 26200, driver 617.42, WinLibs GCC 15.2.0 r7, Release, ANYPS5_NO_SHADER_CACHE=1, fresh process per run), each change merged with #6359 onto main f633042df:

  • #6396: 4/100 fail at the result was never held pending (maximum 1.22 s).
  • #6385 (opened a few minutes earlier for the same case): 0/100 (maximum 0.63 s).

The difference is the predicate: #6396 waits for FindPending(address, SurfaceBytes) == image, #6385 for FindLive(...) != nullptr && AnyPending(). With #6359 in both trees, RunSecondStore passes in every run of #6385, so the 4 misses come from the NeighbourCopied wait. I have not diagnosed why FindPending does not name the live image in those runs.

AI-assisted: yes (runs done with Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193936200 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6383#issuecomment-6193936200). Originally posted by [Neithennn](https://github.com/Neithennn) on 2026-10-15T14:02:11Z. --- @MarcZX100 Ran it on the RTX 4080 (Windows 11 Pro 26200, driver 617.42, WinLibs GCC 15.2.0 r7, Release, `ANYPS5_NO_SHADER_CACHE=1`, fresh process per run), each change merged with #6359 onto main `f633042df`: - #6396: 4/100 fail at `the result was never held pending` (maximum 1.22 s). - #6385 (opened a few minutes earlier for the same case): 0/100 (maximum 0.63 s). The difference is the predicate: #6396 waits for `FindPending(address, SurfaceBytes) == image`, #6385 for `FindLive(...) != nullptr && AnyPending()`. With #6359 in both trees, `RunSecondStore` passes in every run of #6385, so the 4 misses come from the `NeighbourCopied` wait. I have not diagnosed why `FindPending` does not name the live image in those runs. AI-assisted: yes (runs done with Claude Code).
MarcZX10 commented 2026-10-15 14:25:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T14:25:39Z.


The comparison identifies a stronger fix than my #6396: #6385 passes 100/100 RTX 4080 runs and waits for either pending work or the result reaching guest memory. I closed #6396 in favor of #6385; thanks for running and diagnosing both variants.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6194433602 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6383#issuecomment-6194433602). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-15T14:25:39Z. --- The comparison identifies a stronger fix than my #6396: #6385 passes 100/100 RTX 4080 runs and waits for either pending work or the result reaching guest memory. I closed #6396 in favor of #6385; thanks for running and diagnosing both variants.
Sign in to join this conversation.
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#6383
No description provided.