The guest now gets right pictures from concurrent decode sessions on a
Windows host. Intel's Direct3D 12 video driver for the UHD Graphics 630
(igd12dxva64.dll 31.0.101.2145) decodes wrong pictures on a device's later
video decode queue while an earlier one lives, and Mesa's vaon12 makes a
queue for each VA context, all on the process's one device. Of two guest
sessions decoding at once, one got wrong pictures.
While a device of ours is held, its ID3D12Device::CreateCommandQueue (the
vtable's slot 8) answers every ask for a video decode queue with one queue
it keeps, a reference added for each asker. Other queue types, and devices
no hold holds, go to the slot's own method. No vendor decides: every device
gets the one queue. The slot gets its own method back when the last hold on
a device with that vtable goes, and the kept queues go with the last hold on
their device.
Measured on the UHD 630, 4K H.264, frames per second in all: one session
25.4-27.4, two 53.2-56.1, four 113.6-116.0 with one queue, against 22.9-26.9,
49.7-52.2 and 101.8-111.9 with a queue each, where the sessions decoding
wrong ran fastest. The new test of two decoders at once passes 3 of 3 with
the one queue and fails without it; the churn test decodes none wrong in 3
runs. docs/video/bugs.md U33 records the driver's bug and the split.