fix(agc): draw the complete rectangles of a rect-list draw with a partial last one #3835
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3835"
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 queeeef on 2026-10-11T17:28:44Z.
What
Fixes #3832.
A rect-list draw whose vertex or index count is not a multiple of 3 threw
incomplete rect-list primitiveinprepareDrawInputs. Palworld (PPSA23126) issues a direct draw of 4 vertices × 9 instances as a rect list when character creation opens, and terminates on it.Rect lists are recorded as
VK_PRIMITIVE_TOPOLOGY_PATCH_LISTwith 3 control points, and Vulkan generates ⌊vertexCount/3⌋ patches. The check is removed, so the complete rectangles are drawn and the trailing 1 or 2 vertices form no rectangle. All three draw forms reach this rule:vkCmdDrawwith the count;vkCmdDrawIndexedon the same patch list;ClassifyIndirectDrawsends every rect-list indirect draw to the CPU path (NonVertexPath), and each record becomes a direct draw through the sameprepareDrawInputs.What the console rasterizes for the incomplete rectangle is not measured: the hardware oracle runs compute kernels only, and I have no AMD GPU. That is recorded in TechnicalDebt.
The existing test that expected the throw now checks that 4- and 5-vertex rect-list draws, non-indexed and indexed, take the same path as a 3-vertex one.
Tested
Windows 11 Pro 26300, i5-13600K, RTX 2080 Ti (NVIDIA 610.74), MinGW-w64 GCC 15.2.0 (WinLibs r7). Configured like the Windows CI job (
-G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON, without ccache), at78030304:check_test_registration.py: 637 test executables, none unregistered.cmake --build buildand--target libssucceed.ctest --output-on-failure --timeout 120 --parallel 4: 836 tests, 827 passed, 5 skipped (all expected percheck_skips.py --job windows), 4 failed. None took over 30 s.maina11c8f7f7in the same build directory, so they are local to this machine, not this change:guest_kernel_sys(symlink: Function not implemented) andguest_filesystem(line 286, Win32 error 5): this account cannot create symbolic links;windows_exceptions: #3411;agc_driver_emulated_color_compare:samples or gathers an sRGB image the device cannot sampleon this NVIDIA device.agc_driver_graphicspasses. With the removed check restored, it fails on the non-indexed case, and also on the indexed case run alone.tools/check_conventions.py --base upstream/mainandgit diff --checkpass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:09:01Z.
Checked on Linux (build + ctest of libSceAgcDriver, 384 tests green;
agc_driver_graphicsfails with the check restored). The unmeasured console behaviour for the incomplete rectangle is recorded in TechnicalDebt. Merging.