server: properly set map_info at blob export

map_info might fail to be initialized if get_map_info failed.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
macos/master
Yiwei Zhang 3 years ago
parent 728effff74
commit 1533b232e6
  1. 6
      server/render_context.c

@ -159,7 +159,11 @@ render_context_export_blob(struct render_context *ctx,
}
uint32_t map_info;
virgl_renderer_resource_get_map_info(res_id, &map_info);
ret = virgl_renderer_resource_get_map_info(res_id, &map_info);
if (ret) {
/* properly set map_info when the resource has no map cache info */
map_info = VIRGL_RENDERER_MAP_CACHE_NONE;
}
uint32_t fd_type;
int res_fd;

Loading…
Cancel
Save