fix(libSceNgs2): implement a minimal sceNgs2GeomApply pass-through #5974
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5974"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by mohammad-alosta on 2026-10-14T17:40:58Z.
What
sceNgs2GeomApplywas an unimplemented throwing stub (NotImplemented_nid_no_patch) and was blocking Dead Cells (PPSA15552), where the missing function surfaced as:terminate called after throwing an instance of 'std::runtime_error' what(): sceNgs2GeomApply not implemented Aborted
This change implements a minimal pass-through in
Geom.cppunder default visibility. It validates null listener/source/output arguments, clears the output attribute, and returns:pitch_ratio = 1.0fa3d_attrib.positionfrom the source positiona3d_attrib.volumeasmax(min_level, max_level)max_level, or1.0fwhenmax_level <= 0.0fIt handles the source channel count through
matrix_format, capped at 8, with matrix format 0 treated as two channels. It does not implement source attenuation, distance rolloff, panning or Doppler, matching the existing technical debt status.Unimplemented.cppno longer defines the stub.Tested
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ONcmake --build build --target ngs2_geom_tests libsctest --test-dir build -R '^ngs2_geom$' --output-on-failurengs2_geompassed (100% tests passed, 0 failures)nm -D build/core/libs/libs/libSceNgs2.native.prxshowseF8yRCC6W64sceNgs2GeomApply not implemented.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T17:41:46Z.
Progress report (
ea4cc11→0129876)📈 System libraries: 89.02% (+0.03%, +1 implemented functions)
✅ 1 implemented
sceNgs2GeomApplyImported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-14T18:49:42Z.
The library already has a place for this.
sceNgs2GeomCalcListener,sceNgs2GeomResetListenerParamandsceNgs2GeomResetSourceParamare one-line wrappers inside the existingvisibility push(default)block inVoice.cpp(around line 513), and their bodies live inGeom.cppasNgs2GeomCalcListenerand friends, declared inNgs2Internal.hpp. Putting the body inGeom.cppasNgs2GeomApplywith a wrapper next to those three needs no new pragma, passescheck_conventions.py(it only looks at added lines), and leavesUnimplemented.cppfor stubs.Separately, the maintainers have asked for exact behaviour or a throw. The levels written here (the larger of min and max level as volume, max level on the diagonal, matrix format 0 treated as two channels) aren't from the PS5 library or a title capture, so a reviewer will likely ask where they come from. A test in
tests/Ngs2Geom.cppthat fails without the change would also help.Imported from boykopovar/AnyPS5. Originally posted by mohammad-alosta on 2026-10-14T19:16:58Z.
Done: the implementation now follows the existing layout.
Ngs2GeomApplyis implemented inGeom.cppsceNgs2GeomApplyis a one-line wrapper in the existingvisibility push(default)block next tosceNgs2GeomResetListenerParam/sceNgs2GeomCalcListenerUnimplemented.cppno longer defines the stubNgs2GeomApplyis declared inNgs2Internal.hpptests/Ngs2Geom.cppnow has a test that fails without the changeOn the behavior question: the returned values are intentionally a minimal, documented pass-through rather than PS5-measured geometry, because
sceNgs2GeomApplyis documented as unsupported/source-attenuation still unimplemented. They match the KytyPS5-style baseline that was used for the earlier listener matrix: identity channel gain, pitch 1.0, source position/volume, and matrix format 0 treated as two channels. The debt note was updated to say this is a minimal pass-through and not exact console behaviour; full distance rolloff, panning and Doppler remain unimplemented. A test now checks the accepted null/error paths and the current output shape.If you prefer this case to throw until a console-captured result exists instead of using this pass-through, I can change it to that.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:12:35Z.
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.
main)sceNgs2GeomApplysceNgs2GeomApplySome 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.
core/libs/prx/libSceNgs2.native/src/Ngs2Internal.hppcore/libs/prx/libSceNgs2.native/src/Voice.cppcore/libs/prx/libSceNgs2.native/src/Ngs2Internal.hppcore/libs/prx/libSceNgs2.native/src/Voice.cppdocs/dev/debt/libSceNgs2.native.mdcore/libs/prx/libSceNgs2.native/src/Geom.cppcore/libs/prx/libSceNgs2.native/src/Ngs2Internal.hppcore/libs/prx/libSceNgs2.native/src/Unimplemented.cppcore/libs/prx/libSceNgs2.native/src/Voice.cppcore/libs/prx/libSceNgs2.native/tests/Ngs2Geom.cppcore/libs/prx/libSceNgs2.native/tests/Ngs2Test.hppdocs/dev/debt/libSceNgs2.native.mdcore/libs/prx/libSceNgs2.native/src/Geom.cppcore/libs/prx/libSceNgs2.native/tests/Ngs2Geom.cppdocs/dev/debt/libSceNgs2.native.mdcore/libs/prx/libSceNgs2.native/src/Geom.cppcore/libs/prx/libSceNgs2.native/src/Ngs2Internal.hppcore/libs/prx/libSceNgs2.native/src/Unimplemented.cppcore/libs/prx/libSceNgs2.native/src/Voice.cppcore/libs/prx/libSceNgs2.native/tests/Ngs2Geom.cppcore/libs/prx/libSceNgs2.native/tests/Ngs2Test.hppdocs/dev/debt/libSceNgs2.native.mdImported from boykopovar/AnyPS5. Originally posted by notaxeltv on 2026-10-15T20:38:09Z.
Verified needed for PPSA15552 (Dead Cells) after #5898 + current main (#5810): the title stops on
sceNgs2GeomApply not implemented. Stacking this should be the next unblock after filter type 0.Imported from boykopovar/AnyPS5. Originally posted by notaxeltv on 2026-10-15T20:56:23Z.
Follow-up after stacking #5898 + this on current main (#5810): PPSA15552 reaches
Unit: invalid argumentinsidesceNgs2GeomCalcListener(zero or parallelorient_front/orient_up). That matches the existing reject tests / PS5PCEMInvalidOrientation; not claiming a console error code yet — leaving it for a separate measured fix rather than folding into this PR.Imported from boykopovar/AnyPS5. Originally posted by notaxeltv on 2026-10-15T21:08:33Z.
Confirmed after stacking #5898 + this on current main: PPSA15552 reaches
Unit: invalid argumentinsceNgs2GeomCalcListener. Captured guest args:orient_front={0,0,1}orient_up={0,-0,1}flags=0— parallel front/up so the right-axis cross product is zero. Matches existing reject tests / PS5PCEMInvalidOrientation; still no console error-code measurement, so not folding a soft fallback into this PR.Imported from boykopovar/AnyPS5. Originally posted by mohammad-alosta on 2026-10-15T22:46:46Z.
Rebased onto current main. Tests and convention checks still pass.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T19:45:24Z.
Checked against KytyPS5's
Ngs2GeomApply(same pitch, position, volume and per-channel diagonal; shadPS4 stubs it): matches.ngs2_geomfails without the change and the 9 Ngs2 tests pass on the rebased tree.Added one commit on your branch: the
sceNgs2GeomApplyline indocs/dev/debt/libSceNgs2.native.mdnow names KytyPS5 as the only source, says the listener andflagsare ignored, and that it is unmeasured on a PS5.Merging.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T20:01:54Z.
Rebased onto current
main(only conflict: the custom sampler rack line indocs/dev/debt/libSceNgs2.native.md; kept main's text). Diff unchanged, the 10 Ngs2 tests pass on the rebased tree.Merging.