feat(libSceAgc): implement the vieBRwlh1Lw interpolant mapping update #3829

Merged
YossiYad merged 2 commits from upstream-pr/3829 into main 2026-10-11 22:39:58 +00:00
YossiYad commented 2026-10-11 17:18:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-11T17:18:13Z.


What

Carries David's screamm/AnyPS5:feat/agc-vieBRwlh1Lw commit from #3364 onto current main, preserving its author. The only rebase conflict was in TechnicalDebt, where both new entries are kept; the implementation and test files are identical to blawesom's verified rebase (blawesom:verify/3364).

  • Implement sceAgcUnknown_vieBRwlh1Lw, the interpolant mapping update Hollow Knight: Silksong (PPSA12544) imports (#699), after OpenAGC's game_compat.c and its test vectors. It takes the same (regs, gs, ps) as the implemented dbOlWdppb4o, applies the same register transform without the identity tail, writes one register per pixel shader input and nothing for a shader without inputs, and rejects null registers, a null pixel shader, more than 32 inputs, a missing geometry shader and null semantic tables. A fillIdentityTail flag is added to CreateInterpolantMapping; the two existing exports are unchanged.
  • One disagreement throws: for an f16 input with different low and high defaults, OpenAGC fills the default from default_value_hi while this repository's dbOlWdppb4o, KytyPS5 and sharpemu use default_value. Recorded in TechnicalDebt.

The library progress moves from 2903/3383 (85.81%) to 2904/3383 (85.84%).

Closes #3364.

Tested

Linux (Bazzite 44, GCC 16.2.1, Ninja, Release, -DBUILD_TESTING=ON), based on main a11c8f7f:

  • Full build, libs, and full ctest: 823 pass, 8 skip, 1 failure (832 registered tests). The failure is the GPU agc_driver_pixel_interlock test, which passes 5 of 10 runs on its own here and also fails intermittently on this machine on branches that do not touch libSceAgc. Its test binary loads only libSceAgcDriver.prx, not libSceAgc.prx, so this change cannot reach it.
  • agc_interpolant_mapping and guest_shader_link pass.
  • tools/check_conventions.py --base upstream/main and git diff --check pass.
  • The original author reported Windows testing in #3364, and blawesom reported a Linux run of the rebased commit there. Silksong was not run on this machine.

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; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • No new third-party code
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4820873636 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3829). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-11T17:18:13Z. --- ### What Carries David's `screamm/AnyPS5:feat/agc-vieBRwlh1Lw` commit from #3364 onto current `main`, preserving its author. The only rebase conflict was in TechnicalDebt, where both new entries are kept; the implementation and test files are identical to blawesom's verified rebase (`blawesom:verify/3364`). - Implement `sceAgcUnknown_vieBRwlh1Lw`, the interpolant mapping update Hollow Knight: Silksong (PPSA12544) imports (#699), after OpenAGC's `game_compat.c` and its test vectors. It takes the same `(regs, gs, ps)` as the implemented `dbOlWdppb4o`, applies the same register transform without the identity tail, writes one register per pixel shader input and nothing for a shader without inputs, and rejects null registers, a null pixel shader, more than 32 inputs, a missing geometry shader and null semantic tables. A `fillIdentityTail` flag is added to `CreateInterpolantMapping`; the two existing exports are unchanged. - One disagreement throws: for an f16 input with different low and high defaults, OpenAGC fills the default from `default_value_hi` while this repository's `dbOlWdppb4o`, KytyPS5 and sharpemu use `default_value`. Recorded in TechnicalDebt. The library progress moves from 2903/3383 (85.81%) to 2904/3383 (85.84%). Closes #3364. ### Tested Linux (Bazzite 44, GCC 16.2.1, Ninja, Release, `-DBUILD_TESTING=ON`), based on `main` `a11c8f7f`: - Full build, `libs`, and full `ctest`: 823 pass, 8 skip, 1 failure (832 registered tests). The failure is the GPU `agc_driver_pixel_interlock` test, which passes 5 of 10 runs on its own here and also fails intermittently on this machine on branches that do not touch libSceAgc. Its test binary loads only `libSceAgcDriver.prx`, not `libSceAgc.prx`, so this change cannot reach it. - `agc_interpolant_mapping` and `guest_shader_link` pass. - `tools/check_conventions.py --base upstream/main` and `git diff --check` pass. - The original author reported Windows testing in #3364, and blawesom reported a Linux run of the rebased commit there. Silksong was not run on this machine. ### Checklist - [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 - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] No new third-party code - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 17:18:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T17:18:39Z.


Progress report (31bf997 → 07af520)

📈 System libraries: 85.71% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceAgc sceAgcUnknown_vieBRwlh1Lw
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111618934 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3829#issuecomment-6111618934). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T17:18:39Z. --- <!-- progress-report --> ### Progress report (31bf997 → 07af520) 📈 **System libraries**: 85.71% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceAgc | `sceAgcUnknown_vieBRwlh1Lw` | </details>
adriadam10 commented 2026-10-11 22:08:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:08:18Z.


Checked on Linux: libSceAgc build and ctest (20/20, including agc_interpolant_mapping), the new test fails to link without the change, and the export matches OpenAGC's game_compat.c (dbOlWdppb4o transform without the identity tail). The disagreement on default_value_hi is recorded in TechnicalDebt and throws.

Added one commit: moved the Functional TechnicalDebt line off the end of the file, where every PR appends and conflicts. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114385912 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3829#issuecomment-6114385912). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T22:08:18Z. --- Checked on Linux: libSceAgc build and ctest (20/20, including `agc_interpolant_mapping`), the new test fails to link without the change, and the export matches OpenAGC's `game_compat.c` (`dbOlWdppb4o` transform without the identity tail). The disagreement on `default_value_hi` is recorded in TechnicalDebt and throws. Added one commit: moved the Functional TechnicalDebt line off the end of the file, where every PR appends and conflicts. 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!3829
No description provided.