What the guest observes changes. Before, each copy the host makes for itself
between a surface's device cache, its shapes, its wide home and its pages took
the platform's answer to each command with go_on(), so a refused one changed
nothing of the caches' state. A shape whose write-back was refused was marked
written back, a refused fill marked its shape filled and the cache at the new
generation, and a SURFACE_DOWNLOAD whose copy into the pages was refused was
answered RGFX_STATUS_OK over the pages' older bytes, and never copied again.
Now each such copy folds its commands' answers, by the ruling that keeps
today's behaviour for the guest's own commands alone, and a refused one, or an
encoder the platform made not, leaves what it was to move as not copied:
- A shape whose write-back was refused stays dirty, and one whose fill was
refused owes it still. A refused fill of the buffer leaves the cache at its
older generation.
- A download whose copy into the pages was refused, or that waits for a copy
that landed short (a refused later round of one that circulates its pieces),
is answered failed (RGFX_STATUS_REFUSED) through the driver's existing path,
where it was answered OK on stale bytes before. The cache stays written, so
the next download copies it again. A refused copy's pieces put none of their
bytes into the pages.
- A fill or a copy into a wide home refused at a command buffer's begin, and a
write's copy into its plane's other shapes or a copy between a cache and its
home refused at its encoder's end, fails that command buffer with
MTLCommandBufferErrorOutOfMemory, as a cache's refused memory already does.
- An early copy refused is not made, its command buffer not committed, and the
refill it carried no longer marks the buffer as holding the pages; that also
holds where the platform refuses a copy by runs, which left it so before.
The host tries none of these again by itself: the next use, download or
release that needs the copy makes it. Each refusal is counted under
surface-copy-refused, the process's first logged at warn. The guest's own
blits and draws still go on past a refused command.
No rt-refused or rt-unbuilt code shows in the degradation counts of the 30
latest kept boot logs, so no boot has reached these paths so far.
Five new fake-platform tests, red before (m3-max-78078, all five failed), pass
with the fix: the reims-vgpu fake set (m3-max-78128, 1170 passed, 115 skipped)
and its surface, shape and command buffer rt tests on the 5080 (m3-max-78131,
31 passed).