test(agc): run agc_driver_mesh_tests under ctest #1811

Merged
gerardlesan merged 1 commit from upstream-pr/1811 into main 2026-10-09 09:41:55 +00:00
gerardlesan commented 2026-10-08 20:01:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gerardlesan on 2026-10-08T20:01:35Z.


What

agc_driver_mesh_tests (tests/Mesh.cpp) checks the translation of NGG geometry programs to mesh shaders. It draws triangle lists, strips and fans, indexed and indirect, and reads the pixels back. It was EXCLUDE_FROM_ALL and never registered, so it ran nowhere; tools/check_test_registration.py listed it in KNOWN_UNRUN. On an RTX 4060 it passes. This PR registers it with the other AGC driver tests, as #1187 did for agc_driver_bda_device_tests.

Why register it although CI skips it: no other test covers this translation, so a regression there would show up only as broken geometry in a title. Contributors already post full-suite runs on real GPUs (NVIDIA, AMD on Windows and RADV in #1012), and each of those runs now includes it.

Three cases had to change first:

Case Before After
No Vulkan device (the Windows job) exit 1 exit 77, skipped
No device, ANYPS5_REQUIRE_VULKAN=1 exit 1 exit 1
Device without VK_EXT_mesh_shader exit 0, reported as passed with nothing drawn exit 77, skipped
llvmpipe (the Linux job) exit 134, LLVM ERROR: Cannot emit physreg copy instruction exit 77, skipped
RTX 4060 passes, not run by ctest passes under ctest

The test now opens its device with OpenVulkanTestDevice and returns VulkanTestSkipped in each skipped case. Its skip messages use the skipped, <reason> form of the other device tests (skipped, the device has no VK_EXT_mesh_shader, skipped, the device has no mesh shader compiler that handles these programs (llvmpipe)), which the skip guard in #1028 accepts as device limitations.

The llvmpipe failure is in LLVM's code generation, not in the SPIR-V this project produces:

  • With Mesa 25.2.8 (the Linux job's mesa-vulkan-drivers) and Ubuntu 24.04's LLVM 20.1.2, every one of the 15 draws that builds a mesh pipeline aborts, each run on its own. The 16th, the fan with a restart index, is refused before compilation, as the test expects.
  • Mesa 26.2.4 with LLVM 23.1 segfaults in llvm::TargetLowering::SimplifyDemandedVectorElts during the same compilation.
  • The 18 SPIR-V modules the test builds pass spirv-val --target-env vulkan1.1spv1.4.
  • Mesa #14376 (open) reports the same error for lavapipe mesh shaders that index shared memory per invocation, which these mesh programs also do. That the cause is the same is not established.

llvmpipe is recognised by its device name (llvmpipe (LLVM …)). VulkanDevice exposes no device type, and adding an accessor for one test seemed more than the fix needs.

Caveats:

  • The Linux and Windows jobs both skip the test, so CI still does not execute it.
  • The case without VK_EXT_mesh_shader was not measured: every device here supports the extension.
  • The runner's LLVM is preinstalled and does not appear in the job log; 20.1.2 is the version the same apt-get install pulls into a clean Ubuntu 24.04 container.

Tested

Arch Linux (CachyOS, kernel 7.2.9), GCC 16.2.1, Release, BUILD_TESTING=ON, main 94b1eecb. NVIDIA RTX 4060 Laptop GPU (driver 615.71.09), and lavapipe.

  • Each row of the table above was run on main and on this branch. Devices: the RTX 4060; lavapipe from Ubuntu 24.04's mesa-vulkan-drivers 25.2.8 with GALLIUM_OVERRIDE_CPU_CAPS=avx and ANYPS5_REQUIRE_VULKAN=1, as in the Linux job; and no ICD (VK_ICD_FILENAMES pointing to a missing file), with and without ANYPS5_REQUIRE_VULKAN. Arch's lavapipe 26.2.4 also exits 77 on this branch.
  • ctest -R '^agc_driver_mesh$' --repeat until-fail:3: passed on the RTX 4060 (1.4 s), skipped on lavapipe.
  • tools/check_test_registration.py build: 433 test executable(s), 2 built and not run as recorded, none new (3 on main).
  • Full suite (ctest --output-on-failure, RTX 4060): 490 of 490 passed, 0 skipped. The one test added to the run is agc_driver_mesh.
  • #1028's tools/check_skips.py (at 1ea58302) on this test's ctest --output-junit file: 1 test(s) skipped, all expected on CI's lavapipe, and with --job windows without a device. The earlier Mesh tests skipped: llvmpipe … wording failed it.
  • tools/check_conventions.py with this title and description: all checks passed.
  • Windows: not tested. There, the change is the skip without a device.
  • 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:4792137824 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1811). Originally posted by [gerardlesan](https://github.com/gerardlesan) on 2026-10-08T20:01:35Z. --- ### What `agc_driver_mesh_tests` ([`tests/Mesh.cpp`](https://github.com/boykopovar/AnyPS5/blob/94b1eecb/core/libs/prx/libSceAgcDriver/tests/Mesh.cpp)) checks the translation of NGG geometry programs to mesh shaders. It draws triangle lists, strips and fans, indexed and indirect, and reads the pixels back. It was `EXCLUDE_FROM_ALL` and never registered, so it ran nowhere; `tools/check_test_registration.py` listed it in `KNOWN_UNRUN`. On an RTX 4060 it passes. This PR registers it with the other AGC driver tests, as #1187 did for `agc_driver_bda_device_tests`. Why register it although CI skips it: no other test covers this translation, so a regression there would show up only as broken geometry in a title. Contributors already post full-suite runs on real GPUs (NVIDIA, AMD on Windows and RADV in #1012), and each of those runs now includes it. Three cases had to change first: | Case | Before | After | |---|---|---| | No Vulkan device (the Windows job) | exit 1 | exit 77, skipped | | No device, `ANYPS5_REQUIRE_VULKAN=1` | exit 1 | exit 1 | | Device without `VK_EXT_mesh_shader` | exit 0, reported as passed with nothing drawn | exit 77, skipped | | llvmpipe (the Linux job) | exit 134, `LLVM ERROR: Cannot emit physreg copy instruction` | exit 77, skipped | | RTX 4060 | passes, not run by ctest | passes under ctest | The test now opens its device with `OpenVulkanTestDevice` and returns `VulkanTestSkipped` in each skipped case. Its skip messages use the `skipped, <reason>` form of the other device tests (`skipped, the device has no VK_EXT_mesh_shader`, `skipped, the device has no mesh shader compiler that handles these programs (llvmpipe)`), which the skip guard in #1028 accepts as device limitations. The llvmpipe failure is in LLVM's code generation, not in the SPIR-V this project produces: - With Mesa 25.2.8 (the Linux job's `mesa-vulkan-drivers`) and Ubuntu 24.04's LLVM 20.1.2, every one of the 15 draws that builds a mesh pipeline aborts, each run on its own. The 16th, the fan with a restart index, is refused before compilation, as the test expects. - Mesa 26.2.4 with LLVM 23.1 segfaults in `llvm::TargetLowering::SimplifyDemandedVectorElts` during the same compilation. - The 18 SPIR-V modules the test builds pass `spirv-val --target-env vulkan1.1spv1.4`. - Mesa [#14376](https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14376) (open) reports the same error for lavapipe mesh shaders that index shared memory per invocation, which these mesh programs also do. That the cause is the same is not established. llvmpipe is recognised by its device name (`llvmpipe (LLVM …)`). `VulkanDevice` exposes no device type, and adding an accessor for one test seemed more than the fix needs. Caveats: - The Linux and Windows jobs both skip the test, so CI still does not execute it. - The case without `VK_EXT_mesh_shader` was not measured: every device here supports the extension. - The runner's LLVM is preinstalled and does not appear in the job log; 20.1.2 is the version the same `apt-get install` pulls into a clean Ubuntu 24.04 container. ### Tested Arch Linux (CachyOS, kernel 7.2.9), GCC 16.2.1, Release, `BUILD_TESTING=ON`, `main` 94b1eecb. NVIDIA RTX 4060 Laptop GPU (driver 615.71.09), and lavapipe. - Each row of the table above was run on `main` and on this branch. Devices: the RTX 4060; lavapipe from Ubuntu 24.04's `mesa-vulkan-drivers` 25.2.8 with `GALLIUM_OVERRIDE_CPU_CAPS=avx` and `ANYPS5_REQUIRE_VULKAN=1`, as in the Linux job; and no ICD (`VK_ICD_FILENAMES` pointing to a missing file), with and without `ANYPS5_REQUIRE_VULKAN`. Arch's lavapipe 26.2.4 also exits 77 on this branch. - `ctest -R '^agc_driver_mesh$' --repeat until-fail:3`: passed on the RTX 4060 (1.4 s), skipped on lavapipe. - `tools/check_test_registration.py build`: `433 test executable(s), 2 built and not run as recorded, none new` (3 on `main`). - Full suite (`ctest --output-on-failure`, RTX 4060): 490 of 490 passed, 0 skipped. The one test added to the run is `agc_driver_mesh`. - #1028's `tools/check_skips.py` (at `1ea58302`) on this test's `ctest --output-junit` file: `1 test(s) skipped, all expected` on CI's lavapipe, and with `--job windows` without a device. The earlier `Mesh tests skipped: llvmpipe …` wording failed it. - `tools/check_conventions.py` with this title and description: all checks passed. - Windows: not tested. There, the change is the skip without a device. - 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)
MarcZX10 commented 2026-10-08 20:52:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T20:52:36Z.


One CI interaction to coordinate before merge: open PR #1028 adds a Linux CTest skip guard. Its current DEVICE_LIMITATION rule accepts skip output mentioning narrow subgroups or an unavailable device/extension. This test prints Mesh tests skipped: llvmpipe fails to compile the mesh programs, so that rule will classify the llvmpipe skip as unexpected and fail CI if #1028 lands first (the Windows agc* rule does accept this test). Please coordinate with #1028’s author/reviewer on a narrow exception for this known llvmpipe compiler failure, or another explicit handling, and make sure the combined heads pass the guard.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6068838256 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1811#issuecomment-6068838256). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-08T20:52:36Z. --- One CI interaction to coordinate before merge: open PR #1028 adds a Linux CTest skip guard. Its current `DEVICE_LIMITATION` rule accepts skip output mentioning narrow subgroups or an unavailable device/extension. This test prints `Mesh tests skipped: llvmpipe fails to compile the mesh programs`, so that rule will classify the llvmpipe skip as unexpected and fail CI if #1028 lands first (the Windows `agc*` rule does accept this test). Please coordinate with #1028’s author/reviewer on a narrow exception for this known llvmpipe compiler failure, or another explicit handling, and make sure the combined heads pass the guard.
MarcZX10 commented 2026-10-08 20:52:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T20:52:49Z.


CI status: upstream Build, Conventions and Progress runs for head 0a4cbfa are all action_required; none has run. CONTRIBUTING says fork workflows require maintainer approval. Please request that approval and wait for the upstream checks, especially the combined skip-guard case noted above.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6068841541 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1811#issuecomment-6068841541). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-08T20:52:49Z. --- CI status: upstream Build, Conventions and Progress runs for head `0a4cbfa` are all `action_required`; none has run. CONTRIBUTING says fork workflows require maintainer approval. Please request that approval and wait for the upstream checks, especially the combined skip-guard case noted above.
MarcZX10 commented 2026-10-08 20:54:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T20:54:15Z.


One contribution-rule item: head 0a4cbfa diverges from current upstream main 0447793 (1 commit ahead, 4 behind). CONTRIBUTING requires PR branches to be based on current main; please rebase and rerun upstream checks on that head before final review.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6068864422 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1811#issuecomment-6068864422). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-08T20:54:15Z. --- One contribution-rule item: head `0a4cbfa` diverges from current upstream `main` 0447793 (1 commit ahead, 4 behind). CONTRIBUTING requires PR branches to be based on current `main`; please rebase and rerun upstream checks on that head before final review.
gerardlesan commented 2026-10-08 21:45:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gerardlesan on 2026-10-08T21:45:10Z.


Thanks. Addressed in the force-push to 1d696822:

  • Rebased onto current main (94b1eecb).
  • The skip messages now use the skipped, <reason> form of the other device tests: skipped, the device has no VK_EXT_mesh_shader and skipped, the device has no mesh shader compiler that handles these programs (llvmpipe). #1028's tools/check_skips.py (at 1ea58302) accepts both. On this test's ctest --output-junit file it reports 1 test(s) skipped, all expected on the Linux job's lavapipe (Mesa 25.2.8), and with --job windows without a device. The previous wording failed it, as you said. Neither PR needs an exception, and the merge order does not matter.
  • The upstream runs are waiting for a maintainer to approve them.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6069648636 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1811#issuecomment-6069648636). Originally posted by [gerardlesan](https://github.com/gerardlesan) on 2026-10-08T21:45:10Z. --- Thanks. Addressed in the force-push to `1d696822`: - Rebased onto current `main` (`94b1eecb`). - The skip messages now use the `skipped, <reason>` form of the other device tests: `skipped, the device has no VK_EXT_mesh_shader` and `skipped, the device has no mesh shader compiler that handles these programs (llvmpipe)`. #1028's `tools/check_skips.py` (at `1ea58302`) accepts both. On this test's `ctest --output-junit` file it reports `1 test(s) skipped, all expected` on the Linux job's lavapipe (Mesa 25.2.8), and with `--job windows` without a device. The previous wording failed it, as you said. Neither PR needs an exception, and the merge order does not matter. - The upstream runs are waiting for a maintainer to approve them.
github-actions[bot] commented 2026-10-09 02:44:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T02:44:15Z.


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
#1959 core/libs/prx/libSceAgcDriver/CMakeLists.txt L629
#2015 core/libs/prx/libSceAgcDriver/CMakeLists.txt L629
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6073187487 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1811#issuecomment-6073187487). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T02:44:15Z. --- <!-- 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 | |---|---|---|---| | #1959 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L629](https://github.com/boykopovar/AnyPS5/blob/ca2b341852e5109c30c46f77f676e352f71b0e4e/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L629) | | | | #2015 | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` [L629](https://github.com/boykopovar/AnyPS5/blob/ca2b341852e5109c30c46f77f676e352f71b0e4e/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L629) | | |
popcoder565 commented 2026-10-09 08:30:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T08:30:16Z.


Ran this on Windows with a device, since the description lists Windows as not tested.

Setup: Windows 10 (19045), RTX 3060 Laptop GPU (NVIDIA 616.92, mesh=1), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 1d696822 merged onto main 6cc0503d. I also merged #2093, because main currently can't build agc_driver_tests and agc_shader_fusion_tests without it.

  • agc_driver_mesh runs under ctest, not skipped, and passes 10/10 (Mesh tests passed, about 1.8 s).
  • Full ctest: 495/495.
  • tools/check_test_registration.py passes (none new).

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077351899 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1811#issuecomment-6077351899). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T08:30:16Z. --- Ran this on Windows with a device, since the description lists Windows as not tested. Setup: Windows 10 (19045), RTX 3060 Laptop GPU (NVIDIA 616.92, `mesh=1`), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `1d696822` merged onto `main` 6cc0503d. I also merged #2093, because `main` currently can't build `agc_driver_tests` and `agc_shader_fusion_tests` without it. - `agc_driver_mesh` runs under ctest, not skipped, and passes 10/10 (`Mesh tests passed`, about 1.8 s). - Full ctest: 495/495. - `tools/check_test_registration.py` passes (`none new`). _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
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!1811
No description provided.