Slay the Princess (PPSA24423) on Windows: AGC draw aborts with "vertex buffer aliases the render target" #4369
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 xXPBSXx on 2026-10-12T07:54:15Z.
Slay the Princess (PPSA24423, from the owner's own dump), Windows 10, MinGW GCC, NVIDIA RTX 4080 SUPER.
Observed: on current
mainplus the fcntl/ioctl change of #3840 (merged locally ontod06c06565, clean merge), the title runs about 70 s and aborts withThe throw is
Require(!state.hasColorTarget || address + bytes <= state.color.address || state.color.address + state.color.bytes <= address, "vertex buffer aliases the render target")incore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp(around line 1161): a draw whose vertex buffer range overlaps the bound color target's range. The log before it shows storage-image texture creations for 1920x1080 targets (formats 56,vk=37); I did not look at which draw or buffer it is.Not established: which buffer and which target overlap, whether the vertex data is a render-to-vertex-buffer use or a stale color target binding, and whether the overlap is real on the console. One run only. Without #3840 the title stops earlier at
sceKernelFcntl: file descriptors are not implemented, fd=6(#3757). The import audit shows 0 absent imports (60 s run onmainceb342b94).AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T09:02:52Z.
Could you capture the failing draw’s vertex-buffer guest address and byte range, and the bound color target’s guest address and byte range (including format and extent)? The overlap check only reports that the ranges intersect; those values would distinguish a real alias from stale target state or a range-calculation issue. If available, please include the draw/shader identifier and a trace or minimal replay, and confirm whether it still reproduces on current main with the required fcntl change.
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T09:15:30Z.
Slay the Princess (PPSA24423) on
main375e99ec3+ #3840 + #425, Windows, with a temporary local diagnostic inDraw.cpp(prints, not committed). The check is not too strict in the sense that the overlap is real in the numbers it sees, but the numbers come from garbage index data, and the title stops there in every run (4 of 4 runs here; two of them hit the buffer allocation below before the alias check printed anything).The draw that throws, from the diagnostic:
0x39a418000. All six hold0xff000000(bytes00 00 00 ff), which is not a plausible index list for a vertex buffer with 4 records (a quad would be something like 0,1,2,2,1,3); it looks like opaque-black RGBA pixels, or a value the CPU or GPU had not written yet.VertexBufferReadSizetakes the highest index (0xff000000) times stride 8 and gets a range of0x7f8000008bytes (about 32 GiB), which spans the 1080p color target and is whatDraw.cpp~1161 rejects asvertex buffer aliases the render target. When that check does not fire first, the same range ends invkAllocateMemory buffer: allocation=34225520656(that is0x7f8000010, same size) failing withVK_ERROR_OUT_OF_DEVICE_MEMORY.So the question is why the index memory does not hold the indices: whether the title writes the indices after this draw is recorded (a CPU write our snapshot misses or a GPU write whose result is not in guest memory yet, as in #1787), or an earlier GPU or DMA operation of the title overwrites that memory with the black pixel pattern (for example a clear or fill reaching the wrong address). I have not determined which; I looked at neither the packets before this draw nor who writes
0x39a418000.Sources: this is about the code and the numbers above, not about Vulkan or console semantics. Vulkan feedback-loop rules (a vertex buffer in the same memory as an attachment) are not what triggers here, because the vertex data is copied or imported as a separate buffer. A tolerant treatment (clamping the vertex range to the descriptor's
num_records * stride) is possible for out-of-range indices on the console (OOB_SELECTreturns zero for fetches beyondnum_records, per the V# fields ourVertexBufferReadSizealready reads), but it would hide the real problem here, which is the wrong index data; I would not do that without knowing what the title expects.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T11:08:18Z.
Follow-up on Slay the Princess (PPSA24423) with more local diagnostics (temporary prints, not committed),
maine7c70a2df+ #4408 + #3840, Windows; the numbers change what I wrote above.DRAW_INDEXpackets (opcode0x27,indexType32-bit, count 6) that carry their own index address, one buffer per quad. In one 150 s run the diagnostic printed 1,923 such draws and every one reads00000000 00000001 00000002 00000002 00000003 00000000(a quad); the run ended on the time limit without a stop. In three other runs the abort comes at a draw of the same shape whose six indices all read0xff000000, at a different address each time (0x39a418000,0x38a22c000,0x394bf8000). So the abort needs one draw in a few thousand to see garbage in its index buffer.DMA_DATA, no HLE dword fill (fillBuffer) and no copy kernel targeted that page (I printed the destination of every one: zero lines). So the bytes are not written by a command in this stream; either the CPU writes them and we read before that write is visible, or the memory was remapped or reused between the title's write and our read.import=1), so the read is a direct view of guest memory at record time.That points to ordering between the title's CPU writes and the moment the driver reads the buffer (or to a remap of the page), not to the
aliases the render targetcheck; #4408's change to that check does not help here, as I wrote there. I have not found what makes the page read0xff000000(opaque black RGBA).AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T12:18:15Z.
Possible lead for the intermittent garbage index data: with #1359 ("order direct reads after copied writes", clean merge on
mainffa198407) Slay the Princess ran 3 of 3 runs of 150 s without the abort, where it aborted in 3 of 4 earlier runs without it (details and caveats on #1359: no same-day control run on identicalmain, so not proven). If that holds, the index bytes are read before an earlier copied writeback or completion has landed.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T12:32:44Z.
Correction to my comment above about #1359: the control run (plain
mainffa198407, same title, 3 x 150 s) did not abort either, so the 0-of-3 with #1359 is no evidence for it. The abort was seen only on an older tree (maine7c70a2df+ #4408 + #3840 + my diagnostic prints); onmainffa198407it does not reproduce in 3 runs. Whether a change onmainbetween the two fixed it, or the diagnostic prints or chance hid it, I do not know.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T02:09:02Z.
Per your control run this does not reproduce on main
ffa198407. If three more runs on current main are clean, please close it; reopen with the index bytes of the failing draw if it comes back.Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-13T08:50:27Z.
@xXPBSXx following up on your Slay the Princess results: have you been able to complete the three additional 150-second runs on current
mainrequested above?Could you share the exact main commit, any additional patches or diagnostic prints, and whether the original alias error returned? If it reproduces, the failing draw's index bytes and vertex/target ranges would help confirm whether it is still the same intermittent index-data problem.
#4408 is now ready for review at
44623222c. Its copied/imported regressions pass, and both fail when only main's Draw.cpp is restored, confirming the separate skipped-prefix false positive. Your earlier firstVertex-0 draw with0xff000000indices does not match that case, so we are not claiming this PR fixes #4369.Does that distinction still match your latest findings, or have you found a draw where the skipped prefix is involved? If the additional main runs are clean, please update this issue with the results as the maintainer requested.
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T10:53:13Z.
Three clean runs on current main, as requested.
43349d4337543eca207772b065f10ab19acc24c9(fetched 2026-10-14 11:23 local). No local patches or prints: the worktree was detached at that commit withgit status --porcelainempty.libstarget plus the relinker from that same commit (Release, 128 prx); the title ELF was relinked with that relinker (relink_title.ps1 ... -ModuleDir @() -Suffix J, exit 0).run_113324.err, 489 linesrun_113558.err, 486 linesrun_124632.err, 486 linesIn all three the log has 0 occurrences of
vertex buffer aliases, 0what()and 0FATAL. An earlier 300 s run one46c69505(run_105149.err) also ended without a stop.So the alias error did not return in 3 of 3 runs here; I cannot say what changed it. Regarding #4408: I have not found a draw in which a skipped prefix is involved, and I did not test #4408 on this title, so I make no claim about it either way.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T10:53:15Z.
Closing as suggested above: three clean runs on current main (see previous comment); I will reopen with the index bytes of the failing draw if it comes back.