Repository navigation
fix(agc): accept inactive vertex point size on non-point draws - #4715
Conversation
6d5ee52 to
93f1a1a
Compare
|
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. |
|
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
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). |
|
@eljackjoestar-cmd @MichonGoddijn231849 Coordinating the newly flagged overlap with #3763. A pairwise merge simulation of #4715 ( The eventual resolution needs both 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). |
|
Yes, #4715 before #3763 works, after #423 and #4584 land. I’ll record #4715 as a merge-order dependency for #3763 and rebase afterward. |
93f1a1a to
6507943
Compare
6507943 to
d4b59ce
Compare
|
Checked on the PR merged onto main: AgcDriver-scoped build and ctest pass ( |
* perf(agc): fast-skip pure PM4 NOP packets during queue execution (cherry picked from commit 139bf04) Ported from upstream PR boykopovar#5481 * fix(agc): copy a shader, context or user config register to memory with COPY_DATA A dispatch now leaves its initiator and, for DISPATCH_DIRECT, its group counts in the shader registers, where the CP puts them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 5e36c08) Ported from upstream PR boykopovar#5477 * fix(agc): accept reported vertex stage state (cherry picked from commit 632331d) Ported from upstream PR boykopovar#4341 * fix(agc): initialize stencil control and reference masks (cherry picked from commit 85e0d98bba896002539365bb29a7a39a8e43f501) (cherry picked from commit 13dca48) Ported from upstream PR boykopovar#5347 * fix(agc): accept inactive vertex point size on non-point draws (cherry picked from commit d4b59ce) Ported from upstream PR boykopovar#4715 * fix(agc): treat type-0 texture descriptors as null (cherry picked from commit 7e1e1ce) Ported from upstream PR boykopovar#4779 * fix(agc): fall back out-of-range sceAgcInit versions to table 13 Pointer-shaped NID kW3GLb7QfPg calls from public homebrew succeed on console; returning an error left those titles failing init after boykopovar#4835. (cherry picked from commit 939f784) Ported from upstream PR boykopovar#5163 (debt-doc hunk dropped: file absent on main) * fix(agc): clamp sceAgcInit versions above 13 inline (cherry picked from commit 0cc5102) Ported from upstream PR boykopovar#5163 (second commit) * metal: adapt the shared AGC driver slice to the Metal execution loop - skip pure PM4 NOP packets in the Metal packet loop (upstream PR boykopovar#5481) - note the dispatch registers after direct and indirect Metal dispatch so COPY_DATA from a shader register works there (upstream PR boykopovar#5477) - NullImageDescriptor delegates to IsNullTextureResource (upstream PR boykopovar#4779) - tests: pm4 compute replay reads the dispatch initiator and group counts back through COPY_DATA; metal utility tests cover a type-0 image descriptor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj --------- Co-authored-by: Kikoarl <7354010+Kikoarl@users.noreply.github.com> Co-authored-by: LeandroLP23 <leandroplacidi@gmail.com> Co-authored-by: MarcZX100 <marczxrr@gmail.com> Co-authored-by: MathiasDevelopes <25400788+MathiasDevelopes@users.noreply.github.com> Co-authored-by: lorkydey <57268822+Lorkydey@users.noreply.github.com> Co-authored-by: mazen <mazenshaar@hotmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
|
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.
|
What
XashPS5 (PPSA19111, v1.3 / content version 01.030.000; bring-up #4711) reaches presentation on main 1acfa7f and 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 6d5ee52, 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 fix(agc): render all attachment layers with dynamic rendering #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 fix