mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
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>
(cherry picked from commit 04e278f793)
This commit is contained in:
parent
92e544d96e
commit
47ac26f858
1 changed files with 1 additions and 1 deletions
|
|
@ -524,7 +524,7 @@ int virgl_encoder_inline_write(struct virgl_context *ctx,
|
|||
|
||||
left_bytes = size;
|
||||
while (left_bytes) {
|
||||
if (ctx->cbuf->cdw + 12 > VIRGL_MAX_CMDBUF_DWORDS)
|
||||
if (ctx->cbuf->cdw + 12 >= VIRGL_MAX_CMDBUF_DWORDS)
|
||||
ctx->base.flush(&ctx->base, NULL, 0);
|
||||
|
||||
thispass = (VIRGL_MAX_CMDBUF_DWORDS - ctx->cbuf->cdw - 12) * 4;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue