test(agc): run agc_driver_bda_device_tests under ctest #1187

Merged
johnmaia merged 1 commit from upstream-pr/1187 into main 2026-10-08 05:20:39 +00:00
johnmaia commented 2026-10-07 16:45:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-07T16:45:37Z.


What

agc_driver_bda_device_tests was EXCLUDE_FROM_ALL and never registered, so it ran nowhere (#22, #23 left it out pending #14 and #20). It now runs under ctest with the other AGC driver tests.

  • The test picked devices.front(). It now ranks devices as VulkanDevice does (discrete, integrated, virtual, then the rest; Vulkan 1.1 or newer), so on a host with an iGPU it runs on the same GPU as the runtime.
  • Without a usable Vulkan device it exits 77 (skipped), as OpenVulkanTestDevice does, unless ANYPS5_REQUIRE_VULKAN is set. The Windows job has no Vulkan driver.
  • On a CPU device (lavapipe) the BDA execution tests are not run and the test says so. The contract, allocation and color transfer tests still run there.

The BDA execution tests segfault on lavapipe on main too: the third dispatch, a 32-bit read at guest + 1 that spans both ranges, faults in llvmpipe's JIT code on vpbroadcastd (%rcx) with rcx = 0. The probe returns 0 for that read, and the only load through the probe result sits behind OpBranchConditional mapped && aligned. llvmpipe executes it anyway. With APS5_BDA_BYTE_READS=1, which removes that branch, all 22 dispatches pass on lavapipe.

A 20-line GLSL shader reproduces it outside the project (if (address != 0) value = Word(address).value; with address = 0): it crashes lavapipe at every GALLIUM_OVERRIDE_CPU_CAPS level (sse2, sse4_2, avx, avx2, native on an Alder Lake CPU; Mesa 25.2.8, LLVM 20.1.2), and returns the right value on RADV and ANV. Reported upstream as Mesa #16515 (same AnyPS5 shader), same class as #16217.

agc_driver_recorder_tests has the same devices.front() and is also unregistered, but fails on main on every device (an unchanged draw input was copied again); that is a separate PR.

Tested

Linux, Ubuntu 24.04.5, GCC 13.3, Mesa 25.2.8; i3-12100 with RX 7600 (RADV) and UHD 730 (ANV).

  • ctest (Release, BUILD_TESTING=ON, ANYPS5_REQUIRE_VULKAN=1): 400/400 on the RX 7600; 400/400 on lavapipe alone with the CI settings (GALLIUM_OVERRIDE_CPU_CAPS=avx, --repeat until-fail:3), 21 skipped as before.
  • agc_driver_bda_device_tests alone:
Vulkan devices selected result
all, iGPU enumerated first RX 7600 passes
all, default order RX 7600 passes
UHD 730 + lavapipe UHD 730 passes
lavapipe only lavapipe passes, BDA execution not tested
none - exit 77 (skipped)
none, ANYPS5_REQUIRE_VULKAN=1 - exit 1
  • Windows: not tested locally; the change on that job is the skip above.
  • No title was run.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4775690265 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1187). Originally posted by [johnmaia](https://github.com/johnmaia) on 2026-10-07T16:45:37Z. --- ### What `agc_driver_bda_device_tests` was `EXCLUDE_FROM_ALL` and never registered, so it ran nowhere (#22, #23 left it out pending #14 and #20). It now runs under ctest with the other AGC driver tests. - The test picked `devices.front()`. It now ranks devices as `VulkanDevice` does (discrete, integrated, virtual, then the rest; Vulkan 1.1 or newer), so on a host with an iGPU it runs on the same GPU as the runtime. - Without a usable Vulkan device it exits 77 (skipped), as `OpenVulkanTestDevice` does, unless `ANYPS5_REQUIRE_VULKAN` is set. The Windows job has no Vulkan driver. - On a CPU device (lavapipe) the BDA execution tests are not run and the test says so. The contract, allocation and color transfer tests still run there. The BDA execution tests segfault on lavapipe on `main` too: the third dispatch, a 32-bit read at `guest + 1` that spans both ranges, faults in llvmpipe's JIT code on `vpbroadcastd (%rcx)` with `rcx = 0`. The probe returns 0 for that read, and the only load through the probe result sits behind `OpBranchConditional mapped && aligned`. llvmpipe executes it anyway. With `APS5_BDA_BYTE_READS=1`, which removes that branch, all 22 dispatches pass on lavapipe. A 20-line GLSL shader reproduces it outside the project (`if (address != 0) value = Word(address).value;` with `address = 0`): it crashes lavapipe at every `GALLIUM_OVERRIDE_CPU_CAPS` level (sse2, sse4_2, avx, avx2, native on an Alder Lake CPU; Mesa 25.2.8, LLVM 20.1.2), and returns the right value on RADV and ANV. Reported upstream as Mesa [#16515](https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16515) (same AnyPS5 shader), same class as [#16217](https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16217). `agc_driver_recorder_tests` has the same `devices.front()` and is also unregistered, but fails on `main` on every device (`an unchanged draw input was copied again`); that is a separate PR. ### Tested Linux, Ubuntu 24.04.5, GCC 13.3, Mesa 25.2.8; i3-12100 with RX 7600 (RADV) and UHD 730 (ANV). - `ctest` (Release, `BUILD_TESTING=ON`, `ANYPS5_REQUIRE_VULKAN=1`): 400/400 on the RX 7600; 400/400 on lavapipe alone with the CI settings (`GALLIUM_OVERRIDE_CPU_CAPS=avx`, `--repeat until-fail:3`), 21 skipped as before. - `agc_driver_bda_device_tests` alone: | Vulkan devices | selected | result | | --- | --- | --- | | all, iGPU enumerated first | RX 7600 | passes | | all, default order | RX 7600 | passes | | UHD 730 + lavapipe | UHD 730 | passes | | lavapipe only | lavapipe | passes, BDA execution not tested | | none | - | exit 77 (skipped) | | none, `ANYPS5_REQUIRE_VULKAN=1` | - | exit 1 | - Windows: not tested locally; the change on that job is the skip above. - No title was run. ### Checklist - [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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-07 19:37:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T19:37:24Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1298 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1309 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1311 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1312 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1313 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1316 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1318 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1341 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1343 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
#1372 core/libs/prx/libSceAgcDriver/CMakeLists.txt L526
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6045406079 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1187#issuecomment-6045406079). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-07T19:37:24Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1298 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1309 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1311 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1312 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1313 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1316 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1318 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1341 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1343 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | | | #1372 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L526](https://github.com/boykopovar/AnyPS5/blob/5850a6cd115a0e62eed83db291709a0027d285b5/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L526) | | |
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!1187
No description provided.