Skip to content

feat(libSceGnmDriver): add regular retail queries - #18216

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
DonRyuzaki:feat/gnm-regular-retail-queries
Nov 13, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
DonRyuzaki:feat/gnm-regular-retail-queries

Conversation

@DonRyuzaki

@DonRyuzaki DonRyuzaki commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What

inFAMOUS Second Son's regular GNM import report #17581 includes sceGnmGetOffChipTessellationBufferSize (FFVZcCu3zWU) and sceGnmDriverTraceInProgress (R6z1xM3pW-w). They exist in libSceGnmDriverForNeoMode.prx, but the title imports libSceGnmDriver.prx, which lacks them. This exports both zero-argument queries from the regular provider with their original guest NIDs.

The off-chip query returns 0x800000 (8 MiB), and retail trace status returns false. Both values match the pinned shadPS4 implementation and AnyPS5's existing Neo provider. No console measurement is available; the remaining uncertainty is recorded in docs/dev/debt/libSceGnmDriver.md. This is two import fixes, not a claim that the title loads or renders.

I compared actual open patches in #16882, #17711, #17942, #6977, #17396 and our #18209; none adds these exact regular exports. #16882 shares the regular GNM source file but changes different queries.

Tested

  • Candidate head 31de917 based on upstream 41b9e25. WSL2 Ubuntu 24.04, GCC 13.3, CMake Release, BUILD_TESTING=ON, two below-normal compiler jobs.
  • Negative control: copied only the new declarations and focused assertions onto unchanged upstream source. guest_gnm_driver_tests compiled but failed at link on undefined references to both new regular-provider functions.
  • Candidate: the full libs and guest_gnm_driver_tests targets built, including patched libSceGnmDriver.prx. Its SHA-256 is beb9224b1ff3a55385b2e977ac738642469750c26cdc58b3d8f3532253e6bef2.
  • guest_gnm_driver and public_headers each passed three consecutive CTest runs, no skips. Dynamic lookup and calls through the patched regular PRX's exact NIDs returned 8388608 and false. All four tested source files matched this isolated branch byte-for-byte; the shared build source was restored to the clean upstream base afterward.
  • check_conventions.py, git diff --check, and git merge-tree --write-tree origin/main HEAD passed. pr_overlap.py could not run because gh is not installed; relevant open patches were compared manually.

No inFAMOUS dump, PS5 console, Windows runtime, GPU test or full CTest suite was used. The title import and Neo contract come from the linked report and pinned implementation; the independent evidence here is the failing baseline, full library build, focused tests and direct regular-PRX calls.

The prior exact tested head was 31de917; the feature patch has since been rebased without changes.

Rebased-head validation (November 10)

Current head 1d9667e19e86c6c047b21cdb0941d5929d54ccd9 is based on upstream 4306c608e2a552d5c96f11679332a222a4683ef9, including both worker-spin fixes. Full Linux libs and guest_gnm_driver_tests rebuilt successfully on the exact source with two below-normal compiler jobs. guest_gnm_driver and public_headers each passed three consecutive runs (6/6, no skips). All four changed files matched this rebased head byte-for-byte; the patched regular PRX SHA-256 was beb9224b1ff3a55385b2e977ac738642469750c26cdc58b3d8f3532253e6bef2. Dynamic NID calls were successful on the prior head and were not repeated on the rebase. The hosted Windows job passed on this head; hosted Linux and specialized PR jobs were skipped.

Checklist

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Progress report (1d13b55 → 1d9667e)

📈 System libraries: 36.43% (+0.01%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceGnmDriver sceGnmDriverTraceInProgress_nid_disambig1
libSceGnmDriver sceGnmGetOffChipTessellationBufferSize_nid_disambig1
⚪ 2 behaviourally empty (constant return or throw)
Library Name
libSceGnmDriver sceGnmDriverTraceInProgress_nid_disambig1
libSceGnmDriver sceGnmGetOffChipTessellationBufferSize_nid_disambig1

Changed libraries (implemented exports)

Library Before After Change
libSceGnmDriver 28/45 (62.22%) 30/47 (63.83%) +1.61%

@JJenkx

JJenkx commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 31de9178c5, merged onto main 4306c608e2 (a728ebe4a1, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • guest_gnm_driver passes in 3 of 3 runs, none skipped.

AI-assisted: yes.

@DonRyuzaki
DonRyuzaki force-pushed the feat/gnm-regular-retail-queries branch from 31de917 to 1d9667e Compare November 10, 2026 22:13
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 18235 sceGnmDriverTraceInProgress
sceGnmGetOffChipTessellationBufferSize

Exports with a name or library/NID already present in main:

  • sceGnmDriverTraceInProgress (also exported by another library in main: core/libs/prx/libSceGnmDriverForNeoMode; may be intentional)
  • sceGnmGetOffChipTessellationBufferSize (also exported by another library in main: core/libs/prx/libSceGnmDriverForNeoMode; may be intentional)

@gabichuuuuu

Copy link
Copy Markdown
Contributor

Windows check of head 1d9667e19e, merged onto main f57c971559 (clean merge, built together with other open PRs that touch different files).

Setup: Windows 11 x64, WinLibs GCC 15.2.0 (r7), Ninja, Release, BUILD_TESTING=ON, Python 3.15.

  • Tests built from this PR's test files: guest_gnm_driver.
  • All of them pass in 3 of 3 runs.
  • Negative control: with this PR's code reverted to main, the tests do not build (core/libs/tests/GuestGnmDriver.cpp:46:11: error: 'sceGnmGetOffChipTessellationBufferSize_nid_disambig1' was not declared in this scope), which is expected when the tests use interfaces the PR adds or changes.

AI-assisted: yes.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

Head 1d9667e19e86c6c047b21cdb0941d5929d54ccd9. Read the diff for the four changed files, then checked the head with the repository reader:

repo_read.py search TraceInProgress
repo_read.py search OffChipTessellation
repo_read.py search _nid_disambig
repo_read.py search FFVZcCu3zWU
repo_read.py search R6z1xM3pW-w
repo_read.py cat core/libs/prx/libSceGnmDriver/Export.cpp 495 520

No build or test was run here.

Results

Check Result Note
Diff read, four files passed Matches files.json
New names at head passed Present in Export.cpp, Api.hpp and the test
_nid_disambig1 naming passed Same pattern as libSceAjm exports
Build and CTest not run Author-reported only
Guest NIDs in repository not run Not present at head

Findings

Blocking

None.

Non-blocking

  • core/libs/tests/GuestGnmDriver.cpp:46 and :47 sit inside TestWriters, but the two checks test query functions, not writers. Moving them to a test for the regular queries would keep the test names accurate.

Sources

  • The shadPS4 comparison comes from the author's description, which links a808e76. I did not open that link.

Not verified

  • Build and CTest results on 1d9667e. The description reports them for the rebased head. I did not run them.
  • Whether the _nid_disambig1 names resolve to the guest NIDs FFVZcCu3zWU and R6z1xM3pW-w. Neither NID appears in the repository at head.
  • The claim that no open patch in #16882, #17711, #17942, #6977, #17396 or #18209 adds these exports.
  • Console behaviour. The 0x800000 size and the false trace status are unmeasured, as the description and the debt file say.
  • Files read: Export.cpp at head lines 495–520, and the diff hunks for Api.hpp, GuestGnmDriver.cpp and docs/dev/debt/libSceGnmDriver.md. The three files other than Export.cpp were not read in full at head.

To get this to a good state

Nothing is required.

@oneandonlydean
oneandonlydean merged commit 0d6edf0 into boykopovar:main Nov 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs prx unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants