Skip to content

feat(libSceGnmDriver): add mode-aware VGT control writers - #17942

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
johnohhh1:feat/gnm-vgt-control
Nov 14, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
johnohhh1:feat/gnm-vgt-control

Conversation

@johnohhh1

@johnohhh1 johnohhh1 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds sceGnmSetVgtControl and sceGnmResetVgtControl to normal libSceGnmDriver. Issue #17581 reports these missing imports for inFAMOUS Second Son (CUSA00223 01.07, bring-up #8214):

FAIL: unresolved ELF import MYRtYhojKdA
FAIL: unresolved ELF import cFCp0NX8wf0

The provider selects base SET_CONTEXT_REG or native Neo SET_UCONFIG_REG through sceKernelIsNeoMode. Invalid arguments return −1 before the mode query; unsupported/absent metadata throws without writing. Existing Neo implementations remain unchanged. _nid_disambig1 keeps host names distinct while retaining guest NIDs.

Semantics/signatures: shadPS4 a808e762. Normal-provider identities: PS5 3.20 inventory b2a77c09. Optional compatibility substitution is not added; console packet equivalence remains debt.

This supplies two of 47 reported imports; it does not close #17581 or claim title startup. #17711 and #18251 cover different functions, with no runtime prerequisite here.

November 14: merged current main to include its #19489 socket-test revert and request fresh CI. Original contribution history is retained; no new feature or test relaxation is added.

Tested

Fresh head 58a548988b4b9e33e07c71e7222ad4f77a2c8884, frozen main 3c620812fbf9040bd8aa30612a12bb1b012f212f. Identical fixtures, separate rebuilt main/PR production; Ubuntu 26.04.1/GCC 15.2/Release, SPIRV-Tools enabled:

Device Main + fixtures Refreshed PR
RTX 5070 /595.99.02 11/15 15/15
llvmpipe /Mesa 26.0.8 /LLVM 21.1.8 11/15 15/15

Both full configured Linux builds pass. Four normal-provider cases fail on main at the missing exports; all eleven controls pass. Required Vulkan, disabled shader cache, explicit ICDs, Khronos validation 1.4.341 and VK_LOADER_DEBUG=layer: layer insertion confirmed on both devices, no skips, missing-layer warnings or VUID errors. New VGT cases check CPU packet words; the existing submission control performs GPU work.

The fixture is byte-identical to the preceding submitted version. Writable provider/mode cases exhaust 1,024 argument combinations, reset output and guards; invalid arguments/metadata leave the buffer untouched. Earlier NID-patched-PRX tests and public-header audits remain in the discussion, tied to their original revisions.

Earlier hosted Windows job on eefa9b38f7 built successfully and passed all six VGT cases, but failed only the socket assertion reverted by #19489. It is not a Windows run of this refreshed head. Fresh hosted checks are pending after publication; no green result is assumed.

Conventions and clean current-main merge preview pass. Existing-main name warnings are intentional second-provider names; the previous #14212 shared-debt comparison contains only blank-line additions. No full runtime suite, fresh Windows/macOS, native AMD, console or title execution claimed.

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: NVIDIA GeForce RTX 5070 /595.99.02 and llvmpipe /Mesa 26.0.8 /LLVM 21.1.8, Ubuntu 26.04.1; new VGT tests are CPU packet checks
  • AI-assisted: yes (Codex)

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Progress report (995a10c → 4ac394e)

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

✅ 2 implemented
Library Name
libSceGnmDriver sceGnmResetVgtControl_nid_disambig1
libSceGnmDriver sceGnmSetVgtControl_nid_disambig1

Changed libraries (implemented exports)

Library Before After Change
libSceGnmDriver 37/68 (54.41%) 39/70 (55.71%) +1.30%

@JJenkx

JJenkx commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Windows check of head bff373361c, merged onto main 3e089775b9 (23f679c5b9, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2.0 UCRT r7, Release.

All six VGT tests pass in 3 of 3 runs each, none skipped:

  • guest_gnm_vgt_normal_base, guest_gnm_vgt_normal_neo, guest_gnm_vgt_normal_json and guest_gnm_vgt_normal_none
  • guest_gnm_vgt_neo_base and guest_gnm_vgt_neo_neo

AI-assisted: yes.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

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

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

@gabichuuuuu

Copy link
Copy Markdown
Contributor

Windows check of head bff373361c, merged onto main 28237a8567 (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_vgt_neo_base, guest_gnm_vgt_neo_neo, guest_gnm_vgt_normal_base, guest_gnm_vgt_normal_json, guest_gnm_vgt_normal_neo, guest_gnm_vgt_normal_none.
  • All of them pass in 3 of 3 runs.
  • Negative control: with this PR's code reverted to main (files it adds removed) and rebuilt, guest_gnm_vgt_normal_base, guest_gnm_vgt_normal_json, guest_gnm_vgt_normal_neo, guest_gnm_vgt_normal_none fail in 2 of 2 runs, so the tests detect the change; guest_gnm_vgt_neo_base, guest_gnm_vgt_neo_neo still pass.

AI-assisted: yes.

@johnohhh1
johnohhh1 force-pushed the feat/gnm-vgt-control branch from bff3733 to eefa9b3 Compare November 13, 2026 10:46
@johnohhh1

Copy link
Copy Markdown
Contributor Author

The Windows job for current head eefa9b38f7be9c857433bffc5c73156b5b2bf7e9 built successfully. Its only failure among 4,403 selected tests (including project skips) is guest_socket_stream_options, line 132 / errno 22.

The job pinned main eb33fb7dd774d56d0123b04b1f56b57c59a520c4, which still has the negative-length/unknown-option assertion already reverted by Dean in #19489 (0294cba8dcab511f5b0c01129d340a207e631c9f). This is the same failure diagnosed on #17623; no VGT source change is needed for it. A current-main merge preview is clean against fb2ba350f93a89930a9fb05facc8e32c8d3d9996 (preview only, not a new build).

Could a maintainer start a fresh Build workflow for #17942 so eligibility captures main including the revert? Our account cannot restart upstream runs (HTTP 403); rerunning only the failed job can reuse the old eligibility base.

AI-assisted log/source diagnosis: yes (Codex).

@johnohhh1

Copy link
Copy Markdown
Contributor Author

Refreshed to 58a548988b4b9e33e07c71e7222ad4f77a2c8884 by merging tested main 3c620812fbf9040bd8aa30612a12bb1b012f212f, which includes the #19489 socket-test revert. Normal fast-forward push; no VGT feature change or test relaxation.

Fresh paired Linux builds/tests with identical fixtures: main 11/15 → PR 15/15, on both RTX 5070 /595.99.02 and llvmpipe /Mesa 26.0.8 /LLVM 21.1.8, Ubuntu 26.04.1/GCC 15.2/Release. Both full configured builds pass. Vulkan required, shader cache disabled, Khronos validation loaded with loader insertion confirmed; no skips, missing-layer warnings or VUIDs. The new VGT checks inspect CPU packets; the existing submission control performs GPU work.

The description now leads with current evidence and keeps the earlier Windows result separate. New-head CI is triggered; no fresh Windows pass is claimed yet. Original head is retained locally.

AI-assisted validation/reporting: yes (Codex).

@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Nov 14, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 14, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 14, 2026
@oneandonlydean
oneandonlydean merged commit 952222e into boykopovar:main Nov 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build docs fix error Closes an issue (Fixes #N) prx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libSceGnmDriver: inFAMOUS Second Son (CUSA00223) stops at load on 47 imports that only libSceGnmDriverForNeoMode exports

4 participants