feat(libSceGnmDriver): add regular retail queries #18216

Merged
DonRyuzaki merged 1 commit from upstream-pr/18216 into main 2026-11-13 06:21:19 +00:00
DonRyuzaki commented 2026-11-10 21:36:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DonRyuzaki on 2026-11-10T21:36:50Z.


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 31de9178c556548270113494b010e5c9bf2cf84a based on upstream 41b9e25ddc. 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

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: CUSA00223 #17581 (these two imports only)
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5249328967 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18216). Originally posted by [DonRyuzaki](https://github.com/DonRyuzaki) on 2026-11-10T21:36:50Z. --- ### What inFAMOUS Second Son's [regular GNM import report #17581](https://github.com/boykopovar/AnyPS5/issues/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](https://github.com/shadps4-emu/shadPS4/blob/a808e7626e3c7de8d0f0fda6a91f620b42f6c762/src/core/libraries/gnmdriver/gnmdriver.cpp) 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 31de9178c556548270113494b010e5c9bf2cf84a based on upstream 41b9e25ddc2b29c1b2fffb4df7aaf495a8867fe0. 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](https://github.com/boykopovar/AnyPS5/actions/runs/42912629042/job/130166982935) passed on this head; hosted Linux and specialized PR jobs were skipped. ### Checklist - [x] Based on current main; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation .md files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: CUSA00223 #17581 (these two imports only) - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-12 21:05:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T21:05:01Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5881995260 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18216#pullrequestreview-5881995260). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T21:05:01Z. **Review:** COMMENTED --- # 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.
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!18216
No description provided.