feat(agc): draw point-list output of NGG geometry programs as mesh points #8856
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8856"
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 klosixgaming-arch on 2026-10-21T03:27:01Z.
What
Support point-list geometry programs (
VGT_GS_OUT_PRIM_TYPE = 0) on the NGG mesh shader translation path.VGT_GS_OUT_PRIM_TYPEis 0 and!vertexWorkgroup, decodeoutputPrimitiveSize = 1,provokingVertex = 0, andRasterPrimitive::Point.OutputPointsin SPIR-V with scalarPrimitivePointIndicesEXToutput array.EmitMeshEntryPoint, unpack the 9-bit vertex index from bits [8:0] of the packed primitive export word and store directly intoPrimitivePointIndicesEXT.outputPrimitiveSize == 1in validation and input info builder.Graphics.cppandVertexInputValidation.cpp.docs/dev/debt/libSceAgcDriver.md).Tested
agc_driver_graphics(100% pass)agc_driver_mesh(100% pass)agc_vertex_input_validation(100% pass)agc_shader_memory(100% pass)tools/check_conventions.py --base origin/main(All conventions checks passed)[gpu] driver failure: AGC graphics: VGT_SHADER_STAGES_EN=0x2030: VGT_GS_OUT_PRIM_TYPE other than a triangle strip, or a line strip from a geometry program, is unsupportedChecklist
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 github-actions[bot] on 2026-10-21T03:35:17Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL1094-1097core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppL140, L143, L461, L516core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL1094-1095, L1108, L1340, L1625core/libs/prx/libSceAgcDriver/tests/Graphics.cppL1072-1073, L1078, L1080, L1234core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppL1026, L1030, L1149-1152core/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cppL73docs/dev/debt/libSceAgcDriver.mdL30core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL1094-1097docs/dev/debt/libSceAgcDriver.mdL29-30docs/dev/debt/libSceAgcDriver.mdL30-31Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvModuleSetup.cppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvModuleSetup.cppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T04:33:33Z.
There is functional overlap with our earlier #6801, beyond the shared debt lines: both decode NGG geometry point output, emit OutputPoints/PrimitivePointIndicesEXT, and accept primitive size 1. I checked this PR at
ee81c5112dagainst #6801 at c479ec2e3a5b0ce764dfac15647462a369bba3af.#6801 additionally carries register/exported point sizing via #6639 and records its paired validation evidence in the description. It has not been rerun on your Windows/NVIDIA setup, and your Cocoon result is useful independent evidence.
Could we agree on which point-output implementation lands first, then rebase the other down to any remaining behavior? Our current branch depends on #6639; neither branch currently depends on the other, so I have not added a fictitious dependency. If this smaller implementation lands first, I will remove the duplicate point-output portions from #6801 and retain only any remaining point-size integration/tests. If #6801 lands first, this PR will need the corresponding reduction. Please keep the different Cocoon source pins/results explicit; our earlier title test stopped later at combined tessellation/geometry and did not establish gameplay.
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-21T04:53:37Z.
@JJenkx thanks for checking, and sorry for missing #6801 before opening this. #6801 came first and covers more (point size through #6639), so I'm happy for it to land first. I'll run Cocoon (PPSA08766) on #6801's head on Windows / RTX 5090 and post the result there; if it gets past the same
VGT_GS_OUT_PRIM_TYPEstop, I'll close this PR.A correction to the description here: the GPU driver is NVIDIA 617.42, not 572.70.
AI-assisted: yes. Written with AI assistance and reviewed by me.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T08:35:16Z.
@klosixgaming-arch thanks, the decode and the
OutputPointsemission read right, and the vertex-workgroup case still throws. Two small things about point size, neither blocking:PointSize. Vulkan leaves the size of an unwritten point undefined unlessmaintenance5is enabled, and the device only queries its properties. The hardware takes the size from the vertex export or fromPA_SU_POINT_SIZE(0x280). The vertex-program point path onmainhas the same gap, so this isn't a regression, but could the debt entry name it?SpirvModuleEmitter.cppstores it into the non-arrayedpointSizeVariable, which a mesh shader can't use. A test showing that this case throws (or a per-vertexPointSizeoutput) would pin it.One line in
NggVertexWorkgroupTestsis indented one level too deep.