libSceAgc: the vieBRwlh1Lw interpolant mapping update is a stub (Silksong imports); fix branch ready #3364

Closed
opened 2026-10-11 09:03:48 +00:00 by screamm · 2 comments
screamm commented 2026-10-11 09:03:48 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T09:03:48Z.


The libSceAgc export sceAgcUnknown_vieBRwlh1Lw (NID vieBRwlh1Lw, no aerolib name; ps5rs and REmu call it sceAgcUpdateInterpolantMapping, but that name hashes to a different NID) is a NotImplemented_nid_no_patch stub. Hollow Knight: Silksong (PPSA12544) imports it (#699).

Fix branch ready: screamm:feat/agc-vieBRwlh1Lw (b1ca8cb9, one commit on main 0c617bae). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.

  • Source: OpenAGC game_compat.c and tests/test_shader.c (3c7e8072): the export 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. The change adds a fillIdentityTail flag to CreateInterpolantMapping in Shader/src/InterpolantMapping.cpp; the two existing exports are unchanged. One disagreement is left throwing: for is_f16 1 or 3 inputs OpenAGC fills the 2-bit default-value field from default_value_hi (its own vectors 0x01380107, 0x03680709 confirm it) while the repo's dbOlWdppb4o, KytyPS5 and sharpemu use default_value, so the new export throws when the two differ. A script comparing both transforms over the 786,432 uncontested combinations found no other difference. TechnicalDebt records the OpenAGC-only source, the throw, and that only the written registers are passed to shader preparation.
  • agc_interpolant_mapping gains OpenAGC's vectors with equal defaults (0x625, 0x01380107, 0x02480220, 0x03680709), the throw with unequal defaults and no writes, the no-input shader writing nothing, and the rejections.

Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, full build including libs: agc_interpolant_mapping and guest_shader_link 3/3; ctest -j8 -E "^agc_driver_|^video_out_flip" 513/513; tools/check_conventions.py --base main and git diff --check pass. Not run on Linux, and no title run.

Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5799640130 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3364). Originally posted by [screamm](https://github.com/screamm) on 2026-10-11T09:03:48Z. --- The libSceAgc export `sceAgcUnknown_vieBRwlh1Lw` (NID `vieBRwlh1Lw`, no aerolib name; ps5rs and REmu call it `sceAgcUpdateInterpolantMapping`, but that name hashes to a different NID) is a `NotImplemented_nid_no_patch` stub. Hollow Knight: Silksong (PPSA12544) imports it (#699). **Fix branch ready:** [`screamm:feat/agc-vieBRwlh1Lw`](https://github.com/screamm/AnyPS5/tree/feat/agc-vieBRwlh1Lw) (`b1ca8cb9`, one commit on `main` `0c617bae`). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is. - Source: OpenAGC `game_compat.c` and `tests/test_shader.c` (`3c7e8072`): the export 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. The change adds a `fillIdentityTail` flag to `CreateInterpolantMapping` in `Shader/src/InterpolantMapping.cpp`; the two existing exports are unchanged. One disagreement is left throwing: for `is_f16` 1 or 3 inputs OpenAGC fills the 2-bit default-value field from `default_value_hi` (its own vectors `0x01380107`, `0x03680709` confirm it) while the repo's `dbOlWdppb4o`, KytyPS5 and sharpemu use `default_value`, so the new export throws when the two differ. A script comparing both transforms over the 786,432 uncontested combinations found no other difference. TechnicalDebt records the OpenAGC-only source, the throw, and that only the written registers are passed to shader preparation. - `agc_interpolant_mapping` gains OpenAGC's vectors with equal defaults (`0x625`, `0x01380107`, `0x02480220`, `0x03680709`), the throw with unequal defaults and no writes, the no-input shader writing nothing, and the rejections. **Tested** on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`, full build including `libs`: `agc_interpolant_mapping` and `guest_shader_link` 3/3; `ctest -j8 -E "^agc_driver_|^video_out_flip"` 513/513; `tools/check_conventions.py --base main` and `git diff --check` pass. Not run on Linux, and no title run. Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
blawesom commented 2026-10-11 09:52:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T09:52:37Z.


Independent verification on Linux (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON.

  • Rebased b1ca8cb9 onto current main (the branch was 142 commits behind): one conflict in docs/dev/TechnicalDebt.md, resolved by keeping both this entry and main's newer entries; no code conflicts.
  • tools/check_conventions.py --base origin/main and git diff --check pass.
  • agc_interpolant_mapping and guest_shader_link pass.
  • Full suite mirroring the Windows run (ctest -j8 -E "^agc_driver_|^video_out_flip"): 520/520 passed.

The rebased branch is available at blawesom:verify/3364 for anyone carrying — the commit is otherwise unchanged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107767508 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3364#issuecomment-6107767508). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-11T09:52:37Z. --- Independent verification on **Linux** (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`. - Rebased `b1ca8cb9` onto current `main` (the branch was 142 commits behind): one conflict in `docs/dev/TechnicalDebt.md`, resolved by keeping both this entry and main's newer entries; no code conflicts. - `tools/check_conventions.py --base origin/main` and `git diff --check` pass. - `agc_interpolant_mapping` and `guest_shader_link` pass. - Full suite mirroring the Windows run (`ctest -j8 -E "^agc_driver_|^video_out_flip"`): **520/520 passed**. The rebased branch is available at [`blawesom:verify/3364`](https://github.com/blawesom/AnyPS5/tree/verify/3364) for anyone carrying — the commit is otherwise unchanged.
ArekatlaNishanthchowdary commented 2026-10-11 17:44:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by ArekatlaNishanthchowdary on 2026-10-11T17:44:11Z.


Rebased branch ready: ArekatlaNishanthchowdary:feat/agc-vieBRwlh1Lw (040fd74bb), @screamm's commit on current main (a11c8f7f7) with authorship kept. The only conflict was the appended line in TechnicalDebt.md; both entries are kept.

Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release:

  • Full ctest: only guest_kernel_sys (#3510), windows_exceptions (#3411), agc_driver_emulated_color_compare and guest_filesystem (#3518) fail, the same as unmodified main on this host. tools/check_conventions.py --base origin/main passes. No title or homebrew run. Linux not run.

My one open-PR slot is taken by #3744, so I will open this as a PR once that is merged or closed. Anyone eligible is welcome to carry it sooner.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111850184 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3364#issuecomment-6111850184). Originally posted by [ArekatlaNishanthchowdary](https://github.com/ArekatlaNishanthchowdary) on 2026-10-11T17:44:11Z. --- Rebased branch ready: [`ArekatlaNishanthchowdary:feat/agc-vieBRwlh1Lw`](https://github.com/ArekatlaNishanthchowdary/AnyPS5/tree/feat/agc-vieBRwlh1Lw) (`040fd74bb`), @screamm's commit on current `main` (`a11c8f7f7`) with authorship kept. The only conflict was the appended line in `TechnicalDebt.md`; both entries are kept. Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release: - Full `ctest`: only `guest_kernel_sys` (#3510), `windows_exceptions` (#3411), `agc_driver_emulated_color_compare` and `guest_filesystem` (#3518) fail, the same as unmodified `main` on this host. `tools/check_conventions.py --base origin/main` passes. No title or homebrew run. Linux not run. My one open-PR slot is taken by #3744, so I will open this as a PR once that is merged or closed. Anyone eligible is welcome to carry it sooner. AI-assisted: yes (Claude Code).
Sign in to join this conversation.
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#3364
No description provided.