fix(agc): decode line lists drawn by NGG vertex workgroups #26600
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26600"
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 Jazeupoi on 2026-11-24T09:39:53Z.
What
A type-2 PRIMGEN vertex program that needs a workgroup (DS instructions or
s_barrier) and draws a line list withVGT_GS_OUT_PRIM_TYPE = 1threw "VGT_GS_OUT_PRIM_TYPE other than a triangle strip ... is unsupported". The mesh path already exports two-index lines for geometry programs;DecodeShaderStagesnow takes the output size fromVGT_GS_OUT_PRIM_TYPEfor a vertex workgroup too, instead of a fixed 3, when the input is a line list. This matches what RADV programs for line topologies (radv_conv_prim_to_gs_outmaps line lists toLINESTRIP) and how Mesa's NGG lowering packs a line's two indices. Point output from a vertex workgroup, and line output with a non-line input, still throw.NggVertexWorkgroupTestschecks the line-list subgroup (64 lines, 128 vertices and primitives), the last provoking vertex, and that point output from a line list or a point list still throws. The NGG vertex workgroups debt entry is updated through a fragment.Tested
Windows 11, NVIDIA GeForce RTX 2060, driver 621.24.
agc_driver_graphicspasses. It ran on an older local tree (00ede212a0) with this PR'sState.cppand test hunks applied, not on the branch itself.check_conventions.pypasses on the branch.PS5SX2 (PPSA99203) vk-285-321, "PS2 system menu" option: before this change it stops with the error above as soon as the option starts. With it, the start-up animation is drawn (its coloured trails are these lines), then the PlayStation and PS2 logos, and it reaches the "Select language" screen. That run also bypassed two other stops locally, so it doesn't show the title working on
main:noautoprofflag file, for SIGPROF sent throughpthread_killwith an SA_SIGINFO handler,It runs at 1 to 4 FPS there; I have not looked into speed.
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T07:38:52Z.
Review: APPROVED
Reviewed — looks good
The line list workgroup path now derives its output size from the primitive type, and the reviewed state and test changes support merging.
What I ran
Reviewed head
a88ecab6484d6196d8e6b40429d460c9e067fbd8. No commands or tests were run;repo_read.pywas used to inspect the prepared review bundle and source at the pinned head. The author reports a graphics test run on an older local tree and a conventions check on the branch; neither was run by me.Results
Negative control
Not run. The added tests assert that point output from a line list and line output from a point list remain unsupported.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
The full
Graphics.cpptext was excluded from the review bundle for size; I read its relevant changed and surrounding ranges throughrepo_read.py. I read the full changedState.cpprange and debt note. I did not run tests, the conventions check, or a console run.To get this to a good state
Nothing is required.