On a GPU that shares the CPU's memory the host keeps a device cache only of
the surfaces whose pages its textures cannot use in place
(SURFACE_CACHE_REFUSED), and it offered no deferral there. So a fresh surface
that needs one had its pages wired and zero-filled by the kext at its first
texture, and copied into the cache once, though the CPU never touched them.
The host now offers SURFACE_DEFERRED_ASK (FEATURES_LO bit 30) beside it,
with the budget a host of a GPU of its own memory gives (DEFERRED_BUDGET, a
quarter of the device-local heap's budget). A deferral then asks with the
surface's layout (DEFERRED with ASK_CACHE and no runs), and the host defers
the block only where the surface would need a cache whatever its pages
(GpuDevice::fresh_surface_never_in_place). Every other is refused with
nothing made and counted, as is one past the budget, so the kext names its
pages asking, as without the feature: a full budget fails safe to today's
wire and ASK_CACHE path.
This is inside the rule that surfaces are used in place, cost and all, only
because these surfaces genuinely cannot be placed in place: their layout
needs a device cache either way (on the Iris, rows ending inside the GPU's
64-byte lines; on the 780M, runs exceeding one udmabuf). So it does not
choose a copy over in place; it only stops eagerly wiring and zero-filling
guest pages the CPU never touches.
What the guest reads changes on a unified-memory host: FEATURES_LO gains
bit 30 and DEFERRED_BUDGET is no longer 0, and the test that held both
changes with them. The wire header's new bit moves the option ROM's and the
guest set's records of their sources; their bytes stay.