test(agc): exercise a full native depth clear through BDA #7228

Merged
Amoenus merged 2 commits from upstream-pr/7228 into main 2026-10-17 21:10:52 +00:00
Amoenus commented 2026-10-17 18:09:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T18:09:23Z.


What

Add agc_driver_native_depth_bda_clear, a focused GPU completion regression for the native depth-clear path from #5554.

  • Run the existing recognized 17-word HTILE kernel through the normal recompiler and BDA dispatch path, using a complete direct workgroup extent.
  • Verify all 32 KiB of cleared metadata and the rest of its 1 MiB watched allocation, native sampled-view/attachment reuse, and unchanged guest depth bytes.
  • Keep unsupported Vulkan/write-watch/import configurations explicit skips. No runtime implementation changes.

The existing native-depth clear tests model completion with StoreOwnBytes. During #7220, those tests passed a proposed tracker change that rejects a legitimate BDA-produced clear. This test catches that regression. It reuses the current kernel/recognizer rather than adding instruction semantics. It checks metadata and native-owner acceptance, not numeric sampled-depth readback or gameplay.

Tested

Current head bf8556f8e7741c76af90514197037bae5c5c4d88, main e3838332ee31af787ad311b7eadbe53d8d012e95: addressed the CI skip-classifier review. The actual published-head Linux JUnit reproduced check_skips.py --job linux exit1. The new real lavapipe JUnit has one explicit import limitation and is accepted by both Linux/Windows classifiers (exit0). The missing-host-backend skip was removed: the existing allocation helper throws if guest write watching is unavailable. The device/import limitation now reports skipped, the device does not retain guest write watching for native clear imports.

Full Windows/Linux relinker/library builds pass at bf8556. The GPU producer passes3/3 on the verified RTX5080 and3/3 on AMD Radeon Graphics. No wider matrix is claimed on this wording/error-path update; earlier evidence retains its pins below. No runtime implementation change or global skip-policy relaxation.

Initial PR head 19925d409bb090597b00565e2be7bb33442a0132 was based on main e1041f6a571b6579f9e42334375adb4eb02550e7. The final rebase includes only #7222's CI-cache change: the complete core tree is identical to validated59d (ac0e84bc230727839633fa478a35aff9d0beb5ee). Runtime tests are retained with their exact pins below. The file-only overlap check is clean, and conventions pass again after rebasing.

Validated head 59d55694df05ffc3f730cfac25f69c935109f8b7, based on main 07b4651142a2c40e129c8f9f9746eccf01f6e6ea: full Windows/Linux relinker/library builds pass. Main's new libc exception handling is covered by the new producer and native-depth refusal groups repeated 3 times per physical GPU (6 NVIDIA + 6 AMD passes); Linux native-depth refusals and the new host-libstdc++ exception test give 6 passes, with the new GPU producer explicitly skipped for lost import watching. Cppcheck/clang-tidy parse the unchanged fixture with no selected diagnostics. The test is automatically discovered; no shared CMake registration edit is needed.

Earlier wider control at exact head a76ff55c12bf493d5145db74982fed3c04a5e6de, main 66702f1cffd3646f2d674ed093fde0a85a70761f (the test file is identical):

  • Full relinker/library builds on Windows 11 build 26200 (GCC 15.2 WinLibs r7) and Ubuntu 24.04.
  • Six groups repeated 3 times on each physical GPU: 18 NVIDIA passes + 18 AMD passes, no skips. These cover the new GPU producer, existing native-depth clears/refusals, and 2/4/8-sample DCC clear controls. The new case passes3/3 per GPU, max 0.97s on NVIDIA and 0.69s on AMD; every selected test stays below 30s. Device identity is verified from each fixture's output.
  • Ubuntu/lavapipe (LLVM 20.1.2): 9 passes, 3 explicit skips. The new case skips because the import loses write watching; 2-/8-sample DCC controls lack support. No Linux pass is claimed for the new GPU producer.
  • Fault control 5a9b4c22f applies the rejected #7220 coverage proposal to this exact standalone test. It fails 3/3 on each GPU at native multisample depth clear has no complete tracked HTILE store, after correct metadata readback. Restoring the candidate passes again. The fault-control implementation is not part of this PR.
  • Conventions pass. Registration: 946 test executables, none built without a registered test. Cppcheck/selected clang-tidy checks parse the new TU with no selected diagnostics.

Reproduce with cmake --build build --target agc_driver_native_depth_bda_clear_tests, then ctest --test-dir build -V -R "^agc_driver_native_depth_bda_clear$" --timeout 30. Use the existing ANYPS5_GPU selector and ANYPS5_REQUIRE_VULKAN=1 for required physical-GPU runs.

No new title-startup or speed claim. The related PPSA99902 metadata investigation and unchanged loading-screen stop remain documented in #5336.

Automatic conventions/intake checks passed on this head. Full Linux/Windows CI jobs are skipped until a maintainer dispatches them; please run full CI for this PR.

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
  • 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: none
  • GPUs tested: NVIDIA GeForce RTX 5080, driver 32.0.16.1062; AMD Radeon(TM) Graphics, driver 32.0.21036.18; both Windows 11 build 26200. Also Ubuntu 24.04/lavapipe LLVM 20.1.2 for the explicitly scoped controls above (new case skipped).
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4902638710 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7228). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T18:09:23Z. --- ### What Add `agc_driver_native_depth_bda_clear`, a focused GPU completion regression for the native depth-clear path from #5554. - Run the existing recognized 17-word HTILE kernel through the normal recompiler and BDA dispatch path, using a complete direct workgroup extent. - Verify all 32 KiB of cleared metadata and the rest of its 1 MiB watched allocation, native sampled-view/attachment reuse, and unchanged guest depth bytes. - Keep unsupported Vulkan/write-watch/import configurations explicit skips. No runtime implementation changes. The existing native-depth clear tests model completion with `StoreOwnBytes`. During #7220, those tests passed a proposed tracker change that rejects a legitimate BDA-produced clear. This test catches that regression. It reuses the current kernel/recognizer rather than adding instruction semantics. It checks metadata and native-owner acceptance, not numeric sampled-depth readback or gameplay. ### Tested <!-- codex-pr7228-skip-review-v1 --> **Current head `bf8556f8e7741c76af90514197037bae5c5c4d88`, main `e3838332ee31af787ad311b7eadbe53d8d012e95`:** addressed the CI skip-classifier review. The actual published-head Linux JUnit reproduced `check_skips.py --job linux` exit1. The new real lavapipe JUnit has one explicit import limitation and is accepted by both Linux/Windows classifiers (exit0). The missing-host-backend skip was removed: the existing allocation helper throws if guest write watching is unavailable. The device/import limitation now reports `skipped, the device does not retain guest write watching for native clear imports`. Full Windows/Linux relinker/library builds pass at bf8556. The GPU producer passes3/3 on the verified RTX5080 and3/3 on AMD Radeon Graphics. No wider matrix is claimed on this wording/error-path update; earlier evidence retains its pins below. No runtime implementation change or global skip-policy relaxation. <!-- /codex-pr7228-skip-review-v1 --> Initial PR head `19925d409bb090597b00565e2be7bb33442a0132` was based on main `e1041f6a571b6579f9e42334375adb4eb02550e7`. The final rebase includes only #7222's CI-cache change: the complete `core` tree is identical to validated59d (`ac0e84bc230727839633fa478a35aff9d0beb5ee`). Runtime tests are retained with their exact pins below. The file-only overlap check is clean, and conventions pass again after rebasing. **Validated head `59d55694df05ffc3f730cfac25f69c935109f8b7`, based on main `07b4651142a2c40e129c8f9f9746eccf01f6e6ea`:** full Windows/Linux relinker/library builds pass. Main's new libc exception handling is covered by the new producer and native-depth refusal groups repeated 3 times per physical GPU (**6 NVIDIA + 6 AMD passes**); Linux native-depth refusals and the new host-libstdc++ exception test give **6 passes**, with the new GPU producer explicitly skipped for lost import watching. Cppcheck/clang-tidy parse the unchanged fixture with no selected diagnostics. The test is automatically discovered; no shared CMake registration edit is needed. **Earlier wider control at exact head `a76ff55c12bf493d5145db74982fed3c04a5e6de`, main `66702f1cffd3646f2d674ed093fde0a85a70761f`** (the test file is identical): - Full relinker/library builds on Windows 11 build 26200 (GCC 15.2 WinLibs r7) and Ubuntu 24.04. - Six groups repeated 3 times on each physical GPU: **18 NVIDIA passes + 18 AMD passes**, no skips. These cover the new GPU producer, existing native-depth clears/refusals, and 2/4/8-sample DCC clear controls. The new case passes3/3 per GPU, max 0.97s on NVIDIA and 0.69s on AMD; every selected test stays below 30s. Device identity is verified from each fixture's output. - Ubuntu/lavapipe (LLVM 20.1.2): **9 passes, 3 explicit skips**. The new case skips because the import loses write watching; 2-/8-sample DCC controls lack support. No Linux pass is claimed for the new GPU producer. - Fault control [5a9b4c22f](https://github.com/Amoenus/AnyPS5/commit/5a9b4c22f0654c21136b32ed6a8c29ac67e12310) applies the rejected #7220 coverage proposal to this exact standalone test. It fails 3/3 on each GPU at `native multisample depth clear has no complete tracked HTILE store`, after correct metadata readback. Restoring the candidate passes again. The fault-control implementation is not part of this PR. - Conventions pass. Registration: 946 test executables, none built without a registered test. Cppcheck/selected clang-tidy checks parse the new TU with no selected diagnostics. Reproduce with `cmake --build build --target agc_driver_native_depth_bda_clear_tests`, then `ctest --test-dir build -V -R "^agc_driver_native_depth_bda_clear$" --timeout 30`. Use the existing `ANYPS5_GPU` selector and `ANYPS5_REQUIRE_VULKAN=1` for required physical-GPU runs. No new title-startup or speed claim. The related PPSA99902 metadata investigation and unchanged loading-screen stop remain documented in #5336. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Automatic conventions/intake checks passed on this head. Full Linux/Windows CI jobs are skipped until a maintainer dispatches them; please run full CI for this PR. ### 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) - [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: none - [x] GPUs tested: NVIDIA GeForce RTX 5080, driver 32.0.16.1062; AMD Radeon(TM) Graphics, driver 32.0.21036.18; both Windows 11 build 26200. Also Ubuntu 24.04/lavapipe LLVM 20.1.2 for the explicitly scoped controls above (new case skipped). - [x] AI-assisted: yes
oneandonlydean commented 2026-10-17 18:16:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T18:16:47Z.


