The AMD field log answers itself, and AMF reports its real bitrate #406

Merged
enricobuehler merged 10 commits from worktree-amd-program-wave2 into main 2026-08-27 09:20:47 +00:00
Owner

Wave 2 of the Windows-host-on-AMD program (punktfunk-planning, branch
design/windows-amd-host-program — §3.1–§3.3 plus the §7/§7b addenda). Triggered by the
2026-08-26 RX 7700 XT report; everything here is vendor-neutral except the AMF changes.

Scope note. This branch originally also carried the 08-22 ABR review's four items —
the ABR overhaul (#399–#404) landed them on main first, independently and in better form.
The merge commit resolves every one of those conflicts to main's side and deletes my
duplicates, so what remains below is only what main does not have.

Telemetry: a stalling log stops needing us to interpret it

  • Every capture session stamps its GPU-priority posture (rt_gpu_driver / rt_gpu_host)
    at open. Those fields previously printed only inside the metronomic WARN, so the 7700 XT
    log — which never tripped a metronome — carried no way to tell which levers were engaged.
  • Repeated stalls without a stable period now WARN, carrying the same triage payload the
    metronomic arms carry (tallies, suspects, both levers). That log had 6 stall-sized holes in
    8 s and stayed at DEBUG. Window logic is pure and unit-tested
    (stall_rate_warn_window_and_rewarn).
  • CONTENT-SILENCE stops overselling benignity. A one-off is a game hitch; repeated holes
    under load are equally a frozen presenter (disturbance-immunity Flavor 3), and every probe
    we run sits at the host's own elevated GPU priority, so normal-band starvation reads healthy.
  • Doc drift: PUNKTFUNK_GPU_PRIORITY_CLASS documented as high (its actual default since
    v0.28.0) instead of auto; PUNKTFUNK_IDD_ADAPTIVE documented, including that 0 also
    disables the ABR climb-refusal; troubleshooting names the REALTIME lever as the first check
    and mentions the new warning.

AMF: the encoder reports what it actually does

  • applied_bitrate_bps implemented via a GetProperty readback (typing the vtable slot
    that was already there). Without it the host adopted the requested rate, so
    encoder_ceiling_kbps was never learned and the ABR overdrive guard was structurally inert
    on the one backend with no other rate feedback. Proven on VCN3 silicon:
    open Some(2000000) → retarget Some(8000000) (amf_applied_bitrate_readback_live).
  • Optional-property rejections log at INFO and the encode-active line carries
    ltr/intra_refresh, so the VCN capability matrix accumulates from field logs instead of
    lab hardware we do not own.
  • AV1 B-pictures pinned off. H.264 already pins BPicturesPattern=0 ("RDNA3+ defaults

    0"); AV1's three B-picture properties are VCN5 features whose defaults are 0/false today.
    AV1 is the one AMD codec with neither LTR nor intra-refresh, so a reordering surprise would
    land where it hurts most. HEVC needs no twin — AMF defines no B-frame property for it at all
    (header-verified), and a VCN3 capture measured 3 I + 52 P + 0 B. The live smoke test now
    asserts AUs leave in submit order, so a silently-declined pin fails the test instead of
    shipping reordered output.

Also

  • A wire-MTU-re-keyed session stops blaming the display. Lab sessions over an overlay hop
    (udp_mtu=1336) drew the "host/display disturbance" warning at 1.7 s — just outside both
    client-cooldown bands — while the real cause was the path black-holing full-size video until
    the re-key. The send thread (which owns the packetizer) publishes wire_rekeys, and that arm
    now names the constrained path and points at PUNKTFUNK_WIRE_MTU.
  • The adl-emul probe stops exiting silently. It enumerated 15 adapters, walked zero
    connectors and exited 0 with no explanation; it now records every skipped adapter shape, and
    its read-only Probe walks headless AMD adapters (the lab rung is a headless iGPU). That
    answered the standing question: consumer Adrenalin serves the whole EDID-management API
    (ADL_OK — no Pro-gating at the call level); the Raphael iGPU simply reports
    EDIDManagement_Caps supported=0, so the edid_lock ladder needs an RDNA3/RDNA4 part.

Verification

  • Windows CI (windows-host.yml) green pre-merge; cargo check -p punktfunk-host clean on
    .173 after the main merge.
  • On .173: all 7 AMF live tests green on real VCN3 silicon, including the new readback and
    no-reordering assertions.
  • 494 punktfunk-core tests green post-merge (main's four new ABR tests included); clippy clean.
  • Live sessions driven end-to-end against the box on both the NVENC and the AMF path
    (SessionPlan { encoder: Amf }, first AU in a 2.8 s bringup), with the new lines observed in
    host.log.
Wave 2 of the Windows-host-on-AMD program (`punktfunk-planning`, branch `design/windows-amd-host-program` — §3.1–§3.3 plus the §7/§7b addenda). Triggered by the 2026-08-26 RX 7700 XT report; everything here is vendor-neutral except the AMF changes. > **Scope note.** This branch originally also carried the 08-22 ABR review's four items — > the ABR overhaul (#399–#404) landed them on main first, independently and in better form. > The merge commit resolves every one of those conflicts to main's side and deletes my > duplicates, so what remains below is only what main does not have. ## Telemetry: a stalling log stops needing us to interpret it - **Every capture session stamps its GPU-priority posture** (`rt_gpu_driver` / `rt_gpu_host`) at open. Those fields previously printed only inside the metronomic WARN, so the 7700 XT log — which never tripped a metronome — carried no way to tell which levers were engaged. - **Repeated stalls without a stable period now WARN**, carrying the same triage payload the metronomic arms carry (tallies, suspects, both levers). That log had 6 stall-sized holes in 8 s and stayed at DEBUG. Window logic is pure and unit-tested (`stall_rate_warn_window_and_rewarn`). - **CONTENT-SILENCE stops overselling benignity.** A one-off is a game hitch; repeated holes under load are equally a frozen *presenter* (disturbance-immunity Flavor 3), and every probe we run sits at the host's own elevated GPU priority, so normal-band starvation reads healthy. - Doc drift: `PUNKTFUNK_GPU_PRIORITY_CLASS` documented as `high` (its actual default since v0.28.0) instead of `auto`; `PUNKTFUNK_IDD_ADAPTIVE` documented, including that `0` also disables the ABR climb-refusal; troubleshooting names the REALTIME lever as the first check and mentions the new warning. ## AMF: the encoder reports what it actually does - **`applied_bitrate_bps` implemented** via a `GetProperty` readback (typing the vtable slot that was already there). Without it the host adopted the *requested* rate, so `encoder_ceiling_kbps` was never learned and the ABR overdrive guard was structurally inert on the one backend with no other rate feedback. Proven on VCN3 silicon: `open Some(2000000) → retarget Some(8000000)` (`amf_applied_bitrate_readback_live`). - **Optional-property rejections log at INFO** and the encode-active line carries `ltr`/`intra_refresh`, so the VCN capability matrix accumulates from field logs instead of lab hardware we do not own. - **AV1 B-pictures pinned off.** H.264 already pins `BPicturesPattern=0` ("RDNA3+ defaults > 0"); AV1's three B-picture properties are VCN5 features whose defaults are 0/false *today*. AV1 is the one AMD codec with neither LTR nor intra-refresh, so a reordering surprise would land where it hurts most. HEVC needs no twin — AMF defines no B-frame property for it at all (header-verified), and a VCN3 capture measured 3 I + 52 P + 0 B. The live smoke test now asserts AUs leave in submit order, so a silently-declined pin fails the test instead of shipping reordered output. ## Also - **A wire-MTU-re-keyed session stops blaming the display.** Lab sessions over an overlay hop (`udp_mtu=1336`) drew the "host/display disturbance" warning at 1.7 s — just outside both client-cooldown bands — while the real cause was the path black-holing full-size video until the re-key. The send thread (which owns the packetizer) publishes `wire_rekeys`, and that arm now names the constrained path and points at `PUNKTFUNK_WIRE_MTU`. - **The `adl-emul` probe stops exiting silently.** It enumerated 15 adapters, walked zero connectors and exited 0 with no explanation; it now records every skipped adapter shape, and its read-only Probe walks headless AMD adapters (the lab rung is a headless iGPU). That answered the standing question: consumer Adrenalin serves the whole EDID-management API (`ADL_OK` — no Pro-gating at the call level); the Raphael iGPU simply reports `EDIDManagement_Caps supported=0`, so the `edid_lock` ladder needs an RDNA3/RDNA4 part. ## Verification - Windows CI (`windows-host.yml`) green pre-merge; `cargo check -p punktfunk-host` clean on .173 **after** the main merge. - On .173: all 7 AMF **live** tests green on real VCN3 silicon, including the new readback and no-reordering assertions. - 494 `punktfunk-core` tests green post-merge (main's four new ABR tests included); clippy clean. - Live sessions driven end-to-end against the box on both the NVENC and the AMF path (`SessionPlan { encoder: Amf }`, first AU in a 2.8 s bringup), with the new lines observed in `host.log`.
enricobuehler added 9 commits 2026-08-27 08:23:44 +00:00
- Every capture session stamps a 'GPU-priority posture' INFO line (both REALTIME
  opt-ins) at open, so a stalling log carries the levers even when no WARN fires.
- Repeated stalls WITHOUT a stable period now WARN with the full triage payload
  (tallies, suspects, levers) — the 2026-08-26 7700 XT log had 6 holes in 8 s and
  zero guidance because only the metronomic arms spoke.
- CONTENT-SILENCE prose stops overselling benignity: a frozen presenter
  (disturbance-immunity Flavor 3) reads identically, and our probes all run at the
  host's elevated GPU priority.
- Native AMF implements applied_bitrate_bps via a GetProperty readback (typed the
  existing vtable slot), so encoder_ceiling learning / the ABR overdrive guard stop
  being inert on AMD; optional-property rejections log at INFO and the encode-active
  line carries ltr/intra_refresh — the VCN capability matrix builds itself from
  field logs.
- Doc drift: PUNKTFUNK_GPU_PRIORITY_CLASS default is high (not auto) everywhere it
  is described; PUNKTFUNK_IDD_ADAPTIVE documented; troubleshooting names the
  REALTIME-lever first step and the new repeating-stall warning.

Design: punktfunk-planning design/windows-amd-host-program.md §3.1–§3.3 wave 2.
First .173 run: 15 logical adapters enumerated, zero connectors walked, exit 0,
no explanation — a probe whose deliverable is an rc must never end silent. One
record per distinct (bus, vendor, present) shape before the filter.
The 2026-08-26 lab sessions over an overlay hop (udp_mtu 1336) produced the
'host/display disturbance' warn at period 1.7 s — just outside both client
cooldown bands — while the real cause was the path black-holing full-size video
until the re-key. Period alone cannot make this call; the session's transport
context can. New first-priority arm: wire_rekeys > 0 names the constrained path
and points at PUNKTFUNK_WIRE_MTU.
08-22 ABR review §2.1: the stream-shape cap was computed once from the Welcome
mode and never again, so a 4K→720p switch kept authorizing 4K-sized climbs for
the whole session (only the reactive loss/decode signals reined them in). The
mode-gen site now recomputes the cap from the accepted mode (depth/chroma are
session-negotiated and ride along) and rebind_stream_cap clamps an already-
learned ceiling down to it. Up-switches lift only the cap — with no untrimmed
measurement stored, a higher ceiling would be evidence-free (§3.3 re-probe owns
that half). Pinned by a_mode_switch_rebind_clamps_the_learned_ceiling_but_never_raises_it.
08-22 ABR review §2.4: a full resolve ack plus a corrective short retarget in
the same 750 ms report window collapsed to whichever arrived last — host-cap
learning needs two consecutive short acks, so a lost correction delayed or
prevented the cap and could reintroduce the overdrive sawtooth. Bounded queue
(8), drained fully per window.
fix(encode/amf): pin AV1 B-pictures off, and assert no-reordering on the bitstream
ci / docs-drift (pull_request) Successful in 47s
ci / bun-nix (pull_request) Successful in 1m19s
ci / web (pull_request) Successful in 1m27s
ci / docs-site (pull_request) Successful in 1m27s
apple / swift (pull_request) Successful in 2m13s
apple / distribute (pull_request) Skipped
apple / screenshots (pull_request) Skipped
android / android (pull_request) Canceled after 2m51s
ci / rust-arm64 (pull_request) Canceled after 2m42s
ci / rust (pull_request) Canceled after 2m42s
windows-client / client (x64, , x86_64-pc-windows-msvc, C:\t) (pull_request) Successful in 6m47s
windows-client / client (arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (pull_request) Successful in 4m8s
2cd5787ed6
H.264 already pins BPicturesPattern=0 ('RDNA3+ defaults > 0'). AV1's three
B-picture properties are VCN5 features (AMF header, verified 2026-08-26) whose
defaults are 0/false today — but a default that flips on newer silicon is
exactly how H.264 grew them, and AV1 is the one AMD codec with no LTR and no
intra-refresh, so a reordering surprise lands on the codec that can least afford
it. Optional sets: pre-VCN5 drivers decline the names, which is the right no-op.
HEVC needs no twin — AMF defines no B-frame property for it at all, and a VCN3
capture measured 3 I + 52 P + 0 B.

The live smoke test now asserts AUs leave in submit order, so a driver that
silently declines a pin fails the test instead of shipping reordered output.
enricobuehler added 1 commit 2026-08-27 08:27:06 +00:00
Merge main — the ABR review's four items landed there first (#399-#404)
ci / bun-nix (pull_request) Successful in 42s
ci / docs-drift (pull_request) Successful in 38s
ci / web (pull_request) Successful in 1m9s
ci / rust-arm64 (pull_request) Successful in 1m49s
ci / docs-site (pull_request) Successful in 2m23s
android / android (pull_request) Successful in 7m2s
ci / rust (pull_request) Successful in 15m41s
5da68ab858
Phases 1+2 of the ABR overhaul implemented review §2.1/§2.2/§2.3/§2.4 while this
branch was doing the same, so every ABR conflict resolves to main's side and my
duplicates are deleted:

- abr.rs: main folds the mode-switch rebind into set_stream_cap itself (a
  `mode_switch` flag) instead of a second method — my rebind_stream_cap and its
  test are removed; main's a_mode_switch_reteaches_the_stream_cap_both_ways
  covers strictly more (up-switch, re-authorize, down-switch, disabled).
- pump.rs / control_task.rs / data.rs: main's ack queue and stream-cap recompute
  are the same shape; taken wholesale.
- stream.rs: main's §2.2/§2.3 arms taken (its gap cast saturates, mine did not).

What this branch still carries is what main does not: the capture-stall telemetry
(posture line, repeated-stall WARN, CONTENT-SILENCE prose), the AMF work
(applied_bitrate_bps readback, accepted-props logging, AV1 B-picture pin,
no-reordering assertion), the adl-emul probe fixes, and the wire-MTU-re-key
attribution arm.
enricobuehler force-pushed worktree-amd-program-wave2 from bdce03b839 to 5da68ab858 2026-08-27 08:27:06 +00:00 Compare
enricobuehler changed title from The AMD field log answers itself, AMF reports its real bitrate, and four ABR truths land to The AMD field log answers itself, and AMF reports its real bitrate 2026-08-27 08:27:56 +00:00
enricobuehler merged commit 8358f9ed37 into main 2026-08-27 09:20:47 +00:00
enricobuehler deleted branch worktree-amd-program-wave2 2026-08-27 09:20:57 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#406