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 <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Ryan Neph 3 years ago
parent d989e5bbbe
commit 7b5dd3eb47
  1. 1
      src/vrend_renderer.c

@ -11051,6 +11051,7 @@ vrend_renderer_pipe_resource_set_type(struct vrend_context *ctx,
if (!gr) if (!gr)
return ENOMEM; return ENOMEM;
virgl_format = gr->base.format;
drm_format = 0; drm_format = 0;
if (virgl_gbm_convert_format(&virgl_format, &drm_format)) { if (virgl_gbm_convert_format(&virgl_format, &drm_format)) {
vrend_printf("%s: unsupported format %d\n", __func__, virgl_format); vrend_printf("%s: unsupported format %d\n", __func__, virgl_format);

Loading…
Cancel
Save