Skip to content

feat(video): decode PyroWave on the console - #19

Merged
broslife merged 6 commits into
mainfrom
feat/pyrowave
Nov 19, 2026
Merged

broslife merged 6 commits into
mainfrom
feat/pyrowave

Conversation

@broslife

@broslife broslife commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Plan D14 and §10: PyroWave on NVK, measured against the X1's GPU before it is offered to players.

What changes

  • toolchain/patches/pyrowave-sys, a new crate leg. The monorepo writes empty bindings for pyrowave-sys on Horizon, so the PyroWave lane had no C API on the console. The leg is the crate at PUNKTFUNK_REV with a Horizon arm:

    • a dlfcn.h whose lookups all fail (only volk includes it; Granite takes the title's vkGetInstanceProcAddr);
    • clock_nanosleep, which newlib lacks, for Granite's timer;
    • __SWITCH__ in RenderDoc's platform check.

    The leg goes once the monorepo builds the crate for Horizon (LEG.md).

  • The console build turns the lane on beside NVDEC (pf-nx-platform/src/console/pyro.rs). The codec row offers PyroWave only where the device probe finds its compute features, and the host picks it only when the player asks for it, so Automatic stays on NVDEC.

  • A pyrowave[10s] log line: pictures, Mb/s, and parse, record and GPU time, each mean and max, plus the decoder's own stage times. Each picture is waited on before it is published so that the GPU time is measured.

  • Automatic's ceiling stays at 20 Mb/s on the console whatever the lane, so HEVC's Automatic does not change.

Checked

  • scripts/cargo-nx.sh check -p pf-nx in the toolchain image, with pyrowave-sys built through CMake and bindgen for Horizon.
  • On the host image: cargo fmt --check, clippy on the workspace and on pf-nx-host --features pyrowave, and cargo test --workspace.

Not yet

  • The NRO link, which needs NVK: this PR's CI builds it.
  • The console run, handheld 720p60 at a pinned rate of about 30 Mb/s. First the log's pyrowave: lane built, device capable … line, then the pyrowave[10s] lines.
  • How core weighs the 20 Mb/s ceiling against PyroWave's quality floor under Automatic is unchecked; the test pins the rate.

broslife and others added 6 commits November 18, 2026 21:50
The monorepo writes empty bindings for pyrowave-sys on Horizon, so the
PyroWave lane has no C API on the console. The leg is the crate at
PUNKTFUNK_REV with a Horizon arm: newlib's missing dlfcn.h and
clock_nanosleep come from horizon/, and RenderDoc's header learns
__SWITCH__. The leg goes once the monorepo builds the crate for Horizon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The console build turns the PyroWave lane on, offered only where the
device probe finds its compute features; the host picks it only when the
player asks for it. Each picture is waited on before it is published, so
a pyrowave[10s] line logs parse, record and GPU time. Automatic's
ceiling stays at 20 Mb/s on the console whatever the lane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The title's link failed with posix_memalign (Granite's aligned
allocator) and dlclose (libloading) undefined. newlib declares the
first and devkitA64's libc leaves it out, so it goes through memalign;
the dl calls fail every load, as Horizon has no dynamic loader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first console launch aborted on an instruction fetch at the start.
volk defines a global function-pointer variable under each Vulkan
command's name, NVK the functions under the same names, and the title's
vkGetInstanceProcAddr bound to volk's variable, so the first Vulkan call
jumped into data. The leg renames volk's 767 globals to pf_volk_* in
every archive of the crate, so their own references still meet and the
vk names are NVK's again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening a PyroWave stream faulted in Granite's first thread_local
store, set_thread_logging_interface. cmake-rs replaces the flags of
devkitPro's Switch.cmake, which carry -ftls-model=local-exec, and under
-fPIC with -mtp=soft the store came out as `str x1, [x0, x0]`, the
variable's offset lost to the thread pointer. The leg puts the model
back on the C and C++ flags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pin moved to 0fc1b6c, version 0.47.0, and the leg kept 0.46.0. The
crate itself is unchanged between the two revs; the leg takes the new
version and names the rev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@broslife
broslife marked this pull request as ready for review November 19, 2026 01:28
@broslife
broslife merged commit c3a195d into main Nov 19, 2026
2 checks passed
@broslife
broslife deleted the feat/pyrowave branch November 19, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant