fix(libSceNgs2): support custom filter type 0 in Ngs2ApplyCustomParam #5898

Merged
mohammad-alosta merged 2 commits from upstream-pr/5898 into main 2026-10-16 19:43:57 +00:00
mohammad-alosta commented 2026-10-14 15:04:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mohammad-alosta on 2026-10-14T15:04:55Z.


What

NGS2 custom filters currently reject type 0, which stops Dead Cells (PPSA15552) after the custom sampler rack startup. This happens only after the listener-transform support from the earlier PR #5810 .

This change supports type 0 by clearing the destination filter, matching the existing sampler filter convention. Type 1 continues to configure the RBJ low-pass biquad frequency, Q and level. Other unsupported filter types still throw.

Changed files:

  • core/libs/prx/libSceNgs2.native/src/Custom.cpp
  • docs/dev/debt/libSceNgs2.native.md

Tested

  • Linux
  • Build command: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
  • Build target: ngs2_custom_tests
  • Test command: ctest --test-dir build -R '^ngs2_custom$' --output-on-failure
  • Result: ngs2_custom passed (100% tests passed, 0 failures)
  • Also rebuilt patched libraries with cmake --build build --target libs for game testing.
  • Behavioral check: custom filter type 0 clears the filter, type 1 configures it, and unsupported types still throw.

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: #5810
  • Unblocks: PPSA15552
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4859936499 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5898). Originally posted by [mohammad-alosta](https://github.com/mohammad-alosta) on 2026-10-14T15:04:55Z. --- ### What NGS2 custom filters currently reject type `0`, which stops Dead Cells (PPSA15552) after the custom sampler rack startup. This happens only after the listener-transform support from the earlier PR #5810 . This change supports type `0` by clearing the destination filter, matching the existing sampler filter convention. Type `1` continues to configure the RBJ low-pass biquad frequency, Q and level. Other unsupported filter types still throw. Changed files: - `core/libs/prx/libSceNgs2.native/src/Custom.cpp` - `docs/dev/debt/libSceNgs2.native.md` - ### Tested - Linux - Build command: `cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON` - Build target: `ngs2_custom_tests` - Test command: `ctest --test-dir build -R '^ngs2_custom$' --output-on-failure` - Result: `ngs2_custom` passed (`100% tests passed, 0 failures`) - Also rebuilt patched libraries with `cmake --build build --target libs` for game testing. - Behavioral check: custom filter type 0 clears the filter, type 1 configures it, and unsupported types still throw. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #5810 - [x] Unblocks: PPSA15552 - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-15 12:11:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:11:17Z.


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 6594 docs/dev/debt/libSceNgs2.native.md L28-29
PR 6680 docs/dev/debt/libSceNgs2.native.md L27-30

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 5797 docs/dev/debt/libSceNgs2.native.md
PR 6447 docs/dev/debt/libSceNgs2.native.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191733571 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5898#issuecomment-6191733571). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:11:17Z. --- <!-- pr-overlap --> 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 6594](https://www.github.com/boykopovar/AnyPS5/pull/6594) | `docs/dev/debt/libSceNgs2.native.md` [L28-29](https://github.com/boykopovar/AnyPS5/blob/f26eb67c89bfe8a06ccfb51cc6e64dde03a099c2/docs/dev/debt/libSceNgs2.native.md#L28-L29) | | | | [PR 6680](https://www.github.com/boykopovar/AnyPS5/pull/6680) | `docs/dev/debt/libSceNgs2.native.md` [L27-30](https://github.com/boykopovar/AnyPS5/blob/f26eb67c89bfe8a06ccfb51cc6e64dde03a099c2/docs/dev/debt/libSceNgs2.native.md#L27-L30) | | | 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 5797](https://www.github.com/boykopovar/AnyPS5/pull/5797) | `docs/dev/debt/libSceNgs2.native.md` | | [PR 6447](https://www.github.com/boykopovar/AnyPS5/pull/6447) | `docs/dev/debt/libSceNgs2.native.md` |
notaxeltv commented 2026-10-15 20:38:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by notaxeltv on 2026-10-15T20:38:07Z.


Verified on PPSA15552 (Dead Cells): with this change alone the title gets past custom filter type 0; next stop on current main (+ #5810 listener transforms) is sceNgs2GeomApply not implemented (#5974).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6201786066 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5898#issuecomment-6201786066). Originally posted by [notaxeltv](https://github.com/notaxeltv) on 2026-10-15T20:38:07Z. --- Verified on PPSA15552 (Dead Cells): with this change alone the title gets past custom filter type 0; next stop on current main (+ #5810 listener transforms) is `sceNgs2GeomApply not implemented` (#5974).
mohammad-alosta commented 2026-10-15 22:48:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mohammad-alosta on 2026-10-15T22:48:14Z.


Rebased onto current main. Tests and convention checks still pass.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6203880879 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5898#issuecomment-6203880879). Originally posted by [mohammad-alosta](https://github.com/mohammad-alosta) on 2026-10-15T22:48:14Z. --- Rebased onto current main. Tests and convention checks still pass. AI-assisted
adriadam10 commented 2026-10-16 18:33:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T18:33:24Z.


Checked the diff against Ngs2SetFilter: type 0 already clears the filter there (Voice.cpp), so the custom path now matches the sampler convention; type 1 and other types are unchanged. Build and the Ngs2 ctest set pass, and @notaxeltv confirmed Dead Cells gets past this call.

Added one commit on your branch: a test in Ngs2Custom.cpp pinning that an unsupported type (2) still throws and that type 0 after type 1 renders unfiltered output. It fails without the Custom.cpp change. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6222188436 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5898#issuecomment-6222188436). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T18:33:24Z. --- Checked the diff against `Ngs2SetFilter`: type 0 already clears the filter there (`Voice.cpp`), so the custom path now matches the sampler convention; type 1 and other types are unchanged. Build and the Ngs2 ctest set pass, and @notaxeltv confirmed Dead Cells gets past this call. Added one commit on your branch: a test in `Ngs2Custom.cpp` pinning that an unsupported type (2) still throws and that type 0 after type 1 renders unfiltered output. It fails without the `Custom.cpp` change. Merging once CI is green.
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!5898
No description provided.