feat(libSceGnmDriverForNeoMode): write the Neo default hardware and context state #9219
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9219"
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:29:34Z.
What
Five libSceGnmDriverForNeoMode default-state writers threw. They now write the sequences from shadPS4's gnmdriver_init.h, with the size checks and returned sizes of gnmdriver.cpp:
sceGnmDrawInitDefaultHardwareState,...200and...350return 0 below 0x100 words. Otherwise each writes the clear-state preamble, its register sequence and a NOP that pads to 0x100 words, then returns 0x100.sceGnmDrawInitToDefaultContextState(0x20 words) and...400(0x100 words) write their sequence only when the size matches exactly, and return 0 otherwise.This module is the Neo-mode driver, so the 200, 350 and context sequences are shadPS4's Neo ones. Those end by resetting
IA_MULTI_VGT_PARAMthroughSET_UCONFIG_REG, the same packetsceGnmResetVgtControlwrites in Neo mode. The plain hardware state is the one sequence shadPS4 also writes unchanged in Neo mode.The tables live in
include/InitSequences.hppwith shadPS4's SPDX header, aslibSceFont/include/FontDriver.hppdoes for its ported code. 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 70 to 65.sceGnmDrawInitToDefaultContextStateInternalCommandand...InternalSizestay unimplemented. They choose by the title's compiled SDK version, andsceKernelGetCompiledSdkVersionstill throws in AnyPS5.Tested
Linux (Fedora 44, GCC, Ninja,
-DBUILD_TESTING=ON), based onmaincecb540a63:guest_gnm_neo_default_state(core/libs/tests/GuestGnmNeoDefaultState.cpp) fills a buffer with a marker. For each writer it checks the refusal sizes leave the buffer untouched, and that the return value is right. It also checks the preamble, the first and last packets of the sequence, the padding NOP and every untouched word, including past 0x100. It aborts onmain.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.05%, 5 functions implemented, none lost.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pyfindscore/libs/CMakeLists.txtshared with other PRs. It also finds my #9208, #9212 and #9221, which implement other functions of this module in the same Export.cpp and debt file; 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 github-actions[bot] on 2026-10-21T15:30:27Z.
Progress report (
3ca07d0→f6d5447)📈 System libraries: 43.28% (+0.05%, +5 implemented functions)
✅ 5 implemented
sceGnmDrawInitDefaultHardwareStatesceGnmDrawInitDefaultHardwareState200sceGnmDrawInitDefaultHardwareState350sceGnmDrawInitToDefaultContextStatesceGnmDrawInitToDefaultContextState400Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-22T12:58:42Z.
Rebased onto
main8b3a6ba88after #9201 (headf6d5447d5). This PR's helpers now share one anonymous namespace with #9201's error constants, and the pending count is 65, which matches the throwing exports left inExport.cpp.guest_gnm_neo_default_stateand #9201'sguest_gnm_neo_retailpass 3 of 3.