Thanks, the test reads well. One CI blocker: the Linux job runs tools/check_skips.py on ctest.xml after the tests, and it fails the job for any skip whose output doesn't match its DEVICE_LIMITATION pattern (tools/check_skips.py:6). Both skip messages here would be reported as unexpected skips on lavapipe:

  • skipped, guest write watching is unavailable
  • skipped, native clear imports do not retain guest write watching

So the Linux job would fail even with every test passing. If these really are device/import limitations, could you phrase them to match the existing pattern (for example skipped, the device imports no ... or skipped, host imports are unavailable), or extend the pattern in check_skips.py if neither fits?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238427092 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7228#issuecomment-6238427092). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T18:16:47Z. --- Thanks, the test reads well. One CI blocker: the Linux job runs `tools/check_skips.py` on ctest.xml after the tests, and it fails the job for any skip whose output doesn't match its `DEVICE_LIMITATION` pattern (tools/check_skips.py:6). Both skip messages here would be reported as unexpected skips on lavapipe: - `skipped, guest write watching is unavailable` - `skipped, native clear imports do not retain guest write watching` So the Linux job would fail even with every test passing. If these really are device/import limitations, could you phrase them to match the existing pattern (for example `skipped, the device imports no ...` or `skipped, host imports are unavailable`), or extend the pattern in check_skips.py if neither fits?
Amoenus commented 2026-10-17 18:29:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T18:29:26Z.


@oneandonlydean fixed in bf8556f8e. The published-head real Linux JUnit reproduces the classifier failure; the new actual lavapipe JUnit is accepted by check_skips.py for both jobs.

The import limitation uses the existing device-limit wording. The global write-watch skip is removed; the allocation helper already throws when that host backend is unavailable, so missing host coverage is not disguised as a device limitation. Full local Windows/Linux builds pass, with3/3 producer passes on each physical GPU. Body updated with exact pins and CI-classifier scope. Rebased onto maine383; please use this head for full CI.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238585995 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7228#issuecomment-6238585995). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T18:29:26Z. --- @oneandonlydean fixed in [bf8556f8e](https://github.com/Amoenus/AnyPS5/commit/bf8556f8e7741c76af90514197037bae5c5c4d88). The published-head real Linux JUnit reproduces the classifier failure; the new actual lavapipe JUnit is accepted by `check_skips.py` for both jobs. The import limitation uses the existing device-limit wording. The global write-watch skip is removed; the allocation helper already throws when that host backend is unavailable, so missing host coverage is not disguised as a device limitation. Full local Windows/Linux builds pass, with3/3 producer passes on each physical GPU. Body updated with exact pins and CI-classifier scope. Rebased onto maine383; please use this head for full CI.
MarcZX10 commented 2026-10-17 18:35:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T18:35:23Z.


