From 7b5dd3eb47b82db16d8ab51a03b6cda8625fa8e9 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Wed, 16 Jun 2021 23:59:51 +0000 Subject: [PATCH] vrend: fix failing GBM format lookup in vrend_renderer_pipe_resource_set_type() vrend_renderer_pipe_resource_set_type() called for VIRGL_RESOURCE_FD_DMABUF resources fail during virgl to GBM format conversion due to an uninitialized variable. Signed-off-by: Ryan Neph Reviewed-by: Gert Wollny --- src/vrend_renderer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 61af5ea..50c5682 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -11051,6 +11051,7 @@ vrend_renderer_pipe_resource_set_type(struct vrend_context *ctx, if (!gr) return ENOMEM; + virgl_format = gr->base.format; drm_format = 0; if (virgl_gbm_convert_format(&virgl_format, &drm_format)) { vrend_printf("%s: unsupported format %d\n", __func__, virgl_format);