AGC (Windows): Rush 2 and Wave Race 64 stop at their first multisampled DCC target because a host import under 1 MiB is unwatched until its deferred settle #9724

Closed
opened 2026-10-22 10:02:31 +00:00 by MaxLikesCode · 4 comments
MaxLikesCode commented 2026-10-22 10:02:31 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MaxLikesCode on 2026-10-22T10:02:31Z.


On Windows, Rush 2 Recompiled (PPSA69423, catalog 00.003.000) and Wave Race 64 Recompiled (PPSA69424, catalog 00.001.000) stop within 10 s on main 7e2ba73e4c, 2 of 2 runs each (Rush 2 after 6.4 s and 1.4 s, Wave Race 64 after 8.4 s and 2.8 s; empty, then warm caches). They stopped the same way on a6dcea9279 last night:

terminate called after throwing an instance of 'std::runtime_error'
  what():  AGC graphics: initial multisampled DCC contents require watched guest memory

@milescoviello reported Rush 2 running to the 60 s limit on Linux (RTX 4070 Ti) in #7250. @DavidSamir saw the same stop on Windows with a Radeon 680M in #6528.

Cause

  • Rush 2 maps the memory of its multisampled color target as direct memory 0x4006200000+0xc4000 (784 KiB, mapped once, prot 0x33). It is host-imported by map right after (APS5_TRACE_MEMORY, APS5_TRACE_HOST_IMPORT).
  • On a6dcea9279, a local diagnostic (not part of any PR) printed the range that initialDccClear refuses (MultisampleTarget.cpp:442): the color range 0x4006200000+0xa0000, with DCC at 0x40062c1000 and CMASK at 0x40062c0000. GuestMemory::Watched is false for every 4 KiB page of it.
  • On Windows, GuestBufferMemory.cpp settles a private import of 1 MiB or more inside the import window, so it stays watched. A smaller one (settleFloorBytes) is compared, and only returns to the watch once a later lookup has submitted and reaped its batched 4-byte read (settleUnwatchedImports, from fcaa432840). The title's first draw to the target comes before that.
  • To check this, I set settleFloorBytes to 0x1000 locally. This is an experiment, not a proposed fix. Both titles then got past this refusal and stopped at the next one: shader 0x20173e900 stage 5: FMASK format is not implemented in Rush 2 and shader 0x201743400 stage 5: FMASK format is not implemented in Wave Race 64. With #8429 (4660cdd42) merged as well, both stop at FMASK CMASK compression is not implemented. Between a6dcea9279 and 7e2ba73e4c, MultisampleTarget.cpp did not change, and GuestBufferMemory.cpp changed in one line (#7961's transfer-source usage).
  • #7948 (open) implements that FMASK read, and adds two checks of the same kind (native FMASK contents require watched guest memory, native FMASK sampling requires watched guest memory). From its diff, the same Windows import would stop there too. I have not tested #7948 with these titles.
  • This is not a regression. The refusal (a0c51d5778, 2026-10-14) and the 1 MiB settle floor (23fccd7632 and fcaa432840, 2026-10-15) both predate these titles.

Question

Which direction would you take? Two options:

  1. Settle an import with a pending deferred settle synchronously when an initial multisampled DCC import needs its range.
  2. Let the initial import compare an unwatched range instead of refusing it.

