feat(libSceGnmDriverForNeoMode): write the draw, dispatch, compute wait and VGT control packets #9208
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9208"
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 YossiYad on 2026-10-21T15:17:12Z.
What
17 libSceGnmDriverForNeoMode command writers threw. They now write the PM4 packets shadPS4's gnmdriver.cpp writes, with its signatures, size checks and -1 refusals:
sceGnmDrawIndexAuto,sceGnmDrawIndex,sceGnmDrawIndexOffset, andsceGnmInsertDingDongMarkersceGnmDispatchDirect,sceGnmDispatchIndirect,sceGnmDispatchIndirectOnMecsceGnmDrawIndirect,sceGnmDrawIndexIndirect, both*Multiand both*CountMultiformssceGnmComputeWaitSemaphore,sceGnmComputeWaitOnAddresssceGnmSetVgtControlandsceGnmResetVgtControlThis module is the Neo-mode driver, so the writers take shadPS4's Neo-mode branch:
IA_MULTI_VGT_PARAMthroughSET_UCONFIG_REG, since shadPS4'sUseNeoCompatSequencesis false.WriteNopdoes.The packets are not compared with console output, and nothing in AnyPS5 consumes a GNM command buffer yet; the debt entry says both. The pending count drops from 65 to 48.
Tested
Linux (Fedora 44, GCC, Ninja,
-DBUILD_TESTING=ON), based onmaincecb540a63:guest_gnm_neo_packets(core/libs/tests/GuestGnmNeoPackets.cpp) fills a buffer with a marker, calls each writer and compares every word, including the words that must stay untouched. It also checks each refusal leaves the buffer untouched. It aborts onmain. Twelve mutations each make it fail: the predicate bit, the NOP first word, the LS SGPR base, the dispatch ordered-append bit, the count-address enable bit, the VGT reset value, the uconfig bits, the wait compare mask, the odd index address check, the indexed indirect stage check, the semaphore wait bits and the wait poll interval.ctest: 1794 of 1802 pass. The 8 failures fail the same way onmainon this machine and do not link this library:application_heap_scripting,application_heap_lazy,agc_driver_guest_memory_lifetime,agc_driver_image_array_window_past_layer_limit,agc_driver_tessellationand the threenet_dontwait_blocking_*cases.tools/progress.py --compare: libraries +0.16%, 17 functions implemented, none lost.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pyonly findscore/libs/CMakeLists.txtshared with other PRs. #9212 and #9221 (mine) edit the same Export.cpp and debt file for other functions of this module; whichever merges later needs a rebase of the pending count.Checklist
main; no other open PR implements the same functionsNotImplemented_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 YossiYad on 2026-10-22T12:58:40Z.
Rebased onto
main8b3a6ba88after #9201 (head9254aafe8). This PR's helpers now share one anonymous namespace with #9201's error constants, and the pending count is 53, which matches the throwing exports left inExport.cpp.guest_gnm_neo_packetsand #9201'sguest_gnm_neo_retailpass 3 of 3.