feat(libSceGnmDriver): export the 19 remaining NeoMode-only imports #18558

Merged
Ethan-Hainline merged 1 commit from upstream-pr/18558 into main 2026-11-13 05:42:32 +00:00
Ethan-Hainline commented 2026-11-11 21:42:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ethan-Hainline on 2026-11-11T21:42:06Z.


What

inFAMOUS Second Son (CUSA00223 01.07) imports 85 functions from libSceGnmDriver; 47 of them are exported only by libSceGnmDriverForNeoMode, which the title does not load (#17581). Eight open PRs (#17711, #18251, #18235, #18212, #17942, #18216, #18217, #18209) add 28 of the 47 to libSceGnmDriver. This PR adds the remaining 19:

  • sceGnmSetEmbeddedPsShader and sceGnmSetEmbeddedVsShader — the real embedded-shader producers, reusing GnmNeo::BlackPs, GnmNeo::DepthOnlyPs and GnmNeo::FullscreenVs from libSceGnmDriverForNeoMode/include/EmbeddedShaders.hpp.
  • 17 imports that are documented throwing stubs in libSceGnmDriverForNeoMode: sceGnmDestroyWorkloadStream, sceGnmDingDongForWorkload, sceGnmDrawIndexMultiInstanced, sceGnmDrawOpaqueAuto, sceGnmGetGpuBlockStatus, sceGnmGetGpuInfoStatus, sceGnmGetLastWaitedAddress, sceGnmGetNumTcaUnits, sceGnmGetProtectionFaultTimeStamp, sceGnmGetShaderProgramBaseAddress, sceGnmGetShaderStatus, sceGnmInsertThreadTraceMarker, sceGnmMapComputeQueueWithPriority, sceGnmRequestFlipAndSubmitDoneForWorkload, sceGnmSetWaveLimitMultipliers, sceGnmSubmitAndFlipCommandBuffersForWorkload and sceGnmSubmitCommandBuffersForWorkload.

Both libraries now export the same NIDs, so the new declarations use the repository's _nid_disambig1 suffix. The NID patcher strips it before hashing: tools/nid_names.compute_nid on each base name matches the NID in #17581's table (for example sceGnmSetEmbeddedPsShader → X9Omw9dwv5M, sceGnmSetEmbeddedVsShader → +AFvOEXrKJk, sceGnmSubmitCommandBuffersForWorkload → jRcI8VcgTz4).

The 17 stubs are recorded in docs/dev/debt/libSceGnmDriver.md. They resolve the imports so the title can load; calling one still throws until its console behavior is measured.

Tested

Windows 11 Pro 10.0.26300, Ryzen 5 7530U, WinLibs GCC 16.2.0 UCRT, Release, BUILD_TESTING=ON:

  • guest_gnm_driver — 3/3 passed, including new checks for both embedded shaders (packet shape, shader-id refusal and null-buffer refusal).
  • public_headers — passed (the _nid_disambig1 declarations keep one declaration per export name).
  • nid_patcher --write-export-list on the built libSceGnmDriver.prx lists all 19 new names.
  • python tools/check_conventions.py --base upstream/main and git diff --check pass.

Not tested: the title itself (no CUSA00223 dump here), and the 17 stubs have no behavior beyond resolving the imports.

Checklist

  • Based on current main; one topic per PR
  • Depends on: none
  • Unblocks: #17581 (together with the 28 imports in the open PRs above)
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5267175336 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18558). Originally posted by [Ethan-Hainline](https://github.com/Ethan-Hainline) on 2026-11-11T21:42:06Z. --- ### What `inFAMOUS Second Son` (CUSA00223 01.07) imports 85 functions from `libSceGnmDriver`; 47 of them are exported only by `libSceGnmDriverForNeoMode`, which the title does not load (#17581). Eight open PRs (#17711, #18251, #18235, #18212, #17942, #18216, #18217, #18209) add 28 of the 47 to `libSceGnmDriver`. This PR adds the remaining 19: - `sceGnmSetEmbeddedPsShader` and `sceGnmSetEmbeddedVsShader` — the real embedded-shader producers, reusing `GnmNeo::BlackPs`, `GnmNeo::DepthOnlyPs` and `GnmNeo::FullscreenVs` from `libSceGnmDriverForNeoMode/include/EmbeddedShaders.hpp`. - 17 imports that are documented throwing stubs in `libSceGnmDriverForNeoMode`: `sceGnmDestroyWorkloadStream`, `sceGnmDingDongForWorkload`, `sceGnmDrawIndexMultiInstanced`, `sceGnmDrawOpaqueAuto`, `sceGnmGetGpuBlockStatus`, `sceGnmGetGpuInfoStatus`, `sceGnmGetLastWaitedAddress`, `sceGnmGetNumTcaUnits`, `sceGnmGetProtectionFaultTimeStamp`, `sceGnmGetShaderProgramBaseAddress`, `sceGnmGetShaderStatus`, `sceGnmInsertThreadTraceMarker`, `sceGnmMapComputeQueueWithPriority`, `sceGnmRequestFlipAndSubmitDoneForWorkload`, `sceGnmSetWaveLimitMultipliers`, `sceGnmSubmitAndFlipCommandBuffersForWorkload` and `sceGnmSubmitCommandBuffersForWorkload`. Both libraries now export the same NIDs, so the new declarations use the repository's `_nid_disambig1` suffix. The NID patcher strips it before hashing: `tools/nid_names.compute_nid` on each base name matches the NID in #17581's table (for example `sceGnmSetEmbeddedPsShader` → `X9Omw9dwv5M`, `sceGnmSetEmbeddedVsShader` → `+AFvOEXrKJk`, `sceGnmSubmitCommandBuffersForWorkload` → `jRcI8VcgTz4`). The 17 stubs are recorded in `docs/dev/debt/libSceGnmDriver.md`. They resolve the imports so the title can load; calling one still throws until its console behavior is measured. ### Tested Windows 11 Pro 10.0.26300, Ryzen 5 7530U, WinLibs GCC 16.2.0 UCRT, Release, `BUILD_TESTING=ON`: - `guest_gnm_driver` — **3/3 passed**, including new checks for both embedded shaders (packet shape, shader-id refusal and null-buffer refusal). - `public_headers` — **passed** (the `_nid_disambig1` declarations keep one declaration per export name). - `nid_patcher --write-export-list` on the built `libSceGnmDriver.prx` lists all 19 new names. - `python tools/check_conventions.py --base upstream/main` and `git diff --check` pass. Not tested: the title itself (no CUSA00223 dump here), and the 17 stubs have no behavior beyond resolving the imports. ### Checklist - [x] Based on current `main`; one topic per PR - [x] Depends on: none - [x] Unblocks: #17581 (together with the 28 imports in the open PRs above) - [x] GPUs tested: n/a - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18558
No description provided.