Files
reims-vgpu/crates
Anees Iqbal 082c30e6b1 🆕 Let a deferral carry its surface's few resident pages
VTDecoderXPCService writes page 0 of each new decoder output before its first
decode, the output's other pages not resident (measured on the 780M in a macOS
26 guest: all 208 pool surfaces of a 4K HEVC session in Safari). A deferral
takes only a surface none of whose pages is resident, so each decoder output
had its 12 MiB wired and filled with zeros at its first ask: 5 to 7 ms of the
guest's on the 780M and about 3 ms on the 5080, for each of the seventeen or
more surfaces a 4K60 playback's start makes.

The host now offers SURFACE_DEFERRED_CARRY (FEATURES_HI bit 0, feature bit 32)
where it offers either deferral. A guest that takes it may defer such a
surface carrying its resident pages: the deferral's runs are the surface's
bytes in order, each run of pages not resident RGFX_PAGE_RUN_ZEROS. The host
makes the cache of zeros as for any deferral and owes a first fill of the
carried pages, as a new cache owes one of its pages: copied in through a
staging buffer after the zeros on the transfer queue, before what reads the
cache next, or taken as met where a decode writes the planes whole first. The
carried pages are watched until the block's pages are named.

A deferral with runs is refused as INVALID_ARGUMENT where the guest did not
take the bit, or where its runs are not whole guest pages summing to the
surface's bytes, lie outside the guest's RAM, or carry none.

What the guest reads changes: FEATURES_HI offers bit 32 where either deferral
is offered, and the test that held the feature words changes with it. The
wire header's new constants move the option ROM's and both guest sets' records
of their sources; their bytes stay.
2026-11-08 23:17:07 -08:00
..