Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virgl: Fix flush in virgl_encoder_inline_write #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From be27e07c6883b0aa23c39d375bf4da15e82869eb Mon Sep 17 00:00:00 2001
From: Junil Kim <[email protected]>
Date: Tue, 30 Apr 2019 09:17:06 +0900
Subject: [PATCH] Preventing a zero data length command case

---
src/gallium/drivers/virgl/virgl_encode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c
index cbe8d19..733da94 100644
--- a/src/gallium/drivers/virgl/virgl_encode.c
+++ b/src/gallium/drivers/virgl/virgl_encode.c
@@ -510,7 +510,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;
--
2.17.1

4 changes: 4 additions & 0 deletions meta-webos/recipes-graphics/mesa/mesa_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ EXTENDPRAUTO_append = "webos1"

FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"

SRC_URI_append_qemuall = " \
file://0001-Preventing-a-zero-data-length-command-case.patch \
"

# Add gallium, gallium-llvmpipe, opengl and enable wayland even without wayland in DISTRO_FEATURES
PACKAGECONFIG_qemuall = "opengl gbm egl gles dri wayland gallium"

Expand Down