Skip to content

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 into
boykopovar:mainfrom
MichonGoddijn231849:fix/ngg-passthrough-vertex-topologies
Closed

MichonGoddijn231849 wants to merge 1 commit into
boykopovar:mainfrom
MichonGoddijn231849:fix/ngg-passthrough-vertex-topologies

Conversation

@MichonGoddijn231849

@MichonGoddijn231849 MichonGoddijn231849 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Since #143 (4cd8e35), 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:

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 feat: GTA V in game, Story Mode renders (follows #153) #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

…t assemble draws through the vertex path

Passthrough routing (VGT_SHADER_STAGES_EN bit 25) made every draw a mesh draw, whose assembly
takes triangle lists and strips only, so passthrough rect lists and triangle fans, which the vertex
path draws and drew before, were rejected. The path is chosen from the primitive type: passthrough
triangle lists and strips are mesh draws, other topologies draw through the vertex path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@boykopovar

Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Contributor Author

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.

@MichonGoddijn231849
MichonGoddijn231849 deleted the fix/ngg-passthrough-vertex-topologies branch October 9, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants