8002 Commits
Author SHA1 Message Date
千川白浪 f827f4c3e5 packaging: omit MSYS2 sources and symbols on default alpha previews [skip ci] 2026-12-05 01:12:44 -07:00
千川白浪 1aa6a2f701 packaging: exclude qemu-system-aarch64w, strip ARM64/restore binaries, enable zstd --long=27 [skip ci] 2026-12-05 00:54:31 -07:00
千川白浪 4121508711 ci: throttle upstream sync, deduplicate artifacts, and bound compiler cache 2026-12-05 00:28:17 -07:00
千川白浪 4cca3b9020 Merge pull request #21 from reims-go/windows-runtime-pack-fixes
windows-runtime: pack patches with binary files and mode changes
2026-12-05 13:51:23 +08:00
NwflowerandClaude Opus 5.5 2c64ad41aa windows-runtime: keep the patch queue empty
Leave the reims-vgpu performance patch and the QEMU prealloc patch out of
the series: their changes go to their own repositories as reviewed pull
requests, and the prebuilt kexts are rebuilt from reviewed sources. The
packer's handling of binary hunks and index modes stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 22:46:13 -07:00
千川白浪 456be59b47 Merge pull request #14 from yxc0915/codex/runtime-publish-cache
Cache Windows runtime builds and batch MSYS2 package metadata
2026-12-05 13:44:38 +08:00
Xiaochi You 55e2902258 Merge pull request #17 from yxc0915/steelbrain/restore-pci-gpu-name
🐛 Restore the host GPU name in System Information
2026-12-04 22:52:39 +08:00
YXC0915 2d100e48da 🐛 Restore the host GPU name in System Information
Publish the host GPU name as the guest's PCI model so System Information
can display the actual chipset name.

Keep the x86-64 Metal name and vendor compatibility rules used by
WindowServer and applications. Cover the PCI name in the guest tests
and regenerate both prebuilt kext sets.
2026-12-04 22:42:15 +08:00
sitxovski f13f143001 windows-runtime: pack patches with binary files and mode changes
- pack-runtime.ps1 reads a patch's paths from its "diff --git" headers,
  so binary files (prebuilt kexts) are declared too, and compares
  "index" lines without their file mode.
- series.txt: the local performance patch for reims-vgpu and the
  multithreaded Windows prealloc patch for vendor/qemu.
2026-12-04 16:58:34 +03:00
YXC0915 4f31eee07b Route native Ninja compiler calls through ccache
Windows searches the launching executable directory before PATH. Stage the CI copy of Ninja alongside the installed ccache shims and point ccache at the original CLANG64 toolchain. Log the detailed compiler counters.
2026-12-04 19:27:10 +08:00
YXC0915 9a8a776418 Cache Windows runtime compilation and batch MSYS2 package lookups
Reuse compiler objects and Cargo downloads across Alpha jobs, then link and package the exact runtime inputs on every build. Query package ownership, versions and licenses in batches and avoid recompressing the uploaded archives.

Checked the workflow with actionlint and checked the MSYS2 lookup with mock and installed-package tests.
2026-12-04 18:45:23 +08:00
Xiaochi You abc65fdbf9 Merge pull request #7 from cosimawei/feat/configurable-input-release-pr
Support configurable SDL input release shortcuts and pointer exit.
2026-12-04 16:06:30 +08:00
YXC0915 d427f1bd86 📝 Register SDL input release settings [ci skip]
List the new configuration switches and the window tests that guard them.
2026-12-04 15:50:25 +08:00
YXC0915 76791eb6b6 Merge current runtime master into capture shortcut validation 2026-12-04 15:47:59 +08:00
YXC0915 4f7c54c458 🆕 Package runtimes from the organization dependency pins [skip ci]
Read the source URLs and revisions directly from the selected runtime. Retire the six patches now in the organization forks and record the resolved URLs in the manifest and source package.
2026-12-03 02:54:20 +08:00
YXC0915 28457772f4 🐛 Isolate Places allocations from buffer address replay
Keep texture blocks in non-replay Vulkan allocations while preserving exact-address replay for captured buffers.
2026-12-03 01:02:03 +08:00
YXC0915 116ef68ae8 🐛 Resolve a working zstd for Windows runtime archives 2026-12-03 01:02:03 +08:00
Xiaochi You 1bc441947c Merge pull request #5 from yxc0915/steelbrain/static-attachment-feedback
🐛 Use static Vulkan attachment feedback for Windows
2026-12-03 00:41:50 +08:00
YXC0915 c0b03faa85 🐛 Use static Vulkan attachment feedback for Windows
Fix the dark desktop after FileVault unlock on RTX A5000 by setting the color attachment feedback flag at pipeline creation. Retain the existing feature gate and the shadow-copy fallback.
2026-12-03 00:40:40 +08:00
hanyewei 5f5995e9fb Configure SDL capture release shortcuts and pointer exit 2026-12-02 23:44:07 +08:00
YXC0915 57024d3ab1 Handle retired maintenance refs during Alpha publication [ci skip]
A branch rename can remove the ref while a runtime build is running. Keep the verified artifact and skip automatic publication when Git succeeds with no match. Preserve the checks for a failed query or a superseded commit.
2026-12-02 19:41:01 +08:00
YXC0915 e8083c97ea 🐛 Update maintenance branch references [ci skip]
Keep automation and documentation aligned with the renamed branch.
The source pins and build steps stay the same.
2026-12-02 19:27:53 +08:00
YXC0915 3bbf37b149 Build Windows runtimes with the AMD Vulkan startup fixes
Apply the GPU address carry and dynamic attachment feedback backports after the snapshot replay patch. The runtime source archive records both patches alongside their pinned upstream base.
2026-12-02 18:59:10 +08:00
YXC0915 98f1677b5f 🆕 Select Alpha versions by suspend compatibility [ci skip]
Publish the version planner and compatibility manifest contract.
Wait for a new runtime baseline before building the next Alpha.
2026-12-02 03:22:02 +08:00
YXC0915 9a6ace7a3a 📝 Define Alpha suspend compatibility versions [ci skip]
Document patch revisions, compatibility boundaries, and the client
validation required to restore older saved state.
2026-12-02 02:47:03 +08:00
YXC0915 add539cd0f 🐛 Replace unfinished Alpha builds on push
Cancel older builds only for new automatic updates. Resolve stale
dispatches before taking the build lock and check published versions
inside it so queued runs skip work that already finished.
2026-12-02 02:05:31 +08:00
YXC0915 3cb5384b33 🆕 Build and publish Alpha on runtime changes
Build a new Alpha when packaging inputs change and queue an Alpha for
each upstream merge into the runtime maintenance branch.
2026-12-02 01:57:47 +08:00
Xiaochi You ca116e4f36 🆕 Automate merging upstream updates into the maintenance branch 2026-12-01 23:47:03 +08:00
YXC0915 9a57f0644d ci: build runtime previews entirely in the runtime repository 2026-12-01 11:15:55 +08:00
YXC0915 f152e84bba ci: build and publish Windows runtime previews 2026-12-01 10:55:52 +08:00
Anees Iqbal 3731afd9b1 📝 State the preset bar as settled and H.264's miss as its rate [ci skip]
The bar was settled after the run: a slower preset earns its time when it
gains 0.5 dB at one of the two sizes and loses nothing at the other, its
encoder within 3% of P1's rate at both. H.264's P2 and P3 gain 0.78 and
0.92 dB at 2160p but run 3.4% and 6.2% under P1's rate at 1080p, so they
miss on the rate, not the gain; HEVC's P2 and P3 code P1's streams. The
mapping stays at P1.
runtime-3731afd-p3 runtime-3731afd-p4
2026-11-27 16:59:57 -08:00
Anees Iqbal 6319405ea9 📝 Record why NVENC's slower presets don't earn their time [ci skip]
preset_of keeps P1 for the device's middle quality. One host-only run on the
RTX 3090 with the settings AppleGVA's plug-in forces on an x86 guest's encodes
(constant QP, an IDR every 60 frames, no B-frames) found no slower preset that
gains 0.5 dB of luma at equal bits while the encoder stays faster than the
guest round trip at both 1080p and 2160p. AGENTS.md puts a measured platform
fact in the doc of the code that relies on it, so the doc now holds the best
rows, the noisy source's note, HEVC P4 against P1, and which part of the gap to
the host's own P4 encodes is inferred rather than measured.
2026-11-27 16:58:34 -08:00
Anees Iqbal 03c3314845 📝 Record H.264's hard data-rate limit as not held [ci skip]
A 1080p H.264 session in an x86 guest, at 8 Mbit/s with a limit of
1,000,000 bytes a second, runs 18.3% to 19.4% over the limit in its
busiest second on all three vendors. On the XTX the stream is the same,
byte for byte, as the stream without the limit. The guest's H.264
encoder is driven by macOS's AMD path: that path counts the limit but
codes no frame over again, and on our device its planning changes no
frame. The 2019 MacBook Pro's 2.3% is from macOS's Intel path, which
does code frames over again. No AMD-only Mac has been measured, so the
known issue keeps the Mac's number scoped, and B101 records the trigger,
the first step and the unfilled third length-record word as a lead only.

B100 had two claims the same rows now disprove. It said the real Mac ran
at another keyframe interval, but m3-max-77623 ran HEVC at the guest's
interval and stayed under the limit in every second. Its "the plug-in's
default" interval was the probe's 60. The HEVC paragraph in known-issues
said the runs don't compare; they now do, both on macOS's Intel path.
2026-11-27 16:40:57 -08:00
Anees Iqbal 391edf9731 📦 Rebuild both sets and the ROM's record for HEVC encode
make -C guest prebuilt and prebuilt-arm64e, and make -C firmware prebuilt,
from the guest sources and the wire header of the commit before (m3-max-77590,
which also ran the guest's tests and both prebuilt-checks): ReimsGraphics
publishes the HEVC encoder only where the host codes a frame in place, and
RgfxGate carries the Metal bundle, which sends a retried HEVC frame in place
of the last. The ROM's bytes are unchanged; its record follows the wire
header, which gained the in-place flags.
2026-11-27 16:26:01 -08:00
Anees Iqbal 319f54dabb 🆕 Encode an x86-64 guest's HEVC on the host's encoder
An x86-64 guest's hardware HEVC encoding never reached our GPU: macOS's HEVC
encoder plug-in drives only an Intel GPU's driver, found by name, so an app that
required hardware failed at its create (-12908) and others encoded in software
(m3-max-77632, development's set on this host). What the guest sees now, where
the host's video arm lists an HEVC encoder of Main and Main 10 with a constant
QP that codes a frame in place of the last (Linux hosts' VA-API, and NVENC where
its driver codes a frame without advancing its state):

- the accelerator publishes an IntelAccelerator child of its own with
  IOGVAHEVCEncode and IOGVAHEVCEncodeCapabilities (Main and Main 10, up to
  the encoder's level), so VideoToolbox lists a hardware HEVC encoder
  (hevc.gva);
- RgfxGate keeps the Intel driver path the plug-in loads from
  /Library/GPUBundles a hard link to the bundle's executable, at every boot;
- the bundle's video driver takes the plug-in's encode commands (function
  0x20, sub-ID 0x1000), codes each frame on the host (ENCODE_H265) at the QP
  the plug-in's rate control chose, an IRAP picture as a keyframe, Main from
  an 8-bit source and Main 10 from a 10-bit one, and hands back the access
  unit with 4-byte start codes, whose VPS, SPS and PPS make the session's
  format description;
- a frame the plug-in codes again over its data rate limit, at a higher QP,
  is sent in place of the last one (RGFX_VIDEO_ENCODE_IN_PLACE): a P
  picture of the last frame's order count and source surface; a keyframe
  coded again is sent as a new IDR picture;
- a session of a size the host does not encode is refused at its create,
  so an app that allows software encodes in software as before.

A host whose encoder has Main alone gets no nub: VideoToolbox hands the
plug-in a Main 10 session whatever profiles the nub lists, and the driver
learns a session's profile only from its first frame. Nor does one that
codes no frame in place, where a retry would predict from the frame it
replaces. H.264 encode and both decodes are as before on either. The
plug-in's per-CTU QP map (its pool 27) is not applied, and its frame
statistics record is not supplied. The route is macOS 26.7.1's plug-in's,
booted on 26.7.2. Windows hosts list no encoder, so encode in software as
before.

Rows (macOS 26.7.2 guest, 1080p, 300 frames at 8 Mbit/s, decoded back by
VideoToolbox; the rate band is vboot's RATE_BAND_PCT, 6%, both codecs), the
same with the frames in place (m3-max-77615, m3-max-77613, m3-max-77614),
byte for byte but for 205 bytes of the Iris Xe's Main stream:
- RX 7900 XTX (m3-max-77475): Main 105.1%, 45.02 dB; Main 10 104.8%, 45.17 dB
- Iris Xe (m3-max-77476): Main 103.5%, 48.04 dB; Main 10 98.1%, 48.86 dB
- RTX 3090 (m3-max-77477): Main 100.7%, 44.81 dB; Main 10 106.1%, 45.06 dB,
  where NVENC's own lands 104.6%: known-issues and video/bugs.md B97
At a data rate limit of 1 Mbyte a second, the plug-in coded 2 to 30 frames
of a session again, each sent in place: no gap in the order counts, all 300
frames decoded back, and the most bytes in a second 1.7% to 3.0% over the
limit (RX 7900 XTX m3-max-77611, RTX 3090 m3-max-77609, Iris Xe
m3-max-77627; video/bugs.md B100, to be read on a user's report). With a
keyframe every frame the stream comes to 4.1 to 5.0 times the asked rate, as
a real Intel Mac's comes to 5.7 times with the same QPs frame for frame
(m3-max-77635; design.md, known-issues); every frame decodes back.
Main 10 from a retained pool and from the app's own 8-bit buffers decodes as
from the pool taken per frame on all three. A real Intel Mac's hevc.gva
(macOS 26.7.1, m3-max-77481) replaces the session's pool at the third Main 10
frame, as ours does. Speed (Iris Xe, m3-max-77497): 94 to 118 fps at 1080p
against software's 3.3; 10.3 to 10.8 at 8K against 0.5 (B98, B99).

Tests: the kext's publish condition and its pairing with a host that codes
no frame in place (video_codecs_test: the caps of both decoders and encoders
without the flag publish no HEVC encode and the rest as before), the link's
update on real files (rgfxgate alias_test), and the driver's listing, create
refusals, settings, keyframes, write-back, failures, refused sources and the
frames it sends in place, and those it does not: never a keyframe, so a
session of keyframes from one reused surface sends none (video_driver_tests;
m3-max-77590). Development's set on this host (m3-max-77632) encodes H.264 to
the same bytes as this one and decodes as before. Docs: design.md and
devices.md, video/bugs.md B97 to B100, and known-issues.md's HEVC encoding
line, which now says which GPUs encode HEVC for an Intel Mac guest, and its
section on HEVC over the bitrate asked.
2026-11-27 16:26:01 -08:00
Anees Iqbal 80eea13d5d 🆕 Code an encode frame in place of the last one on the host
A guest that drops a frame's access unit and has the same frame coded again
had no way to say so: each encode was a new frame of the stream, coded after
the dropped one and predicting from it. macOS's HEVC encoder plug-in does that
over its data rate limit, at a higher QP, and the stream broke: gaps in its
order counts and VideoToolbox decode errors -17694 on 151 and 166 of 300
frames (macOS 26.7.2 guest, RX 7900 XTX host, m3-max-77530).

What the guest and host observe now:

- the wire: an encode op's flag RGFX_VIDEO_ENCODE_IN_PLACE codes the frame in
  place of the session's last one, from the references the last one was
  coded from, with its order count and frame_index, at the QP the settings
  give now; the caps' RgfxVideoEncodeCaps::flags gains
  RGFX_VIDEO_ENCODE_CAP_IN_PLACE where the host does so (zero from an older
  host);
- VA-API: every encode entry has the flag. The VA crate's encoder holds its
  last picture back from the accelerator's stream (Accelerator::keep) until
  the next frame or a flush, and codes a frame in place again into the same
  reconstructed surface (Encoder::encode_in_place); a stream without B
  pictures or our hard limit, which is every one the x86-64 guest makes;
- NVENC: the flag where NVENC answers NV_ENC_CAPS_DISABLE_ENC_STATE_ADVANCE
  for every profile of the codec and a session of it with a state buffer
  codes a frame, the frame again in place and a frame after it at the
  device's start (checked_in_place); a driver that refuses either leaves it
  off. Such a session codes each frame without advancing NVENC's state and
  takes the state after it (nvEncRestoreEncoderState) as the next frame
  comes (NvencEncoder::new_in_place);
- a frame that cannot be coded in place fails (RGFX_VIDEO_ENCODE_FAILED):
  with no frame to replace, with B pictures, with the VA crate's hard limit,
  of another frame_index, or asking a keyframe in place of a frame that is
  not one. No later frame predicts from the dropped one: on VA-API the next
  is an IDR picture, on NVENC it is coded from the state before the dropped
  one.

A frame without the flag is coded as before; the VA crate keeps its last
picture one frame later, which nothing outside it observes. No guest sends
the flag yet: the x86-64 guest's HEVC route, next, does.

Tests: the codec encoder's frames in place (the stream is the one without the
retry but for its QP; twice in a row; after and of an IDR picture; each
refusal, after which the next frame is an IDR picture), the session handing
the flag to its backend, each arm's caps flag, and on the hardware, frames in
place decoding back on the driver's own decoder (RX 7900 XTX, radeonsi,
m3-max-77595) and on NVDEC above 35 dB (RTX 2080, m3-max-77597; RTX 3090,
m3-max-77618), and the device-start check leaving no NVENC session on its GPU,
which runs alone (.config/nextest.toml): it adds a median of 61.9 ms on the
RTX 2080 and 56.9 ms on the RTX 3090, five checks each.
2026-11-27 16:26:01 -08:00
Anees Iqbal 5f857584b5 ✅ Name each VP9 format stream before it decodes
Clippy allows std::panic::catch_unwind only in the testkit's named places,
and the format-stream test caught each stream's panic to name the stream
that failed. It now prints each stream's name before it decodes it, so a
failure names its stream without a catch, and the test stops at the first
stream that fails.
2026-11-27 16:18:07 -08:00
Anees Iqbal 40dadf7f77 📝 Document VP9 profiles 1 and 3 on arm64 guests [ci skip]
The host now takes VP9's profiles 1 and 3 and profile 2 at 12 bits where the
driver decodes them. devices.md gets a section on which hosts take which, how
the pictures land, the Iris Xe's boots and the 1080p rate; vaapi.md the
surfaces, iHD's lists and its 4:2:2 failure, and the new streams' card runs;
nvidia.md, backends.md and design.md drop the refusal of profiles 1 and 3 they
stated; known-issues.md names the formats each tested GPU decodes.
2026-11-27 16:15:45 -08:00
Anees Iqbal 6816f76f9a 🆕 Decode VP9 profiles 1 and 3 and 12-bit 2 for arm64 guests
An arm64 guest's VideoToolbox hands a VP9 stream of every profile to the
host, and arm64 macOS has no VP9 decoder of its own. The host's dsta refused
profiles 1 and 3 and profile 2 at 12 bits at the session's start (-12910), so
those streams had no player in the guest.

The codec now takes profile 1 (4:2:2 and 4:4:4 at 8 bits), profile 3 (the
same at 10 and 12 bits) and profile 2 at 12 bits. VA-API decodes them on
VAProfileVP9Profile1 to 3 into the surfaces HEVC's range extensions use (P012,
YUY2, Y210, Y212, XYUV, Y410, Y412), and their pictures land in the guest
formats the range extensions already land in (tv20, 422v, x422, tv22, 444v,
x444, tv44). The caps still list profiles 0 and 2, the wire is unchanged, and
no guest format is new: dsta decides from the arm's own answers, naming why
it refuses.

The VA decoder now also refuses, at its configure, a stream whose surfaces
the driver's decoder does not list. iHD's profile 1 and 3 decoders make 4:2:2
render targets but list no 4:2:2 surfaces, and fail every 4:2:2 frame in any
surface (measured on the Iris Xe, job m3-max-77586), so a 4:2:2 stream is
refused at dsta there. NVDEC and radeonsi refuse profiles 1 and 3 and 12
bits by their own answers. 4:4:0 and VP9's RGB colour space are refused by
the codec on every host.

On the Iris Xe under arm64 macOS 26.6.2 and 14.6.1, the guest's pictures of
libvpx's streams of profile 1 at 4:4:4, profile 2 at 12 bits and profile 3 at
4:4:4 at 10 and 12 bits equal vpxdec's frame by frame, and a profile 1 4:4:4
stream at 1080p decodes at 85% of profile 0's rate (job m3-max-77567). The seven
streams (352x288, 20 frames, two superframes each) and vpxdec's MD5s are
committed for the card tests.
2026-11-27 16:09:37 -08:00
Anees Iqbal 8ed3d1e7fd 📝 Name the arm64 guest's 4:2:2 run on NVIDIA as untested [ci skip]
NVDEC's HEVC 4:2:2 decode landed on a proof run on an RTX 5080 Laptop GPU
from the host alone: no arm64 guest has run on that card. bugs.md's untested
list now says so, and when the guest's side is to run: a user's report of
HEVC 4:2:2 on an NVIDIA 50-series host, or an arm64 guest's disk reaching
such a card for another reason.
2026-11-27 16:03:53 -08:00
Anees Iqbal 0b62f02f56 📝 Record the RTX 3090's 4:2:2 refusal by its caps in a boot [ci skip]
A boot of an arm64 macOS 26 guest on the RTX 3090 at the change that takes
HEVC 4:2:2 where NVDEC's caps list it (potluck job m3-max-77572) refused
each 4:2:2 session by the caps' answer and decoded the card's other range
extensions in hardware as before, every picture the same as the guest's
software decode. devices.md quoted the refusal's old wording.
2026-11-27 15:53:08 -08:00
Anees Iqbal 9d69b44da1 🆕 Take HEVC 4:2:2 sessions on NVDEC where its caps list them
What the guest sees: on an arm64 guest of an NVIDIA host whose NVDEC lists
HEVC 4:2:2 at the stream's depth and size, as the RTX 5080 Laptop GPU's
does at 8, 10 and 12 bits, a VideoToolbox session of an HEVC 4:2:2 stream
now decodes on the GPU, each picture copied into the surface's 422v, x422
or tv22 (or full-range twin) with no conversion by the CPU. Its dsta was
refused before, and the guest decoded the stream in software. On a card
whose caps lack it, as the RTX 3090's do, the session is still refused at
its start, and its warning now names the caps ("NVDEC does not decode HEVC
4:2:2 at 10 bits") where it said "NVDEC's decoders here land no HEVC 4:2:2
pictures".

declines_range_extensions takes the caps' answer for 4:2:2 as it does for
4:2:0 and 4:4:4, the decoder's output being NV16 at 8 bits and P216
deeper, and the VideoToolbox decoder checks a picture's chroma format
against the surface's from the picture itself.

Shown on the host, not from a guest on that card: the card test
(an_hevc_picture_lands_in_its_guest_format_as_the_software_decode_has_it)
on the RTX 5080 Laptop GPU decoded our x265 streams of 4:2:2 at 8, 10 and
12 bits through the arm's VideoToolbox decoder into pool-laid surfaces,
every picture byte for byte as ffmpeg's software decode, beside 4:2:0 and
4:4:4 at each depth, and landed 1920x1080 4:2:2 pictures at 344 to 384 a
second (potluck job m3-max-77563). The seam test holds the session-start
decision on the 5080's and the 3090's recorded caps.
2026-11-27 15:43:36 -08:00
Anees Iqbal 6450aee5e8 🆕 Decode HEVC 4:2:2 on NVDEC into NV16 and P216
NVDEC lists HEVC 4:2:2 on newer cards: the RTX 5080 Laptop GPU decodes it
at 8 bits into NV16 and at 10 and 12 bits into P216 (nvidia-probe). The
HEVC accelerator refused every 4:2:2 SPS, as no output of it was mapped.

Make a 4:2:2 decoder for an SPS of chroma_format_idc 2, into NV16 at 8 bits
and P216 deeper, laid out as NV12 and P016 with the chroma as tall as the
luma: a mapped frame's chroma rows start at the crop's first row and are as
many as the luma's (Mapped::of), a decode surface counts twice the luma's
samples, and AnnexBPicture::chroma names a picture's chroma format for its
callers. A card whose caps lack HEVC 4:2:2 still refuses the decoder at
its make.

No guest sees this yet: the graphics arm still refuses HEVC 4:2:2
sessions at their start, and a host video session's decoders refuse the
range extensions.
2026-11-27 15:43:19 -08:00
Anees Iqbal a4e6095322 📝 Name macOS 14.6.1 among the releases AV1 decodes on [ci skip]
The AV1 route had only been checked on arm64 macOS 26.6.2. An arm64 macOS
14.6.1 guest on an RTX 3090 now decodes our svt-main8 stream to its
reference frame by frame, in a session that requires hardware (potluck job
m3-max-77531, at the tree this commit follows). The same boot decoded VP9,
HEVC and H.264 there with no errors. Docs only: nothing changes for the
guest.
2026-11-27 15:24:07 -08:00
Anees Iqbal b5d5caf63a ✅ Give back the release test's own block, not offset 0
The release test took one block for each of contexts 1 to 4 on a fresh piece
and gave back context 1's at offset 0, which holds only when context 1's take
is carved first. It need not be: the zeroer claims a fresh piece's first chunk
last, a take whose first fit holds bytes of the claimed chunk waits for it on
its worker, and the zeroer lets its claim go before it wakes that worker. A
later take carried out in between carves offset 0 at once, so context 1's
block lies past it and the give of offset 0 finds another context's block:
the "not given" a loaded merge run met once.

The test now gives back the block context 1's take answered. A new test forces
that order (a claim set with the zeroer shut, a take waiting for it, the claim
ended, a second context's take): it failed on the old test's give, and holds
with the fix. No behaviour change: the pool carved and answered so before,
and a context's takes are still answered in its order by its one worker. The
"Zeros ahead" doc said a block lies where it would with no zeroer; it now says
what the code does.
2026-11-27 15:15:55 -08:00
Anees Iqbal e5b03f2d8b 🐛 Refuse paravirtual H.264 and HEVC sessions of sizes the host lacks
An arm64 guest's VideoToolbox session of a 4:2:0 H.264, HEVC Main or Main 10
stream whose coded size lies outside the host decoder's own, as HEVC under
NVDEC's least size of 144x144, was started, and its pictures failed in the
host's decoder: NVDEC refuses to make a decoder of that size, and VA-API's
surfaces or context refuse it. A client that allowed software decoding got
failed frames rather than pictures.

For the guest: such a session's dsta is now refused with
kVTVideoDecoderUnsupportedDataFormatErr, its warning naming the stream and the
decoder's sizes, as the x86-64 route refuses it at create (5dfe92be1), and the
guest's VideoToolbox decodes the stream in software. That covers an H.264
stream wider than 4096 on iHD, as 4112x2160: iHD's H.264 config lists
8192x8192 but its surfaces take 4096x4096 at most, so such a session started
and its pictures failed. Streams inside the sizes start as before.

The sizes are each arm's own. On NVDEC, its caps of the codec at 4:2:0 and the
stream's depth: nMinWidth and nMinHeight up to nMaxWidth, nMaxHeight and
nMaxMBCount, the checks its decoder's make runs. On VA-API, the decoder the VA
crate's decoder picks for the stream, whose profile choice the video crate now
exports (h264_decoder_profiles, hevc_main_decoder): from its surfaces' least
size, none where they list none, up to the least of its config's and its
surfaces' largest, and H.264's 65,535 blocks. The range extensions' check takes
that bound too.
2026-11-27 15:14:14 -08:00
Anees Iqbal f09b4f3116 🎨 Take each arm's paravirtual declines from caps it is handed
Both video arms decide at a VideoToolbox session's start whether they decode
its stream: NVDEC by asking its caps of HEVC's range extensions inline, VA-API
from a field of its range extensions configs. The decision is now a function of
the arm's own caps, handed in: NVDEC's through a closure over
decode_capabilities, VA-API's as the driver's decoder configs, which now list
H.264's and HEVC Main and Main 10's too. A size check both arms share,
DecodeSizes (graphics/decode_sizes.rs), holds a decoder's least and largest
sizes and its bound on blocks, and both range extensions checks go through it
with the lines they wrote before.

Nothing changes for the guest or the host: the same streams are declined with
the same reasons, and every 4:2:0 stream is taken as before. The next commit
checks 4:2:0 streams' sizes there.
2026-11-27 15:13:55 -08:00
Anees Iqbal 132868d988 🆕 Offer VP9 decode to arm64 guests
The hosts' drivers list VP9 decode at profiles 0 and 2, and an arm64 macOS
26 guest has no VP9 decoder of its own: every VP9 session fails -12906
without one from the host. The previous commit gave the host VA-API
and NVDEC decoders; this one offers them to the guest.

What the guest sees: the device's video caps gain a VP9 entry, codec 3
(RGFX_VIDEO_CODEC_VP9), where the host's arm decodes VP9, listing profile 0
into NV12 and profile 2 into P010 as the driver answers them, at the arm's
sizes up to 16384 a side, and level 62 (6.2, as vpcC numbers it). On the
paravirtual route (RGFX_FEATURE_VT_MESSAGES) the host then lists a vp09
decoder, reims-vgpu-video.videodecoder.vp9, with those profiles; once a
process registers VP9 (VTRegisterSupplementalVideoDecoderIfAvailable, as on
a Mac) the guest's VideoToolbox decodes VP9 on the host's hardware. A sample
is a frame or a superframe whole, which the host splits. A stream the host
does not decode (profiles 1 and 3, 12 bits) is refused at its session's
start, as an HEVC format the arm lacks is, and the guest has no VP9 decoder
of its own to fall back on: known-issues.md says so. No encoder of VP9 is
listed.

The guest's pictures of the two libvpx streams equal vpxdec's, frame by
frame, on an RX 7900 XTX, an Iris Xe and an RTX 3090 under macOS 26.6.2 and
on the 3090 under macOS 14.6.1, and VP9 decodes as fast as HEVC on the same
route at 1080p and at 8192x4352 (devices.md, with the guest's CPU emulated).

The wire change is additive. An x86-64 guest's kexts read no caps entry past
HEVC's, and the device takes no session of codec 3. An older host's caps
have no VP9 entry, so a newer guest's VideoToolbox lists no vp09; a newer
host's caps list H.264's and HEVC's entries as before, beside VP9's
(vt_decoders_list_vp9_beside_the_others_where_the_caps_decode_it). The
header's hash moves in the option ROM's and both kext sets' source records;
their bytes are unchanged.
2026-11-27 14:57:30 -08:00
Anees Iqbal 4b8d51d09e 🆕 Decode VP9 on VA-API and NVDEC
The hosts' drivers list VP9 decode (radeonsi, iHD and NVDEC at profiles 0
and 2), and the owner's order is to offer the guest what the host lists. This
is the host's half: the decoders. Nothing offers them to a guest yet, so no
guest sees a change.

The codec module (codec/vp9) does on the host what VP9's hardware APIs leave
to the caller: it splits a superframe into its frames, reads each frame's
uncompressed header and keeps what persists between frames (the colour
configuration, the loop filter's deltas, the segmentation's features and the
eight reference slots), derives the quantizer scales and filter levels, and
hands each frame whole to an accelerator that decodes the compressed header
and the tiles. It refuses profiles 1 and 3 and 12 bits before anything
reaches a driver, and a frame that predicts from an empty slot is a picture's
error, after which a key frame decodes. Every field is checked against the
bytes before it is used: the CPU tests feed it truncated and hostile streams
and superframe indexes (the fuzz targets vp9-streams and vp9-samples).

VA-API's arm (vaapi::va::vp9) fills VADecPictureParameterBufferVP9 and the
slice parameters per frame, with a context per run of one format and size.
NVDEC's (nvidia::nvdec::vp9) fills CUVIDVP9PICPARAMS, whose bit-fields are
held in words of our own naming and checked against NVIDIA's header with the
rest of the layout. NVDEC makes a decoder at a frame's exact size, and a
frame that predicts from one of another decoder, a resized stream's, is
refused as a picture's error (bugs.md B96).

Two streams libvpx made from a synthetic source (640x360, profile 0 and
profile 2 at 10 bits, three superframes each) and vpxdec's per-frame MD5s
are committed; the ignored card tests decode them bit-exact on the RX 7900
XTX's radeonsi, the Iris Xe's iHD and the RTX 3090's NVDEC.
2026-11-27 14:57:30 -08:00
Anees Iqbal 5c30529e18 🎨 Build the AV1 helpers only where their callers build
On the Mac target clippy found AV1 helpers dead whose callers build on other
hosts alone. The card tests' judgement, the streams' grain statistics and
the decoder's film grain alteration serve the VA-API and NVIDIA card tests,
which build on Linux; the arms' AV1 limits and declines serve the VA-API and
NVDEC arms, which build on Linux and Windows. Each is now built under the
cfg its callers build under.
2026-11-27 14:50:54 -08:00