Thanks for adding the positive BDA producer control. The first #7233 revision would have failed this test because it treated every BDA page as possible-only. I added a producer-scoped proof for the already-recognized complete HTILE kernel and a native-depth regression that keeps the tracker evidence possible-only while verifying the clear remains accepted. If convenient, could you run this test against #7233 head e58b118? It would independently confirm the integration with your real BDA path.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238675547 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7228#issuecomment-6238675547). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T18:35:23Z. --- Thanks for adding the positive BDA producer control. The first #7233 revision would have failed this test because it treated every BDA page as possible-only. I added a producer-scoped proof for the already-recognized complete HTILE kernel and a native-depth regression that keeps the tracker evidence possible-only while verifying the clear remains accepted. If convenient, could you run this test against #7233 head e58b118? It would independently confirm the integration with your real BDA path.
MarcZX10 commented 2026-10-17 18:42:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T18:42:50Z.


Follow-up on my integration request: #7233 is now at f0303b36304f3b7eb1ef67f1ce47518b7a681242. I tightened the recognized-producer exception to require at least one tracked post-baseline HTILE write before using the kernel’s complete-coverage proof; this avoids accepting old matching HTILE bytes before the clear has published any write. The three affected Linux targets compile/link with the existing unrelated GCC template workaround; this host cannot execute the native-depth test due its CPU feature guard. If you get a supported host run, please use the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238801484 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7228#issuecomment-6238801484). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T18:42:50Z. --- Follow-up on my integration request: #7233 is now at `f0303b36304f3b7eb1ef67f1ce47518b7a681242`. I tightened the recognized-producer exception to require at least one tracked post-baseline HTILE write before using the kernel’s complete-coverage proof; this avoids accepting old matching HTILE bytes before the clear has published any write. The three affected Linux targets compile/link with the existing unrelated GCC `template` workaround; this host cannot execute the native-depth test due its CPU feature guard. If you get a supported host run, please use the new head.
Amoenus commented 2026-10-17 19:08:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-17T19:08:55Z.


@MarcZX100 the requested f030 head passes our real BDA clear test3/3 on each physical GPU, and both sparse-store wave controls pass. I also found an existing refusal-test diagnostic mismatch on NVIDIA, AMD and lavapipe. Exact pins, controls and failure details are on #7233. I will update that report in place for follow-up validation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6239246749 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7228#issuecomment-6239246749). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-17T19:08:55Z. --- @MarcZX100 the requested f030 head passes our real BDA clear test3/3 on each physical GPU, and both sparse-store wave controls pass. I also found an existing refusal-test diagnostic mismatch on NVIDIA, AMD and lavapipe. [Exact pins, controls and failure details](https://github.com/boykopovar/AnyPS5/pull/7233#issuecomment-6239238188) are on #7233. I will update that report in place for follow-up validation.
akkadbakkad89 commented 2026-10-17 20:05:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-17T20:05:54Z.


First real-GPU runs of this fixture (it skips on lavapipe by design): head bf8556f8e, Windows 11, MinGW (WinLibs GCC 15.2.0), Release — agc_driver_native_depth_bda_clear passes on NVIDIA RTX 3070 (driver 617.42) and on Intel UHD 630 (ANYPS5_GPU=UHD, igvk64). The full native clear through BDA is exercised end-to-end on both.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240135986 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7228#issuecomment-6240135986). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-17T20:05:54Z. --- First real-GPU runs of this fixture (it skips on lavapipe by design): head `bf8556f8e`, Windows 11, MinGW (WinLibs GCC 15.2.0), Release — `agc_driver_native_depth_bda_clear` passes on NVIDIA RTX 3070 (driver 617.42) and on Intel UHD 630 (`ANYPS5_GPU=UHD`, igvk64). The full native clear through BDA is exercised end-to-end on both.
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!7228
No description provided.