Repository navigation
Description
Palworld (PPSA23126, 01.102.999): a rect-list draw of 4 vertices aborts with incomplete rect-list primitive
When character creation opens (after "Finish setting up world and start the game? → Yes"), presentation fails and the title terminates:
[videoout] presentation failed: AGC graphics: incomplete rect-list primitive
terminate called after throwing an instance of 'std::runtime_error'
The check is Draw.cpp prepareDrawInputs: if (state.rectList) Require(draw.indexCount % 3 == 0, "incomplete rect-list primitive");.
The draw (local diagnostic that prints the parameters before the throw, 917fd308):
count 4 indexed 0 indexSize 0 indexAddress 0x0 instances 9 firstVertex 0 firstInstance 0 flags 0x0 color 1 0x3031e40000 2048x2048 render 2048x2048
A direct, non-indexed draw of 4 vertices × 9 instances (10 instances on another run), rect-list topology, into a 2048x2048 color target.
What the host already does without the check. Rect lists are recorded as VK_PRIMITIVE_TOPOLOGY_PATCH_LIST with 3 control points, and Vulkan generates ⌊vertexCount/3⌋ patches, so the trailing vertex forms no rectangle. The three draw forms reach the same rule:
- direct non-indexed:
vkCmdDrawwith the count; - direct indexed:
vkCmdDrawIndexedon the same patch list, ⌊indexCount/3⌋ patches; - indirect:
ClassifyIndirectDrawsends every rect-list indirect draw to the CPU path (NonVertexPath); each record becomes a directPm4::DrawParametersand goes through the sameprepareDrawInputscheck.
Hardware. Not measured. The hardware oracle (tools/hw-oracle) runs compute kernels on Linux with an AMD GPU, so it cannot observe primitive assembly, and I have no AMD GPU here. I found no public statement for gfx10 rect lists. A retail title issuing this draw shows that the console accepts it; it does not show what the console rasterizes for the leftover vertex.
Local check: dropping the vertices past the last complete rectangle gets the title past this point: character creation renders and the title runs on to a later, unrelated stop (reported in #2648).
Fix: #3835.
Setup
- Windows 11 Pro 26300, RTX 2080 Ti (NVIDIA 610.74), i5-13600K
- MinGW-w64 GCC 15.2.0 (WinLibs r7), RelWithDebInfo
maina11c8f7f7plus the open PRs Palworld needs to get this far:palworld/integration(libkernel: kqueue, kevent and the file-event calls are absent (Cloudberry Kingdom, Palworld); implementation ready #3461 branch, fix(shader): prove masked writes through guarded first-lane reads #3739, fix(agc): render a color view of several array slices into its first slice #3633, feat(agc): render layered draws into 3D color targets #1077, fix(graphics): allow storage textures in reused depth memory #2904, feat(agc): depth planes sampled as 2D arrays, cubes and integer views #425, fix(recompiler): give wave64 vertex programs on 32-lane hosts a 32-lane s3 #3546 and local workarounds listed in Palworld (PPSA23126): next start-up stop is unresolved import oiOi7vgPfAY (sceAudioOut2EnableChat) #2648)- Relinked with
--windows --to-intel --registry
No game files are shared, only log lines and draw parameters. AI-assisted (Claude Code).
Activity
fix(agc): draw the complete rectangles of a rect-list draw with a par…