fix(agc): accept inactive vertex point size on non-point draws #4715
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4715"
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 Lorkydey on 2026-10-12T19:40:19Z.
What
XashPS5 (PPSA19111, v1.3 / content version 01.030.000; bring-up #4711) reaches presentation on main
1acfa7f78and stops at:The rejected bit is
PA_CL_VS_OUT_CNTL.USE_VTX_POINT_SIZE(bit 16). The captured draw uses triangles (VGT_PRIMITIVE_TYPE=4),VGT_SHADER_STAGES_EN=0x02012010andPA_SU_SC_MODE_CNTL=0x00083a40. Point size is inactive for this filled triangle draw.Accept the bit for supported non-point primitives with
GS_ENandHS_ENclear, when polygon mode is disabled or both faces are filled. The draw precheck and state decoder use the same rule. Points, patches, absent routing/raster registers and potentially active polygon point modes remain rejected; clip/cull, edge and kill checks are preserved.The register interpretation follows AMD CIK, PA_CL_VS_OUT_CNTL bit 16 and Vulkan PointSize. This inference is recorded in the existing library debt file; console hardware semantics have not been measured.
With this change alone at 6d5ee52b7, XashPS5 passes that check and stops later at:
The menu and gameplay remain unreachable. This removes one observed presentation blocker.
Tested
Windows: Windows 11 Pro 26100, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, GTX 1660 SUPER (driver 32.0.15.5585). Fulllibs,relinkerand focused test targets build at exact headd4b59ce9fa89b54ab5a0e9ed34f902892d2e4f02, based on main075169f7b3faeae1216efc35df41c44fac9f3190including merged #3763. LocalANYPS5_ENABLE_SPIRV_TOOLS=OFF. All 11 selected tests pass with Vulkan required.Positive checks: Coverage includes shader memory, graphics state, clip/cull distances and both clip/cull pixel variants, layered-volume draw/submit/vertex variants and layer exports. The inactive-point-size pixel regression passes. State tests retain line-strip/primitive-restart and continuation-independent clip/cull coverage. A new combined state case enables inactive point size on a valid layered draw and verifies that layer routing and
paClVsOutCntlremain unchanged.Negative control, Windows and Linux: keeping the pixel test and replacing only
State.cppwith main075169f7bfails at the export check for0x01210000. Restoring the exact PR source and rebuilding recovers the positive results above. The pixel test compares every output byte with the inactive bit off/on while the shader exports point size 1024.0; the reference has partial triangle coverage.Linux: public validation of this exact source passes on Ubuntu 24.04 with GCC, Release, default SPIRV-Tools enabled and lavapipe with Vulkan required. It builds full
libs/relinkerand the focused targets, runs the same 11 selected tests (10 passed, 1 skipped, zero failures), checks conventions/registration, verifies the negative controls and restores/retests the exact PR source.agc_driver_vertex_clip_cull_distancesis skipped by the Linux test; it passes on the Windows GPU above. The workflow is separate from the source branch.Conventions, registration and patch whitespace pass locally. These are focused checks, not the full suite. The earlier Windows XashPS5 title run at
6d5ee52b7with owned Half-Life 1 data reached the later vertex-tail stop in 7.38 s; no fresh title run is claimed for this rebase.Dependencies and overlap
#423 (clip/cull exports), #4584 (line-strip decoding) and #3763 (layered rendering) are merged and included in the tested main baseline. Their implementations are preserved: both export-validation masks, clip/cull count limits,
paClVsOutCntl, layer routing and line-strip topology/primitive restart remain covered.The former #3763 overlap is resolved against its merged implementation. The state decoder retains main's removal of the obsolete unconditional layer-export diagnostic and adds the inactive-point-size allowance alongside the layer and clip/cull export masks. The new combined state regression and the layered-rendering tests above pass. None of these merged PRs remains an outstanding dependency.
Checklist
main; no other open PR found implementing this fixImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T19:42:55Z.
Code review location:
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp; line 112One case to coordinate with open #4584: its fix adds
VGT_PRIMITIVE_TYPE=3line-strip decoding, but this helper still omits primitive 3. Point size is inactive for line strips too, so after #4584 lands this bit will still reject those otherwise-supported draws. Could you add type 3 to the accepted cases and state test, or note the dependency/follow-up and coordinate the overlappingState.cpp/Graphics.cppchanges?Imported from boykopovar/AnyPS5. Originally posted by Lorkydey on 2026-10-12T20:50:19Z.
Code review location:
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp; line 112Thanks for catching this. Addressed in 93f1a1a95: primitive 3 is now accepted by the helper, with state tests for the draw precheck across the three supported raster modes, including indexed primitive restart.
I also listed #4584 as a proposed merge-order dependency. I tested this PR alone and combined with #4584 at 1858502b4 on Windows and Linux. The combined checks assert
LINE_STRIPtopology and preserved primitive restart throughDecodeState; both focused tests pass on both systems (Linux CI, including the integration steps).The line-strip decoder remains in #4584. After it lands, I will rebase and retain those combined decoder assertions in this PR. The description records that follow-up and the validation details.
AI-assisted: yes (Codex).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T21:04:24Z.
Thanks, I checked the updated helper and tests. Primitive 3 is now covered as a line strip, including the indexed primitive-restart precheck, while the tests keep the potentially active point-size cases rejected. The reported convention check is also green.
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T23:24:51Z.
Windows test (MinGW GCC 15.2, Release, Windows 10, RTX 4080 SUPER). Built in a batch with five other open GPU PRs cherry-picked onto main
44ab0c39e(not current main, which needs a submodule that isn't checked out here), so only the tests that belong to this PR say anything about it:tests/execution/InactiveVertexPointSize.cpp(agc_driver_inactive_vertex_point_size): 3 of 3 runs passed.tests/Graphics.cpp(agc_driver_graphics): see below.agc_driver_graphicsover the batch: 9 of 10 runs passed. The one failure is the known address-layout flake from #4660 as far as I can tell: I kept only the first lines of that run's log (thehost import ... vkAllocateMemory (-2)lines, which appear in passing runs as well), not its final error message, so I can't confirm the cause for that one run. Plainmainfailed 2 of 10 on the same machine earlier.Not tested: no game run; the batch was not rebuilt per PR, so a failure would have needed a bisect (there was none besides the flake).
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by Lorkydey on 2026-10-12T23:47:57Z.
@eljackjoestar-cmd @MichonGoddijn231849 Coordinating the newly flagged overlap with #3763.
A pairwise merge simulation of #4715 (
93f1a1a95) and #3763 (53dae55dc) conflicts only inGraphics/src/State.cpp. #3763 carries the clip/cull handling from its #423 dependency, while this PR adds the conditional inactive-point-size allowance.The eventual resolution needs both
ClipCullExportsandinactiveVertexPointSize(queue)in the decode and rejection masks, while retaining the clip/cull count limit,paClVsOutCntlpropagation and rejection of potentially active point size. The state tests that currently reject clip/cull bits will also need updating after #423.The existing proposed prerequisites here remain #423 and #4584. I propose this PR next, before #3763 (subject to its own prerequisites). Does that work for you? If #3763 is ready first, I can instead record that order and rebase this PR after it. I will rerun the state and pixel regressions after integration; no combined build or runtime validation with #3763 is claimed here.
AI-assisted: yes (Codex).
Imported from boykopovar/AnyPS5. Originally posted by eljackjoestar-cmd on 2026-10-13T02:06:01Z.
Yes, #4715 before #3763 works, after #423 and #4584 land. I’ll record #4715 as a merge-order dependency for #3763 and rebase afterward.
The resolution will retain both masks, the clip/cull count limit, paClVsOutCntl propagation and rejection of potentially active point size. I’ll rerun the relevant state and rendering tests after integration.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T15:12:25Z.
Checked on the PR merged onto main: AgcDriver-scoped build and ctest pass (
agc_driver_graphics,agc_driver_inactive_vertex_point_size, prepared graphics variants); the only failure isagc_driver_tessellation, which segfaults on main as well. Both new tests fail without theState.cppchange. The stage and raster masks match GS_EN/HS_EN and the polygon-mode fields, and clip/cull limits and the point/patch rejections are preserved. Merging once the full Build is green.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T01:12:23Z.
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)docs/dev/debt/libSceAgcDriver.mdL4docs/dev/debt/libSceAgcDriver.mdL4docs/dev/debt/libSceAgcDriver.mdL4core/libs/prx/libSceAgcDriver/tests/Graphics.cppL103