Skip to content

fix(ngs2): reset the custom filter selected by the parameter index - #11353

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
edubox:fix/ngs2-custom-filter-reset
Oct 28, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
edubox:fix/ngs2-custom-filter-reset

Conversation

@edubox

@edubox edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

What

Reset the custom filter selected by the parameter index. When type is 0, the code built a zeroed Ngs2SamplerVoiceFilterParam, which also cleared index, so Ngs2SetFilter always reset filter 0. It now keeps the parameter's index and location before asking the filter engine to turn that filter off.

Regression: TestCustomFilterResetIndex creates two filter modules, mutes filter 0, resets filter 1 and verifies filter 0 still mutes the output. The test fails without this change because filter 0 is reset instead.

Tested

Linux, GCC 16.2.1. All 16 ngs2_* tests pass. TestCustomFilterResetIndex passes with the fix and fails on the previous code.

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

@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.

I reviewed the changed custom-filter dispatch and the new regression case. The reset path in Ngs2SetFilter uses param.index, so preserving index when zeroing the translated sampler-filter parameter is necessary; the test exercises the regression by keeping filter 0 muted while resetting filter 1. The source diff is consistent with that behavior.

The PR description reports all 16 ngs2_* tests passing on Linux. The hosted checks on this PR did not run the Build test jobs (they are marked skipped), so that result is from the author’s local run rather than CI. I did not independently run the suite in this review.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

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 10249 core/libs/prx/libSceNgs2.native/src/Custom.cpp

@MarcZX10

Copy link
Copy Markdown
Contributor

I manually compared the current heads of #11353 (f3803b261897b36f197b21e7e99d850ab713915e) and #10851 (e50cbf349d4e0af8647627640df9c8c9ddf610b7) with git merge-tree --write-tree. The filter fix in Custom.cpp and Ngs2Custom.cpp test auto-merge with the Reverb work. The preview has content conflicts in core/libs/prx/libSceNgs2.native/CMakeLists.txt, src/Voice.cpp, and docs/dev/debt/libSceNgs2.native.md. These appear to be shared integration points, not evidence the filter change duplicates Reverb. Please coordinate merge order and preserve the test registration, both voice behaviors, and both debt entries when resolving them. This check is a merge preview only; it does not validate either PR's runtime tests.

@github-actions github-actions Bot added the prx label Oct 26, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor

Current main is b27cc8416f820e40ce187f165d34138e24373dd7; this head is 1 ahead/108 behind. The merge preview is clean, and main has not changed the PR's touched code/test paths since its base. Please refresh the branch per the repository base-sync rule and rerun the focused custom-filter regression on the resulting exact head. The existing hosted checks are policy/report checks; Build test jobs are skipped, so the earlier 16-test result remains author-reported.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from f3803b2 to ce9e80e Compare October 26, 2026 09:04
@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (c3db979cd3); the change itself is unchanged. All 16 ngs2_* tests pass on the rebased head ce9e80e3cf (ctest -R "^ngs2_" -j16).

@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 exact head ce9e80e3cf664bb87169578b61d4e92f954bdfb2 against current main 8100e480f7d55e87afb5376b8f784bf17df0f75c.

The reset branch preserves the selected filter index and the sampler-filter location/type needed for reset dispatch. The new regression mutes filter 0, resets filter 1, and verifies that filter 0 remains muted; current main has no edits to the touched implementation or test paths, and the merge preview is clean. Current-main conventions and git diff --check pass.

The author reports all 16 ngs2_* tests pass on this rebased head. I did not independently run them; hosted eligibility, conventions, labels and report checks pass, while the product/build test jobs are skipped by path policy.

AI-assisted review.

@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.

Follow-up on my approval of exact head ce9e80e3cf664bb87169578b61d4e92f954bdfb2: current upstream main is now 63 commits beyond merge base c3db979cd33a65a0a651f1e7ba7958137a961413. The branch merges cleanly, and my current-head conventions/diff checks pass. The reported 16-test run was on c3db; since then main has changed other NGS2 implementation, test and debt paths, while all product test jobs are skipped by path policy. Please rebase onto current main and rerun the focused NGS2 suite on that exact head. I cannot independently execute the test binary on this host because its CPU preflight requires unsupported instructions.

The current pairwise merge preview with #11354 is clean, so I found no integration conflict between these two heads.

@MarcZX10

Copy link
Copy Markdown
Contributor

Current-main follow-up (5b5d24cb223ede690fe5eab1fe2f7a1736b801a5): this branch remains 1 commit ahead and 66 behind its merge base c3db979cd33a65a0a651f1e7ba7958137a961413. The merge preview is clean, but main has since changed both src/Custom.cpp and tests/Ngs2Custom.cpp, which this PR also changes. In particular, the current-main change initializes the reset filter's index, location and type after clearing it. The reported 16-test run is from before these overlapping updates. Please rebase onto current main and rerun the focused ngs2_* suite on that exact head; the existing hosted checks are policy/report checks, with product tests skipped by path policy.

