Skip to content

fix(libSceGnmDriverForNeoMode): write the draw packets and the coredump mode through guest copies - #24012

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
kaiffeetasse:contrib/gnmneo-guest-packet-copies
Nov 20, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
kaiffeetasse:contrib/gnmneo-guest-packet-copies

Conversation

@kaiffeetasse

Copy link
Copy Markdown
Contributor

What

sceGnmDrawIndexMultiInstanced, sceGnmDrawOpaqueAuto and sceGnmGetCoredumpMode wrote their answer through the guest pointer they were handed. cmdbuf[0] = … stores into the address the guest supplied, so it only lands in the guest's command buffer while that address is also host-addressable; every neighbouring export in the same file already builds the packet in a local array and hands it back through the file's WriteCommandBuffer helper or GuestCopyOut_nid_no_patch.

  • Both draw exports now build their packet with the existing WriteCommandBuffer<13>/WriteCommandBuffer<7> helper, which copies the buffer in, edits the local copy and copies it back. Words the console leaves alone stay untouched, which is what the existing expectations in guest_gnm_neo_packets pin (U after the trailing NOP).
  • sceGnmGetCoredumpMode writes its answer through GuestCopyOut_nid_no_patch and reports 1, the answer it already gives for a null pointer, when the guest buffer cannot be written.

tools/guest_pointer_audit.py on this branch: libSceGnmDriverForNeoMode 3 findings → 0, whole tree 2646 → 2643.

Tested

Ubuntu 24.04 base (Linux Mint 22.1), GCC 13.3.0, Ninja, Release, x86_64, no GPU.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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 — guest command-packet tests only; no AGC device, shader recompiler or VideoOut path is touched
  • AI-assisted: yes

@github-actions github-actions Bot added the prx label Nov 20, 2026
@oneandonlydean
oneandonlydean merged commit 2091d03 into boykopovar:main Nov 20, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants