fix(agc): require 32-lane subgroups for wave32 mesh programs #2996

Merged
MarcZX10 merged 1 commit from upstream-pr/2996 into main 2026-10-10 23:58:21 +00:00
MarcZX10 commented 2026-10-10 20:07:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T20:07:25Z.


What

Fixes #2815. Detect when Vulkan supports required 32-lane subgroups for the mesh stage, enable subgroup-size control when either compute or mesh wave32 needs it, and request subgroup size 32 for wave32 mesh shader stages. Devices that do not advertise this mesh-stage capability keep their existing pipeline behavior.

This carries Silverash-i8's reviewed fix with original commit authorship preserved.

Tested

  • Linux x86_64, GCC 12.2, Release: agc_driver_mesh_tests build passed on current main.
  • CTest agc_driver_mesh: skipped because the local llvmpipe device does not support VK_EXT_mesh_shader.
  • Native Windows Intel Arrow Lake and Mesa ANV Intel Arc runs reported on #2815: agc_driver_mesh passed 3/3 on each device; the reporter observed all 40 triangles rendered in every mesh draw on Arrow Lake.
  • Conventions and git diff --check: passed.

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
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4814094956 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2996). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T20:07:25Z. --- ### What Fixes #2815. Detect when Vulkan supports required 32-lane subgroups for the mesh stage, enable subgroup-size control when either compute or mesh wave32 needs it, and request subgroup size 32 for wave32 mesh shader stages. Devices that do not advertise this mesh-stage capability keep their existing pipeline behavior. This carries Silverash-i8's reviewed fix with original commit authorship preserved. ### Tested - Linux x86_64, GCC 12.2, Release: `agc_driver_mesh_tests` build passed on current `main`. - CTest `agc_driver_mesh`: skipped because the local llvmpipe device does not support `VK_EXT_mesh_shader`. - Native Windows Intel Arrow Lake and Mesa ANV Intel Arc runs reported on #2815: `agc_driver_mesh` passed 3/3 on each device; the reporter observed all 40 triangles rendered in every mesh draw on Arrow Lake. - Conventions and `git diff --check`: passed. ### 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 - [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
fma-rc commented 2026-10-10 21:54:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-10T21:54:54Z.


Ran this on two devices that have VK_EXT_mesh_shader, since the description says the test was skipped on llvmpipe. Head a3437abd on main 262c0316, Linux, GCC 16.2.1, Release.

An RTX 5080 (NVIDIA 615.78.08, subgroup 32) and a Radeon 610M (RADV, subgroup 64) both log Wave32 programs run on subgroups of 32: compute 1, mesh 1, and agc_driver_mesh passes on both, on the NVIDIA card also with APS5_NO_GPL=1. Full ctest shows nothing new: 709 of 709 on RADV, and on NVIDIA the only failure is agc_driver_dcc_keys_first_write, which fails on main as well. The build had two unrelated open PRs merged in too.

Neither device has a 32-lane default with a smaller minimum, so this does not exercise the Intel case the fix is for.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102583416 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2996#issuecomment-6102583416). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-10T21:54:54Z. --- Ran this on two devices that have `VK_EXT_mesh_shader`, since the description says the test was skipped on llvmpipe. Head a3437abd on `main` 262c0316, Linux, GCC 16.2.1, Release. An RTX 5080 (NVIDIA 615.78.08, subgroup 32) and a Radeon 610M (RADV, subgroup 64) both log `Wave32 programs run on subgroups of 32: compute 1, mesh 1`, and `agc_driver_mesh` passes on both, on the NVIDIA card also with `APS5_NO_GPL=1`. Full ctest shows nothing new: 709 of 709 on RADV, and on NVIDIA the only failure is `agc_driver_dcc_keys_first_write`, which fails on `main` as well. The build had two unrelated open PRs merged in too. Neither device has a 32-lane default with a smaller minimum, so this does not exercise the Intel case the fix is for.
adriadam10 commented 2026-10-10 23:58:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T23:58:18Z.


Checked on current main with the PR merged in: agc_driver_mesh passes, nothing new in the libSceAgcDriver ctest. The requirement reaches the graphics pipeline library path too, since it copies the stage structs with their pNext. The Intel/ANV behaviour rests on the runs reported by @ThatsLeo and on #2815; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103530380 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2996#issuecomment-6103530380). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T23:58:18Z. --- Checked on current `main` with the PR merged in: `agc_driver_mesh` passes, nothing new in the libSceAgcDriver ctest. The requirement reaches the graphics pipeline library path too, since it copies the stage structs with their `pNext`. The Intel/ANV behaviour rests on the runs reported by @ThatsLeo and on #2815; merging.
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!2996
No description provided.