UPSTREAM: virgl: Fix flush in virgl_encoder_inline_write.

The current code is buggy: if there are only 12 dwords left in cbuf,
we emit a zero data length command which will be rejected by virglrenderer.
Fix it by calling flush in this case.

Reviewed-by: Dave Airlie <>
(cherry-picked from commit 04e278f79334c36f2afa315d3dcfcbec055a4d2a)


Change-Id: Ie952ece5e31ee94c5fb7e6ecb3e1de807a21763b
Commit-Ready: Lepton Wu <>
Tested-by: Lepton Wu <>
Reviewed-by: Gurchetan Singh <>
1 file changed