Skip to content

feat(libSceGnmDriver): export the workload, trace and tessellation si… - #18235

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
erickerxhalli:feat/gnm-workload-queries-gceywb
Nov 17, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
erickerxhalli:feat/gnm-workload-queries-gceywb

Conversation

@erickerxhalli

@erickerxhalli erickerxhalli commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds five exports to libSceGnmDriver that only libSceGnmDriverForNeoMode provided, so a title importing them from libSceGnmDriver stopped at load. They are 5 of the 47 imports listed in #17581 (inFAMOUS Second Son, CUSA00223, bring-up #8214); the issue stays open for the rest.

Function Export NID
sceGnmCreateWorkloadStream sceGnmCreateWorkloadStream_nid_disambig1 5udAm+6boVg
sceGnmBeginWorkload sceGnmBeginWorkload_nid_disambig1 ihxrbsoSKWc
sceGnmEndWorkload sceGnmEndWorkload_nid_disambig1 Fa3x75OOLRA
sceGnmDriverTraceInProgress sceGnmDriverTraceInProgress_nid_disambig1 R6z1xM3pW-w
sceGnmGetOffChipTessellationBufferSize sceGnmGetOffChipTessellationBufferSize_nid_disambig1 FFVZcCu3zWU

Source: shadPS4 f46a693c802f2d60573e07927b5fdaa753136567, src/core/libraries/gnmdriver/gnmdriver.cpp lines 168, 215, 906, 918 and 1000. None of the five reads the Neo mode there, and it keeps no stream or workload state; neither does this change. Nothing here is measured on a console, which docs/dev/debt/libSceGnmDriver.md records (Workload streams under Functional, and sceGnmDriverTraceInProgress added to the existing Silent stubs entry).

The functions carry the _nid_disambig1 suffix, as #17711 and #17942 do for the names the Neo provider already declares.

Overlap, checked against the merge refs of the open pull requests: none adds these names or NIDs to libSceGnmDriver (#17393, #16238 and #16463 mention them for the Neo provider only). #16882, #17711 and #17942 change the same files; a three-way merge with each is clean.

Tested

Ubuntu 24.04, GCC 13.3.0, Release, no title:

  • ctest --test-dir build -R '^guest_gnm_driver$' passes with the new TestWorkloads.

  • Twelve mutations of the five functions each fail the test: create accepting a null name, create storing 2, the begin boundary at 15 and at 17, begin storing 32 bits, begin checking the stream before the output, the end shift at 48, the end boundary at 15 and at 17, end accepting 0, another tessellation size, trace returning true.

  • python3 tools/check_conventions.py --base upstream/main and python3 core/libs/tests/test_public_headers.py --audit-only pass.

  • Full build with libs, then ctest --test-dir build --timeout 120 --parallel 4: of 4774 tests, 20 fail and 1128 are skipped. The 20 are socket tests (guest_net_*, guest_sce_net_keepalive, guest_socket_*, guest_tcp) on a container without IPv6, where creating an AF_INET6 socket fails; they were not run on main for comparison. The skips are the tests that need a Vulkan device, which the container lacks, so gnm_driver_submit_wait did not run.

Windows (windows-latest, WinLibs GCC 15.2.0), the windows job of build.yml with this branch merged into main at 07ae6af, run on the fork: the full build, libs, ctest (4885 tests registered) and check_skips.py pass. https://github.com/erickerxhalli/AnyPS5-fork/actions/runs/42767204852

Not tested on a title: CUSA00223 still stops on the other imports of #17581.

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 (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

…ze queries

sceGnmCreateWorkloadStream, sceGnmBeginWorkload, sceGnmEndWorkload,
sceGnmDriverTraceInProgress and sceGnmGetOffChipTessellationBufferSize
were exported only by libSceGnmDriverForNeoMode, so a title that imports
them from libSceGnmDriver stopped at load (boykopovar#17581). They do not depend
on the Neo mode in shadPS4 (f46a693c, gnmdriver.cpp lines 168, 215, 906,
918 and 1000), which keeps no workload state; the results are not
measured on a console.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Progress report (667dbde → 90662f4)

📈 System libraries: 40.04% (+0.01%, +3 implemented functions)

✅ 3 implemented
Library Name
libSceGnmDriver sceGnmBeginWorkload_nid_disambig1
libSceGnmDriver sceGnmCreateWorkloadStream_nid_disambig1
libSceGnmDriver sceGnmEndWorkload_nid_disambig1

Changed libraries (implemented exports)

Library Before After Change
libSceGnmDriver 35/67 (52.24%) 38/70 (54.29%) +2.05%

@JJenkx

JJenkx commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 94add35100, merged onto main 8356b8bbea (71f048d81e, 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.

@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

The five implementations are present and match the referenced PS4 behavior; I found a non-blocking name/NID mismatch in the PR description, and the required Windows check is still pending.

What I ran

Head 94add35100dad5ed57c1ddec0a4ce022ada9063c; base 8356b8bbea97649ff0d1185df0a631a814975fa1. The PR is open and mergeable. The no-build stack check produced a clean merge preview against that base; I did not build the preview.

Environment: Linux 6.1.0-54-amd64, Python 3.11.2, GCC 12.2.0.

I read all four changed files, their full diff, the PR discussion, and the linked issue. I ran the exact-head no-build precheck and checked the export-name/NID calculation:

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 18235 --output-dir /tmp/anyps5-pr-precheck-18235
python3 tools/pr_abi_audit.py --base 8356b8bbea97649ff0d1185df0a631a814975fa1 --head 94add35100dad5ed57c1ddec0a4ce022ada9063c --json
python3 - <<'PY'
from tools.nid_names import compute_nid
for name in ('sceGnmCreateWorkloadStream', 'sceGnmBeginWorkload', 'sceGnmEndWorkload'):
    print(name, compute_nid(name))
PY

I did not run a local build or CTest. I read the GitHub checks as a status snapshot.

Results

Check Result Note
Applicable no-build checks passed Diff, conventions, export audit, stack check and test heuristic completed.
Test registration passed The heuristic warning is a false positive; CMake explicitly registers guest_gnm_driver.
Local build and CTest not run The fast review pass excludes build-dependent checks.
Hosted checks not run Windows was pending; seven build jobs were skipped in the snapshot.
Full precheck table and relevant output
Check Status Why
build_and_compile not_run Builds are intentionally excluded from this fast, no-build check pass.
diff_check passed git diff --check completed with exit 0.
conventions_and_pr_template passed Completed with exit 0.
changed_export_abi_audit passed Completed with exit 0.
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed Python tool module has a related test suite.
python_test_registration not_applicable No changed Python tests need registration.
live_dependency_and_mergeability_check passed The exact-head merge preview was clean.
build_dependent_cpp_tests not_run This no-build pass does not compile changed C++ sources or tests.
test_quality_heuristics passed Heuristic emitted a test-registration warning; CMake registration was verified manually.
negative_controls not_applicable No changed Python tool tests are eligible.

Conventions output:

All conventions checks passed.

Name-derived NIDs after stripping _nid_disambig1:

sceGnmCreateWorkloadStream 5udAm+6boVg
sceGnmBeginWorkload ihxrbsoSKWc
sceGnmEndWorkload Fa3x75OOLRA

The test-quality warning was possible-unregistered-cpp-test; core/libs/prx/libSceGnmDriver/CMakeLists.txt registers GuestGnmDriver.cpp as guest_gnm_driver.

Negative control

Assertion Change made to code under test Result
Workload create/begin/end boundary and return behavior The author reports 12 mutations, including changed stream boundaries, output values, error checks, end-workload limits, and tessellation size. The author reports all 12 made the new test fail; I did not independently run these mutations.

Findings

Blocking

None found in the four changed files.

Non-blocking

The PR description’s table assigns the three workload NIDs to the wrong names. The code’s name-derived exports are CreateWorkloadStream → 5udAm+6boVg, BeginWorkload → ihxrbsoSKWc, and EndWorkload → Fa3x75OOLRA; the table currently rotates those three values. Please correct the table. The implementation itself uses the corresponding name-derived exports, so this documentation mismatch does not prevent the listed imports from resolving.

Sources

Not verified

  • I did not build the PR or run its C++ tests locally. A reviewer comment reports the Windows guest_gnm_driver test passed three times on this head; I did not reproduce it.
  • The author reports 20 Linux socket-test failures in a container without IPv6 and did not compare them with main, so I cannot confirm that they predate this change.
  • GitHub's Windows check was still pending at the final status read; the other seven build jobs were skipped.
  • No PS4/PS5 console measurement was provided; the debt entry correctly records that limitation.

To get this to a good state

Correct the three name/NID pairs in the PR description. I will recheck the exact head and required hosted checks before considering a later approval; if the code head changes, I will rerun the same no-build precheck and review the new diff.

@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 18212 core/libs/tests/GuestGnmDriver.cpp L85 sceGnmBeginWorkload
sceGnmCreateWorkloadStream
sceGnmEndWorkload

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

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

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 17711 core/libs/prx/libSceGnmDriver/Export.cpp
core/libs/prx/libSceGnmDriver/include/Api.hpp
docs/dev/debt/libSceGnmDriver.md

@Kikoarl

Kikoarl commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Linux check of head 94add35100, merged onto main 459eb5a98f (9438315605, clean merge).

Setup: Linux x86_64, 13th Gen Intel(R) Core(TM) i7-13700T, GCC 16.2.1, Release.

  • python3 tools/check_conventions.py passes cleanly (no violations).
  • guest_gnm_driver passes in 3 of 3 runs, none skipped.

AI-assisted: yes.

@erickerxhalli

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I fixed the NID table in the description. The three workload rows were rotated, and the code already uses the name-derived NIDs.

On the overlap: #18212 adds the same three workload exports and #18216 adds the trace and tessellation queries, with the same return values as this PR. Merging this together with either one would define the same functions twice, so only one set should land.

This PR covers all five in one change, has the review above and Windows and Linux runs of guest_gnm_driver, and its test adds more boundary cases for streams and workload tags. If you'd rather take #18212 and #18216 since they were opened first, I'll rebase on both, list them under Depends on, and cut this down to the extra test cases. Let me know which you prefer.

@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 — looks good

Nothing in the inspected changes shows a verified defect; the implementation follows the documented shadPS4 behavior, and the PR reports focused tests and build checks.

What I ran

Reviewed head 90662f4f47ffc778cb32eabd010ebcf784d38fbb. Read the prepared description, commit list, manifest, diff, and all four changed files. No commands or tests were run; reported test results are author-provided. The reader was repo_read.py.

Results

Check Result Note
Changed code review passed All four changed files read
Tests in this review not run Author reports focused and full-suite runs

Findings

Blocking

None.

Non-blocking

None.

Not verified

Console behavior is unmeasured, and the title was not tested. The reported Linux and Windows checks were not independently run. No files were excluded from the manifest; all four changed files were read.

To get this to a good state

Nothing is required.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants