fix(recompiler): read P10 of a flat input as the provoking vertex #4030
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4030"
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 AlxcBTW on 2026-10-11T21:35:57Z.
What
Fixes the stop
last provoking vertex with explicit per-vertex flat interpolation is unsupportedfor the case ps5-opengl titles hit (#3581, #1413). A FLAT_SHADE input without pass-through that a pixel shader reads throughv_interp_mov_f32P10 became an explicit per-vertex input and read vertex 1 minus vertex 0. With the last provoking vertex the pipeline then threw.ps5-opengl reads every flat input through P10 when GL's last-vertex convention is in effect, and its driver passes the GL 4.6 CTS on a PS5 (#1413).
FragmentParameterrecords it (flatP10) and a pipeline using the first provoking vertex throws.PA_SU_SC_MODE_CNTL.PROVOKING_VTX_LASTentry describes this.Titles that stop there on
mainand get past it with this change:sceAudioOutSysGetHdmiMonitorInfo, which is #2887.maina11c8f7f.maina11c8f7f+ #3606; without the change it aborts with the guard, with c18298c3 it renders (comment).The open question on #1413 stays: CouchRiv measured 0 on gfx1036. This change follows the PS5-side evidence for exactly this case and keeps the other cases as throws.
Tested
Windows 11 (26200), WinLibs GCC 15.2.0, Release, rebased onto
maina11c8f7f7:agc_driver_graphics(ProvokingVertexTests): a flat P10 input compiles to a flat, non-per-vertex input recorded asflatP10and apart from P0; it validates with the last provoking vertex and is rejected with the first.ctest -E "^agc_driver|^video_out|^guest_video"): 527/530 pass. The three failures,guest_kernel_sys,guest_filesystem(access denied on a created file) andwindows_exceptions, fail the same way (0xc0000409) on unrelated trees there;windows_exceptionsalso fails onmain(CI).agc_driver_graphics,agc_driver_draw_cache_reuseandagc_driver_draw_cache_reuse_off: 3/3 pass.tools/check_conventions.py --base origin/mainpasses.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 Kikoarl on 2026-10-11T21:52:26Z.
Tested on Linux (CachyOS x86_64, GCC) with an NVIDIA GeForce RTX 5060 Ti (driver 615.78.08, Vulkan 1.4):
agc_driver_graphics(including the newProvokingVertexTestschecks): PASSED (3.53s).agc_driver_draw_cache_reuse&agc_driver_draw_cache_reuse_off: PASSED (0.35s & 0.28s).tools/check_conventions.pypasses clean.Confirms correct behavior and tests passing on desktop Linux + NVIDIA. LGTM!
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T03:06:49Z.
Passed our title check together with the other queued PRs. It conflicts with main in
docs/dev/TechnicalDebt.mdonly (thePROVOKING_VTX_LASTline next to main's newv_rcp, v_rsqline); please rebase so the full build can run, then it can go in.Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-12T03:09:54Z.
@oneandonlydean thanks. I merged current
main(f0674d3c0) into the branch asa7ed14c74rather than force-pushing. The only conflict was thedocs/dev/TechnicalDebt.mdpair: I kept this PR'sPROVOKING_VTX_LASTentry andmain's updatedv_rcp, v_rsq, …entry unchanged. The diff againstmainis the same 7 files as before, andcheck_conventions.pypasses. If you'd rather have a linear rebase, say so.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by orishamir on 2026-10-12T11:22:29Z.
Windows run of this head on current
main, with one more title that stops here: Forwarder Manager (PPSA99930).main3d8ffeb2againstmain+a7ed14c7(clean merge). Windows 11, RTX 4080 (driver 616.56), WinLibs GCC 15.2.0 r7, Release, catalog builds witheboot.binandsce_module/libc.prxunwrapped, 45 s each. Both arms use the same relinker and libraries exceptlibSceAgcDriver.prx. Screens are from frames saved withAPS5_DUMP_FRAMES.mainlstat /data, errno 2)With #3512 and #3493 merged, all six now stop here on plain
main. ProsperoTV (PPSA99003) is not in the table: onmainit still stops earlier atpoll: descriptor 3 is not a socket(#3521).AI-assisted: yes (Claude Code Opus 5.5 xhigh)
Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-12T11:23:30Z.
@orishamir thank you, that's a clean A/B: six titles that stop at this exact line on current
mainand run with the PR, and the merge withmain3d8ffeb2is still clean. Good to know the earlier stops (#3512, #3493) are out of the way, so this line is now the common blocker for all of them.AI-assisted: yes (Claude Code)