A picture whose landing in its output's device caches ran past the
hardware's deadline (a stall) was signalled with the caches never acquired:
the backend kept the work, which may still write them, and the device's
reads of the caches came after the signal with no acquire of what the
hardware wrote, then or later. The guest's next command buffer read them
regardless.
Each arm now takes a mark on the landing's thread before the hardware call
that may stall (VA-API's sync of a decode into a cache, and its video
processing's write into one; NVDEC's copies into CUDA's imports of the
caches), and a stalled landing (Landing::failed_in_caches) waits for the
work its thread kept since the mark to be let go, the device done with it,
then acquires the caches and signals the failure. The VA-API arm drops the
frame first, which keeps its target where its pool stalled. The wait is
bounded: STALL_HOLD, 10 s on the session's clock, past the hardware's own
5 s; past it the process dies at a fault of the decode, since the caches can
be neither read before their acquire nor waited for unbounded.
For the guest: a stalled decode's command buffer completes failed, as before,
once the hardware is done with the caches rather than at once, with the
caches acquired, so its reads and the next picture's see what the hardware
left; a hardware that is not done 15 s after the frame's first wait ends the
process. A stall that kept nothing (a decoder stalled on an earlier frame,
which writes nothing more) is acquired at once. Tests:
a_failed_landing_in_a_cache_says_it_written_before_its_signal (its stall now
acquired before the signal),
a_stalled_landing_in_a_cache_says_it_written_once_its_kept_work_is_let_go,
a_stalled_landing_whose_kept_work_is_not_let_go_ends_the_process.