@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main 035ac96edd; the change itself is unchanged. All 16 ngs2_* tests pass on the rebased head 8f2266caa7 (ctest -R "^ngs2_" -j16), and check_conventions.py / git diff --check are clean. Could you re-review the exact head?

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from ce9e80e to 8f2266c Compare October 26, 2026 13:10

@THEMANnt THEMANnt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 8f2266c against 035ac96. No actionable findings. The reset path zero-initializes its translated filter parameter, then restores the selected index and location before dispatch. The regression creates two filters, mutes filter 0, resets filter 1, and verifies filter 0 remains muted—directly exercising the index-selection bug. I built ngs2_custom_tests in Release with WinLibs GCC 15.2.0 and ran focused CTest: 1 passed, 0 skipped, 0 failed. The exact-head Actions run passed eligibility only; Linux, Windows and the other product jobs were skipped. This verifies the affected test target locally, but is not a run of the full NGS2 suite or console firmware.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 8f2266c to 9adfdfa Compare October 26, 2026 16:12
@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (518d36eaec); head is now 9adfdfa225. Rebuilt and ran the full focused suite on the rebased head: 16/16 ngs2_* tests pass. check_conventions.py --base origin/main: all checks passed.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 9adfdfa to 7a4ce8e Compare October 26, 2026 17:57
@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (88795ed448); head is now 7a4ce8e64e. The change itself is unchanged. Rebuilt and ran the focused NGS2 suite on the rebased head: 16/16 tests pass. check_conventions.py --base origin/main and git diff --check are clean. Could you re-check the exact head?

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 7a4ce8e to 278b438 Compare October 26, 2026 21:39
@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased again onto current main (85071975fb); head is now 278b438205. No code changes. 16/16 focused NGS2 tests pass; conventions/diff-check clean. Could you re-check the exact head?

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 278b438 to 327cea3 Compare October 26, 2026 22:11
@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (74acfad65b); head is now 327cea34b5. No conflicts.

The earlier check failure came from a stale CMake configuration that did not include the ngs2_custom_safety, ngs2_gain and ngs2_routing targets added by main. After reconfiguring and rebuilding, both focused suites pass on the rebased head: 21/21 in libSceNgs2.native and 9/9 in libSceNgs2. check_conventions.py --base origin/main: all checks passed. Could you re-check the exact head?

@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (6e719cc497); head is now 67b607c888. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 327cea3 to 67b607c Compare October 27, 2026 02:03
@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (b986c11a34); head is now 450348c0ff. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 67b607c to 450348c Compare October 27, 2026 04:02
@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (6dca6acab4); head is now bcb6ffce68. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 450348c to bcb6ffc Compare October 27, 2026 06:03
@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (f1adec7eb1); head is now 3e1d4e8335. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from bcb6ffc to 3e1d4e8 Compare October 27, 2026 07:03
@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (12686b52de); head is now be359ca5f9. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 4c624a9 to 2e97d98 Compare October 27, 2026 14:03
@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (0c4a8cb41a); head is now 924a52dcad. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 2e97d98 to 924a52d Compare October 27, 2026 17:04
@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (14332cd8d0); head is now 605fc8c284. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 924a52d to 605fc8c Compare October 27, 2026 18:03
@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (46fe6f2437); head is now 1ed5daa2f9. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 1ed5daa2f9, merged into main f759e165d9 (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

The tree also carried the open PRs #11724, #11644, #11639, #11636, #11635, #11630, #11347, #11221, #10925, #11706, #11693, #11686, #11682, all merged cleanly, so the run is a joint one; the tests of this PR are ngs2_custom and the whole Ngs2 suite (ctest -R '^ngs2_' 30/30), all passed (the batch's mapped tests: 16/16, plus 43/43 for the Ngs2 and host-import suites). Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@edubox

edubox commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (0cd07dc4ab); head is now f2255a3ebe. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from 1ed5daa to f2255a3 Compare October 28, 2026 06:04
@edubox

edubox commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Rebased automatically onto current main (d7fd416992); head is now dfc5c7c6c7. Focused tests pass; check_conventions.py --base origin/main and git diff --check are clean.

@edubox
edubox force-pushed the fix/ngs2-custom-filter-reset branch from f2255a3 to dfc5c7c Compare October 28, 2026 08:03
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 28, 2026 08:31

Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.

@adriadam10
adriadam10 merged commit f3eb573 into boykopovar:main Oct 28, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked that the type-0 reset now keeps the selected index and location, that Ngs2SetFilter resets filters[param.index], and that TestCustomFilterResetIndex would leave filter 0 unmuted on the old code; Windows runs by @THEMANnt and @maskym pass; merged.

@edubox
edubox deleted the fix/ngs2-custom-filter-reset branch October 31, 2026 12:15
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.

5 participants