fix(recompiler): give vertex-path shaders the NGG group info #5081
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5081"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T11:01:31Z.
What
The vertex-path entry prologue sets the NGG merged wave info in
s3, but leavess2at 0. On the NGG paths2holds GS_TG_INFO: the subgroup's vertex count is in bits 12-20 and its primitive count in bits 22-30. Shaders compiled with LLPC (amdllpc) read their vertex count from it and build EXEC from it. The EVO engine'sui_screen_2dGS starts with:With
s2= 0 no vertex is exported, so every draw executes, retires and rasterizes nothing. EVO Player, Jelly5 and Emby5 present only the backdrop colour their CPU writes into the scanout each frame (#4997).This sets
s2next tos3in the same prologue. It uses the same lane count as both the vertex and the primitive count, and ordered wave ID 0. That is a whole one-wave subgroup, consistent with whats3already says.The test adds a second vertex program to
agc_driver_ngg_vertex_wave_info. This one builds EXEC froms2the way the LLPC shaders do, and the test checks every pixel for wave64 and wave32. Without the fix it fails:pixel 0 channel 0 is 64, expected 255 (EXEC built from the group info must cover every vertex).Tested
Windows 11 (26300), Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), WinLibs GCC 15.2.0, Release.
ctest -R '^agc_' -j 1with an empty test shader cache: 464/464.ctest -E '^agc_' -j 4: 587/587.agc_driver_ngg_vertex_wave_infofails with theInstructionTranslator.cppchange reverted, and passes with it.--windows, 60 s each. Onmainevery frame is the clear colourff100d0d, and the title's ownagc scanout dumpreportschanged=0. With this PR:Fork CI: run 38383945000. Linux 1033/1034, Windows 1050/1051, relinker 144/145 on each OS. The one failure everywhere is
conventions_ci_gate, which fails on any fork run because the fork uses the pre-gate workflow.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Fixes #4997
Imported from boykopovar/AnyPS5. Originally posted by KauaSantos702 on 2026-10-14T01:19:46Z.
On NVIDIA this fixes #4997 for Jelly5: before, it presented only its clear colour; at this head it draws its UI.
Setup
eboot.binandsce_module/libc.prxwere unwrapped from their fSELF containers and relinked with--windowsand default flags.APS5_DUMP_FRAMES=60.maind1670009fpresents=600,tex_fail=0,timeouts=0#100d0da1d19f00epresents=600,tex_fail=0,timeouts=0The title's own boot-time readback (
agc scanout dump ... changed=0) appears in both runs, because the title takes it at frame 0 before it draws anything, so it doesn't tell the two builds apart. The dumped frames do.Frame 59 at
main(left) and at this PR (right):agc_driver_ngg_vertex_wave_infopasses 3/3 at this head on the same card. That makes this PR's results NVIDIA (here) and RDNA 3.5 (the PR body). I did not run EVO Player or Emby5.