fix(agc): support one-pixel vertex point lists #9412
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9412"
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 Antifrag on 2026-10-21T21:07:33Z.
What
Mafia: Definitive Edition (PPSA36458) aborts while entering its main menu with
AGC graphics: point-list vertex rendering requires point-size output support. Allow vertex-path point lists whenPA_SU_POINT_SIZErequests one-pixel points andPA_SU_POINT_MINMAXincludes that size. RequireVK_KHR_maintenance5, which defines a default point size of 1.0 when the shader does not write PointSize.This is an intentionally minimal alternative to #6639, which implements register and per-vertex point sizes. It also overlaps #6801 at the point-list checks. Please choose one approach; these are overlapping alternatives, not dependencies. This version adds no shader request fields, shader ABI changes or pipeline-journal format changes. Larger points, per-vertex sizes and point-sprite texture-coordinate replacement remain explicit failures, documented in technical debt. The draw register key includes the point size, limits and sprite-control registers so cached decoding cannot bypass those checks.
Add state-decoding coverage for supported sizes, unsupported sizes and limits, missing registers, sprite replacement and the device-feature guard. Extend the GPU polygon-mode test to draw a vertex point list and verify the exact three output pixels.
Tested
Windows 11, WinLibs MinGW-w64 GCC 15.2.0, Release. NVIDIA GeForce RTX 4070 Laptop GPU, NVIDIA driver 617.42.
Compared current main
0c6a5bd5938fde7bbc0bf720927c4584bd3e4700with this change6fb20a01fon the same machine and GPU. Both runs passed all three focused tests:agc_driver_graphics,agc_driver_polygon_mode_draw, andagc_driver_inactive_vertex_point_size.Both verbose logs confirm insertion of
VK_LAYER_KHRONOS_validation; neither containswas not found but was requested by env var VK_INSTANCE_LAYERS. Main: zeroVUID-errors. Change: zeroVUID-errors, so no new validation errors. The layer was loaded from a local LunarG SDK extraction viaVK_LAYER_PATH.Local title run: after dismissing the 2K connection-failure dialog, Mafia reaches the rendered main menu and stays running until the diagnostic run's 180-second time cap. The contributor subsequently confirmed starting a new game. Performance remains poor: the contributor reports approximately 9-14 FPS in the opening cinematic and 1.2 FPS in gameplay. These are unprofiled observations, not a benchmark or a speedup claim; this PR addresses the startup abort.
No matching Game bring-up discussion for PPSA36458 was found, so the formal Unblocks item below is
none.python tools/check_conventions.py --base origin/mainpasses. The overlap report confirms #6639 and #6801 and reports a draw-key overlap with #6977 and constructor-anchor conflicts with #8564, #9020 and #9335; some other PRs cannot be compared because they already conflict with main. These line overlaps are not dependencies.Checklist
main; no other open PR implements the same functions (explicit exception: this is a deliberately overlapping minimal alternative to #6639 and #6801, disclosed above)NotImplemented_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 wachi35676 on 2026-10-21T22:59:26Z.
Windows check of head
6fb20a01merged onto maina6dcea927(clean merge,87e6a93dd), adding an AMD run to the RTX 4070 run in the description.Host: Windows 11 (10.0.26300), Ryzen 5 9600X, WinLibs GCC 15.2.0, Release. GPUs: NVIDIA RTX 5070 Ti (617.42) and AMD Radeon RDNA2 iGPU
1002:13c0(proprietary 32.0.21042.62,ANYPS5_GPU=AMD).ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, no validation layer.agc_driver_graphics,agc_driver_polygon_mode_draw(with the new vertex point-list draw, exactly three corner pixels) andagc_driver_inactive_vertex_point_sizepass. The pipeline was accepted, so both devices reportmaintenance5, and with noPointSizewrite both drew 1-pixel points.image_array_window_past_layer_limitdoes not build under MinGW;agc_driver_tessellationfails on AMD).Graphics/to main.agc_driver_graphicsthen fails on both GPUs withpoint-list vertex rendering requires point-size output support.agc_driver_polygon_mode_drawstill passes on main. That test buildsStatedirectly and never goes throughDecodeState, so it covers rasterization of 1-pixel points but not the decode change. The decode change is covered only by the mock test.src/amd/registers/gfx10.json.PA_SU_POINT_SIZE0x28a00 (context 0x280) is HEIGHT[15:0]/WIDTH[31:16].PA_SU_POINT_MINMAX0x28a04 is MIN[15:0]/MAX[31:16].SPI_PS_INPUT_CNTL_nhas PT_SPRITE_TEX at bit 17 and PT_SPRITE_TEX_ATTR1 at bit 23.SPI_INTERP_CONTROL_0(0x1b5) has PNT_SPRITE_ENA at bit 1, andSPI_PS_IN_CONTROL(0x1b6) has NUM_INTERP[5:0]. The R6xx 3D register reference describes the size fields as "1/2 Height (Vertical Radius) of point; fixed (12.4)", so0x00080008is a 1-pixel point, as the PR assumes.tools/check_conventions.py --base a6dcea927passes.AI-assisted: yes (Claude Code); results above were run on this machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T05:08:23Z.
Review: CHANGES_REQUESTED
The report includes useful same-GPU validation and a clear one-pixel scope, but I found a path-classification issue that needs correction before this is ready. The guard below treats every non-mesh point-list pipeline as a vertex pipeline; the current shader-stage model also has geometry and tessellation paths. Please restrict this behavior to the vertex path (or implement and test the relevant downstream point-size behavior), with a regression that exercises a non-vertex point-list path.
The branch is based on
0c6a5bd5938fand is 423 commits behind currentmain(da54c652e30b); the checklist's current-main claim is stale. Please rebase, rerun conventions/overlap checks, and rerun the paired focused AGC validation against currentmainand this head. The existing Windows/NVIDIA test report is valuable, but it is on the older base.The overlap report also identifies direct alternatives #6639 and #6801 in the same point-list state logic. This PR acknowledges that they are alternatives, but the contribution rules require author coordination on which goes first and recording the resulting order in
Depends on. Please resolve that with the affected authors and refresh the overlap report after rebasing. I did not find a matching local AGC build or Vulkan device here, so I did not independently run the GPU tests. The hosted product jobs were skipped; policy checks passed.AI assistance was used to prepare this review.
Pull request closed