fix(agc): NGG passthrough routing of a topology the mesh path does not assemble draws through the vertex path #256

Closed
MichonGoddijn231849 wants to merge 1 commit from upstream-pr/256 into main
MichonGoddijn231849 commented 2026-10-01 20:04:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-01T20:04:23Z.


What

Since #143 (4cd8e353), passthrough routing (VGT_SHADER_STAGES_EN bit 25) makes every draw a mesh draw. The mesh assembly takes only triangle lists and strips, so it rejects passthrough rect lists (primitive 7 and 17) and triangle fans (5) with unsupported geometry input or output assembly. Before #143 those draws took the vertex path, which draws them (rect lists through rectList, fans as TRIANGLE_FAN). Its routing check still accepts the passthrough bit (0x02402010).

The path is now chosen from the primitive type before the stage decode:

  • passthrough triangle lists and strips are mesh draws, as in #143;
  • every other passthrough topology draws through the vertex path.

ShaderStageTests gains passthrough rect lists (7, 17) and a fan (5), which must decode to the vertex path (rect lists as rect lists). The test fails without the change.

GTA V draws passthrough rect lists and fans into its HDR scene target, and on current main every one of them was rejected.

Tested

Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.

  • agc_driver_graphics: the new cases pass, and fail without the change.
  • GTA V (PPSA04264), with #167: the VGT_SHADER_STAGES_EN=0x2002000: unsupported geometry input or output assembly rejections into the HDR target are gone.
  • ctest: all tests pass.

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. Written with Claude (Anthropic) under my direction; I reviewed and tested it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4708943845 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/256). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-01T20:04:23Z. --- ### What Since #143 (4cd8e353), passthrough routing (`VGT_SHADER_STAGES_EN` bit 25) makes every draw a mesh draw. The mesh assembly takes only triangle lists and strips, so it rejects passthrough rect lists (primitive 7 and 17) and triangle fans (5) with `unsupported geometry input or output assembly`. Before #143 those draws took the vertex path, which draws them (rect lists through `rectList`, fans as `TRIANGLE_FAN`). Its routing check still accepts the passthrough bit (`0x02402010`). The path is now chosen from the primitive type before the stage decode: - passthrough triangle lists and strips are mesh draws, as in #143; - every other passthrough topology draws through the vertex path. `ShaderStageTests` gains passthrough rect lists (7, 17) and a fan (5), which must decode to the vertex path (rect lists as rect lists). The test fails without the change. GTA V draws passthrough rect lists and fans into its HDR scene target, and on current `main` every one of them was rejected. ### Tested Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0. - `agc_driver_graphics`: the new cases pass, and fail without the change. - GTA V (PPSA04264), with #167: the `VGT_SHADER_STAGES_EN=0x2002000: unsupported geometry input or output assembly` rejections into the HDR target are gone. - `ctest`: all tests pass. ### 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [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. Written with Claude (Anthropic) under my direction; I reviewed and tested it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
boykopovar commented 2026-10-01 20:51:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-10-01T20:51:43Z.


I rolled back changes #143 here #258. Before that, I tried applying your fix, and even with it, the regression did not go away.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5940304022 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/256#issuecomment-5940304022). Originally posted by [boykopovar](https://github.com/boykopovar) on 2026-10-01T20:51:43Z. --- I rolled back changes #143 here #258. Before that, I tried applying your fix, and even with it, the regression did not go away.
MichonGoddijn231849 commented 2026-10-01 21:59:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-01T21:59:05Z.


Thanks for checking. With #143 reverted in #258 there is nothing left for this to fix, and the subgroup capability failure on Dreaming Sarah was a separate problem this didn't touch. Closing.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5941496132 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/256#issuecomment-5941496132). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-01T21:59:05Z. --- Thanks for checking. With #143 reverted in #258 there is nothing left for this to fix, and the subgroup capability failure on Dreaming Sarah was a separate problem this didn't touch. Closing.

Pull request closed

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!256
No description provided.