Setup

  • Windows 11 Pro 26200, RTX 4090 (driver 617.42), i9-13900K, WinLibs GCC 15.2.0 r7, Release, libs and relinker from main 7e2ba73e4c (the rerun) and a6dcea9279 (the first runs, the diagnostic and the experiment).
  • Catalog zips with SHA-256 matching the catalog.
  • Relinked with relinker --windows and no other flags, laid out as USAGE.md describes, 60 s per run with tools/title_run.py from #7264.
  • Not tested: Linux, AMD or Intel on this build.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5977201817 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9724). Originally posted by [MaxLikesCode](https://github.com/MaxLikesCode) on 2026-10-22T10:02:31Z. --- On Windows, Rush 2 Recompiled (PPSA69423, catalog 00.003.000) and Wave Race 64 Recompiled (PPSA69424, catalog 00.001.000) stop within 10 s on `main` 7e2ba73e4c, 2 of 2 runs each (Rush 2 after 6.4 s and 1.4 s, Wave Race 64 after 8.4 s and 2.8 s; empty, then warm caches). They stopped the same way on a6dcea9279 last night: ``` terminate called after throwing an instance of 'std::runtime_error' what(): AGC graphics: initial multisampled DCC contents require watched guest memory ``` @milescoviello reported Rush 2 running to the 60 s limit on Linux (RTX 4070 Ti) in #7250. @DavidSamir saw the same stop on Windows with a Radeon 680M in #6528. ### Cause - Rush 2 maps the memory of its multisampled color target as direct memory `0x4006200000+0xc4000` (784 KiB, mapped once, prot `0x33`). It is host-imported `by map` right after (`APS5_TRACE_MEMORY`, `APS5_TRACE_HOST_IMPORT`). - On a6dcea9279, a local diagnostic (not part of any PR) printed the range that `initialDccClear` refuses (`MultisampleTarget.cpp:442`): the color range `0x4006200000+0xa0000`, with DCC at `0x40062c1000` and CMASK at `0x40062c0000`. `GuestMemory::Watched` is false for every 4 KiB page of it. - On Windows, `GuestBufferMemory.cpp` settles a private import of 1 MiB or more inside the import window, so it stays watched. A smaller one (`settleFloorBytes`) is compared, and only returns to the watch once a later lookup has submitted and reaped its batched 4-byte read (`settleUnwatchedImports`, from fcaa432840). The title's first draw to the target comes before that. - To check this, I set `settleFloorBytes` to `0x1000` locally. This is an experiment, not a proposed fix. Both titles then got past this refusal and stopped at the next one: `shader 0x20173e900 stage 5: FMASK format is not implemented` in Rush 2 and `shader 0x201743400 stage 5: FMASK format is not implemented` in Wave Race 64. With #8429 (4660cdd42) merged as well, both stop at `FMASK CMASK compression is not implemented`. Between a6dcea9279 and 7e2ba73e4c, `MultisampleTarget.cpp` did not change, and `GuestBufferMemory.cpp` changed in one line (#7961's transfer-source usage). - #7948 (open) implements that FMASK read, and adds two checks of the same kind (`native FMASK contents require watched guest memory`, `native FMASK sampling requires watched guest memory`). From its diff, the same Windows import would stop there too. I have not tested #7948 with these titles. - This is not a regression. The refusal (a0c51d5778, 2026-10-14) and the 1 MiB settle floor (23fccd7632 and fcaa432840, 2026-10-15) both predate these titles. ### Question Which direction would you take? Two options: 1. Settle an import with a pending deferred settle synchronously when an initial multisampled DCC import needs its range. 2. Let the initial import compare an unwatched range instead of refusing it. ### Setup - Windows 11 Pro 26200, RTX 4090 (driver 617.42), i9-13900K, WinLibs GCC 15.2.0 r7, Release, `libs` and `relinker` from `main` 7e2ba73e4c (the rerun) and a6dcea9279 (the first runs, the diagnostic and the experiment). - Catalog zips with SHA-256 matching the catalog. - Relinked with `relinker --windows` and no other flags, laid out as USAGE.md describes, 60 s per run with `tools/title_run.py` from #7264. - Not tested: Linux, AMD or Intel on this build. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-22 10:11:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T10:11:16Z.


I lean toward option 1. initialDccClear currently requires watched coverage for the color, DCC and CMASK ranges, collects write generations, then reads the metadata. Letting it accept an unwatched range would weaken that consistency check; the existing explicit-unwatch regression in AlphaToCoverage.cpp exercises the current refusal.

A synchronous settle seems like the better direction, but it needs a well-defined ordering point against earlier main-queue accesses. That is also the unresolved part of #8527: its proposed settle batching shares queue/pool state with the main recorder, and the maintainer has asked about external synchronization and the bounded fence wait. I would coordinate with that PR's author before adding a parallel change to the same deferred-settle path.

For this title, I would keep the explicitly-unwatched negative case and add a Windows regression where a genuine sub-1 MiB imported range still has a pending settle when initial DCC handling begins; verify both the clear result and that subsequent writes remain tracked. The settleFloorBytes=0x1000 run is good evidence for the title symptom, but not by itself for general acceptance of unwatched metadata.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6338234700 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9724#issuecomment-6338234700). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T10:11:16Z. --- I lean toward option 1. `initialDccClear` currently requires watched coverage for the color, DCC and CMASK ranges, collects write generations, then reads the metadata. Letting it accept an unwatched range would weaken that consistency check; the existing explicit-unwatch regression in `AlphaToCoverage.cpp` exercises the current refusal. A synchronous settle seems like the better direction, but it needs a well-defined ordering point against earlier main-queue accesses. That is also the unresolved part of #8527: its proposed settle batching shares queue/pool state with the main recorder, and the maintainer has asked about external synchronization and the bounded fence wait. I would coordinate with that PR's author before adding a parallel change to the same deferred-settle path. For this title, I would keep the explicitly-unwatched negative case and add a Windows regression where a genuine sub-1 MiB imported range still has a pending settle when initial DCC handling begins; verify both the clear result and that subsequent writes remain tracked. The `settleFloorBytes=0x1000` run is good evidence for the title symptom, but not by itself for general acceptance of unwatched metadata.
babyhuey commented 2026-10-22 12:40:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-22T12:40:21Z.


A Linux data point: the same stop on Linux with lavapipe, on main 8b3a6ba88. That's Ubuntu 24.04 in a container, Mesa 25.2.8 llvmpipe (it has VK_EXT_external_memory_host), Xvfb, one 45 s run each:

  • Rush 2 Recompiled (PPSA69423): initial multisampled DCC contents require watched guest memory at 6.4 s.
  • Wave Race 64 Recompiled (PPSA69424): the same at 1.5 s.

That's the same timing pattern as your Windows runs. The cause above points at the Windows path in GuestBufferMemory.cpp. Does Linux have an equivalent deferred settle for small imports, or does this suggest a second route to an unwatched range? This is lavapipe, not a real GPU like the RTX 4070 Ti in #7250, so a driver difference may also play a part.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340976890 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9724#issuecomment-6340976890). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-22T12:40:21Z. --- A Linux data point: the same stop on Linux with lavapipe, on `main` `8b3a6ba88`. That's Ubuntu 24.04 in a container, Mesa 25.2.8 `llvmpipe` (it has `VK_EXT_external_memory_host`), Xvfb, one 45 s run each: - Rush 2 Recompiled (PPSA69423): `initial multisampled DCC contents require watched guest memory` at 6.4 s. - Wave Race 64 Recompiled (PPSA69424): the same at 1.5 s. That's the same timing pattern as your Windows runs. The cause above points at the Windows path in `GuestBufferMemory.cpp`. Does Linux have an equivalent deferred settle for small imports, or does this suggest a second route to an unwatched range? This is lavapipe, not a real GPU like the RTX 4070 Ti in #7250, so a driver difference may also play a part. AI-assisted: yes
EagleBearerYS commented 2026-10-22 13:52:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T13:52:27Z.


@MarcZX10 @MaxLikesCode the deferred settle for imports under 1 MiB is ours (#6678, fcaa432840), so we can take option 1 if that helps.

#8527 moves those settle reads onto the main queue, with barriers on both sides. A synchronous settle at the point of need would then get its ordering from that, so I'd build it on top of #8527 and follow wherever oneandonlydean's questions there take it.

  • The test would be the regression you describe: a genuine sub-1 MiB import that still has a pending settle when the initial DCC import starts. It would check the clear result, and that later writes stay tracked.
  • The explicitly unwatched case in AlphaToCoverage.cpp would keep refusing.

@eliasbruno124-dev, is that fine with you, or would you rather add it to #8527 yourself?

@babyhuey Linux has no deferred settle. At device setup, the import-watch probe decides whether imports are watched or compared (decideImportWatch, GuestBufferMemory.cpp:1148-1189 on main 8b3e39832a).

  • When the probe sees a GPU read or write reported as a guest write, it logs [write-watch] host imports resolve write protection: yes and compares imported ranges instead of watching them.
  • lavapipe's device accesses are CPU stores, so it lands there, and the initial DCC check (MultisampleTarget.cpp:497) refuses for that reason.
  • On a GPU whose accesses don't trip the watch, imports stay watched. That fits Rush 2 Recompiled (PPSA69423) running to its 60 s limit on Linux with an RTX 4070 Ti in #7250. Your run log's [write-watch] line would confirm which way it went.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6342460532 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9724#issuecomment-6342460532). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T13:52:27Z. --- @MarcZX10 @MaxLikesCode the deferred settle for imports under 1 MiB is ours (#6678, fcaa432840), so we can take option 1 if that helps. #8527 moves those settle reads onto the main queue, with barriers on both sides. A synchronous settle at the point of need would then get its ordering from that, so I'd build it on top of #8527 and follow wherever oneandonlydean's questions there take it. - **The test** would be the regression you describe: a genuine sub-1 MiB import that still has a pending settle when the initial DCC import starts. It would check the clear result, and that later writes stay tracked. - **The explicitly unwatched case** in `AlphaToCoverage.cpp` would keep refusing. @eliasbruno124-dev, is that fine with you, or would you rather add it to #8527 yourself? @babyhuey Linux has no deferred settle. At device setup, the import-watch probe decides whether imports are watched or compared (`decideImportWatch`, `GuestBufferMemory.cpp:1148-1189` on `main` 8b3e39832a). - When the probe sees a GPU read or write reported as a guest write, it logs `[write-watch] host imports resolve write protection: yes` and compares imported ranges instead of watching them. - lavapipe's device accesses are CPU stores, so it lands there, and the initial DCC check (`MultisampleTarget.cpp:497`) refuses for that reason. - On a GPU whose accesses don't trip the watch, imports stay watched. That fits Rush 2 Recompiled (PPSA69423) running to its 60 s limit on Linux with an RTX 4070 Ti in #7250. Your run log's `[write-watch]` line would confirm which way it went.
MaxLikesCode commented 2026-10-22 15:01:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MaxLikesCode on 2026-10-22T15:01:43Z.


Thanks @EagleBearerYS. When there is a branch, I can run Rush 2 and Wave Race 64 with it on Windows with the RTX 4090, with empty and warm caches, and report whether both get past this stop.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343950077 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9724#issuecomment-6343950077). Originally posted by [MaxLikesCode](https://github.com/MaxLikesCode) on 2026-10-22T15:01:43Z. --- Thanks @EagleBearerYS. When there is a branch, I can run Rush 2 and Wave Race 64 with it on Windows with the RTX 4090, with empty and warm caches, and report whether both get past this stop. AI-assisted: yes (Claude Code)
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#9724
No description provided.