Windows: since #15967, agc_driver_msaa_dcc_clear_2/4/8 and agc_driver_native_depth_publication fail: a zero CPU store into a page still known zero is not collected #18114

Closed
opened 2026-11-10 13:32:18 +00:00 by angrysandhill · 0 comments
angrysandhill commented 2026-11-10 13:32:18 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by angrysandhill on 2026-11-10T13:32:18Z.


What happens

Since #15967 (7162a53177), on Windows agc_driver_msaa_dcc_clear_2, _4 and _8 fail with AGC graphics: a same-value CPU color store did not invalidate multisampled DCC residency, and agc_driver_native_depth_publication fails with AGC graphics: a native depth publication overwrote a byte the guest stored.

Title, test or build step

ctest agc_driver_msaa_dcc_clear_2, agc_driver_msaa_dcc_clear_4, agc_driver_msaa_dcc_clear_8 (agc_driver_alpha_to_coverage_tests) and agc_driver_native_depth_publication (agc_driver_native_multisample_depth_tests).

AnyPS5 commit

main 706573b02f, nothing merged on top (first seen on 356ba02b5f). First bad commit 7162a53177 (merge of #15967); its first parent 9af2e01971 passes.

System

Windows 10 Home 22H2 (10.0.19045), AMD Radeon RX 6750 XT, AMD Software Adrenalin 26.10.1 (driver 32.0.21045.16010), WinLibs GCC 15.2.0 r7 UCRT, Release, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=ON.

Steps to reproduce

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
ninja -C build libs tests/agc_driver_alpha_to_coverage_tests.exe tests/agc_driver_native_multisample_depth_tests.exe
set ANYPS5_REQUIRE_VULKAN=1
set ANYPS5_NO_SHADER_CACHE=1
ctest --test-dir build -R "^(agc_driver_msaa_dcc_clear_[248]|agc_driver_native_depth_publication)$" --parallel 1 --output-on-failure

Each test fails in under 1.5 s, on every run.

Log

agc_driver_msaa_dcc_clear_2 (same for _4 and _8):
AGC graphics: a same-value CPU color store did not invalidate multisampled DCC residency

agc_driver_native_depth_publication:
Native D32S8 publication samples=4 write=0 depthOnly=1 unmap=0 [gpu] native multisample depth 0x200000000+0x30000 aliases multisampled colour target 0x200000000+0x20000 (vk format 9, 4 samples), newest drawn
AGC graphics: a native depth publication overwrote a byte the guest stored

What was checked

  • Same every run. On 356ba02b5f, all four fail in a full ^agc_ run (1,566 tests: 1,544 passed, 17 skipped, 5 failed) and in two more serial runs of only these tests. On 706573b02f, they fail in 2 of 2 serial runs with the same messages.
  • Bisect. git bisect --first-parent over the 377 main merges that touch core/libs/prx/libSceAgcDriver between f2d874c1fd (2026-11-01) and 356ba02b5f, testing agc_driver_msaa_dcc_clear_2 at each step: 8 steps, no skips, first bad 7162a53177. At f2d874c1fd the three DCC tests pass 2 of 2 runs with the same assertion in the test; agc_driver_native_depth_publication did not exist yet (#13021, merged 11-03).
  • Revert. git revert -m 1 7162a53177 applies cleanly on 356ba02b5f. With it (not committed), all four tests pass in 2 of 2 runs, and #15967's own agc_driver_resident_heap_mirror still passes.
  • Linux. The push build of 356ba02b5f runs agc_driver_msaa_dcc_clear_4 and agc_driver_native_depth_publication on lavapipe, and both pass; _2 and _8 skip there. The change only acts on Windows, and the Windows CI jobs have no GPU, so these tests skip there.
  • Likely cause, from reading the code, not tested. #15967 stops reporting a write-watch hit for a page that is still known zero and still reads zero. To keep GPU state correct it calls ForgetKnownZero on recorded GPU writes (Recorder.cpp, Texture.cpp, GuestMemory.cpp) and MaterializeKnownZero before a storage image upload takes its generation (Texture.cpp). The multisampled DCC residency check (checkDccCurrent in MultisampleTarget.cpp: CollectWritesUncached, then UnchangedSince / StoredOver) and native depth publication (WriteChangedIfHeld from DepthSurface.cpp) call neither. The DCC test first fills the colour target with zeros (memset), then stores 0 into it. #15967 does not collect a zero store to a fresh page, so those pages stay known zero, the second store is filtered out too, and residency stays valid. I have not traced the depth case the same way; the revert shows it has the same cause.
  • Not the same as #12522 or #16883. Those are Intel iGPU failures with other messages: agc_driver_msaa_dcc_clear_* with requires watched guest memory (#12522), and agc_driver_native_depth_publication with lost live samples, HTILE, padding or guest writes (#16883). The AMD Windows passes posted on #16883 were on 23d549a9c7 and 4c4ff42a6c, both before #15967.
  • Not tested. Other GPUs on Windows, and Windows 11. #15967 was tested on Windows 11 with an RTX 4060 Laptop GPU; its focused suites did not include these two executables.
  • Also failing on this machine, already reported: agc_driver_sample_order_grid_reference (#9507); it passes with APS5_NO_GPL=1, as that issue describes.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6307884056 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/18114). Originally posted by [angrysandhill](https://github.com/angrysandhill) on 2026-11-10T13:32:18Z. --- ### What happens Since #15967 (`7162a53177`), on Windows `agc_driver_msaa_dcc_clear_2`, `_4` and `_8` fail with `AGC graphics: a same-value CPU color store did not invalidate multisampled DCC residency`, and `agc_driver_native_depth_publication` fails with `AGC graphics: a native depth publication overwrote a byte the guest stored`. ### Title, test or build step ctest `agc_driver_msaa_dcc_clear_2`, `agc_driver_msaa_dcc_clear_4`, `agc_driver_msaa_dcc_clear_8` (`agc_driver_alpha_to_coverage_tests`) and `agc_driver_native_depth_publication` (`agc_driver_native_multisample_depth_tests`). ### AnyPS5 commit `main` `706573b02f`, nothing merged on top (first seen on `356ba02b5f`). First bad commit `7162a53177` (merge of #15967); its first parent `9af2e01971` passes. ### System Windows 10 Home 22H2 (10.0.19045), AMD Radeon RX 6750 XT, AMD Software Adrenalin 26.10.1 (driver 32.0.21045.16010), WinLibs GCC 15.2.0 r7 UCRT, Release, `BUILD_TESTING=ON`, `ANYPS5_ENABLE_SPIRV_TOOLS=ON`. ### Steps to reproduce ``` cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON ninja -C build libs tests/agc_driver_alpha_to_coverage_tests.exe tests/agc_driver_native_multisample_depth_tests.exe set ANYPS5_REQUIRE_VULKAN=1 set ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir build -R "^(agc_driver_msaa_dcc_clear_[248]|agc_driver_native_depth_publication)$" --parallel 1 --output-on-failure ``` Each test fails in under 1.5 s, on every run. ### Log ``` agc_driver_msaa_dcc_clear_2 (same for _4 and _8): AGC graphics: a same-value CPU color store did not invalidate multisampled DCC residency agc_driver_native_depth_publication: Native D32S8 publication samples=4 write=0 depthOnly=1 unmap=0 [gpu] native multisample depth 0x200000000+0x30000 aliases multisampled colour target 0x200000000+0x20000 (vk format 9, 4 samples), newest drawn AGC graphics: a native depth publication overwrote a byte the guest stored ``` ### What was checked - **Same every run.** On `356ba02b5f`, all four fail in a full `^agc_` run (1,566 tests: 1,544 passed, 17 skipped, 5 failed) and in two more serial runs of only these tests. On `706573b02f`, they fail in 2 of 2 serial runs with the same messages. - **Bisect.** `git bisect --first-parent` over the 377 `main` merges that touch `core/libs/prx/libSceAgcDriver` between `f2d874c1fd` (2026-11-01) and `356ba02b5f`, testing `agc_driver_msaa_dcc_clear_2` at each step: 8 steps, no skips, first bad `7162a53177`. At `f2d874c1fd` the three DCC tests pass 2 of 2 runs with the same assertion in the test; `agc_driver_native_depth_publication` did not exist yet (#13021, merged 11-03). - **Revert.** `git revert -m 1 7162a53177` applies cleanly on `356ba02b5f`. With it (not committed), all four tests pass in 2 of 2 runs, and #15967's own `agc_driver_resident_heap_mirror` still passes. - **Linux.** The push build of `356ba02b5f` runs `agc_driver_msaa_dcc_clear_4` and `agc_driver_native_depth_publication` on lavapipe, and both pass; `_2` and `_8` skip there. The change only acts on Windows, and the Windows CI jobs have no GPU, so these tests skip there. - **Likely cause, from reading the code, not tested.** #15967 stops reporting a write-watch hit for a page that is still known zero and still reads zero. To keep GPU state correct it calls `ForgetKnownZero` on recorded GPU writes (`Recorder.cpp`, `Texture.cpp`, `GuestMemory.cpp`) and `MaterializeKnownZero` before a storage image upload takes its generation (`Texture.cpp`). The multisampled DCC residency check (`checkDccCurrent` in `MultisampleTarget.cpp`: `CollectWritesUncached`, then `UnchangedSince` / `StoredOver`) and native depth publication (`WriteChangedIfHeld` from `DepthSurface.cpp`) call neither. The DCC test first fills the colour target with zeros (`memset`), then stores 0 into it. #15967 does not collect a zero store to a fresh page, so those pages stay known zero, the second store is filtered out too, and residency stays valid. I have not traced the depth case the same way; the revert shows it has the same cause. - **Not the same as #12522 or #16883.** Those are Intel iGPU failures with other messages: `agc_driver_msaa_dcc_clear_*` with `requires watched guest memory` (#12522), and `agc_driver_native_depth_publication` with `lost live samples, HTILE, padding or guest writes` (#16883). The AMD Windows passes posted on #16883 were on `23d549a9c7` and `4c4ff42a6c`, both before #15967. - **Not tested.** Other GPUs on Windows, and Windows 11. #15967 was tested on Windows 11 with an RTX 4060 Laptop GPU; its focused suites did not include these two executables. - **Also failing on this machine, already reported:** `agc_driver_sample_order_grid_reference` (#9507); it passes with `APS5_NO_GPL=1`, as that issue describes. AI-assisted: yes.
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#18114
No description provided.