feat(libSceGnmDriverForNeoMode): write the shader register packets and answer the workload and clock queries #9212
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9212"
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:21:53Z.
What
12 libSceGnmDriverForNeoMode exports threw. They now follow shadPS4's gnmdriver.cpp, with its signatures, size checks and -1 refusals:
sceGnmUpdateVsShader,sceGnmUpdatePsShader,sceGnmUpdatePsShader350,sceGnmSetPsShader350,sceGnmUpdateGsShader,sceGnmUpdateHsShaderandsceGnmSetCsShaderWithModifierwrite theirSET_SH_REGandSET_CONTEXT_REGpackets. The update forms carry the context registers inside NOP packets, as in shadPS4. A null PS register block writes the packets that disable the pixel shader.sceGnmCreateWorkloadStream,sceGnmBeginWorkloadandsceGnmEndWorkloadreturn shadPS4's values and keep no state:sceGnmGetGpuCoreClockFrequencyreturns 911 MHz, shadPS4's Neo-mode value (this module is the Neo-mode driver).sceGnmGetOffChipTessellationBufferSizereturns0x800000.Not compared with console output, and nothing in AnyPS5 consumes a GNM command buffer yet; the debt entries say both. The pending count drops from 65 to 53.
Tested
Linux (Fedora 44, GCC, Ninja,
-DBUILD_TESTING=ON), based onmaincecb540a63:guest_gnm_neo_shaders(core/libs/tests/GuestGnmNeoShaders.cpp) fills a buffer with a marker and compares every word each writer produces, including the words past the packet. It also checks that each refusal leaves the buffer untouched, and it checks the workload and query values. 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.11%, 12 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 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 YossiYad on 2026-10-22T12:58:41Z.
Rebased onto
main8b3a6ba88after #9201 (head5440da77d). This PR's helpers now share one anonymous namespace with #9201's error constants, and the pending count is 58, which matches the throwing exports left inExport.cpp.guest_gnm_neo_shadersand #9201'sguest_gnm_neo_retailpass 3 of 3.