virgl: Fix flush in virgl_encoder_inline_write.
authorLepton Wu <lepton@chromium.org>
Tue, 17 Jul 2018 01:56:32 +0000 (18:56 -0700)
committerDave Airlie <airlied@redhat.com>
Tue, 17 Jul 2018 04:56:25 +0000 (14:56 +1000)
commit04e278f79334c36f2afa315d3dcfcbec055a4d2a
treea28ef0fe775a6e9b8b0e6cd4333b3e050ff310de
parentb5db3aa6e8173600037b68e7ec4351bd2c1aade4
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.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/virgl/virgl_encode.c