vrend: set resource size for minigbm allocation

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
macos/master
Yiwei Zhang 3 years ago
parent 767037c0d0
commit fad66514d6
  1. 4
      src/vrend_renderer.c

@ -7179,6 +7179,10 @@ static void vrend_resource_gbm_init(struct vrend_resource *gr, uint32_t format)
else else
gr->map_info = VIRGL_RENDERER_MAP_CACHE_WC; gr->map_info = VIRGL_RENDERER_MAP_CACHE_WC;
int num_planes = gbm_bo_get_plane_count(bo);
for (int plane = 0; plane < num_planes; plane++)
gr->size += gbm_bo_get_plane_size(bo, plane);
if (!virgl_gbm_gpu_import_required(gr->base.bind)) if (!virgl_gbm_gpu_import_required(gr->base.bind))
return; return;

Loading…
Cancel
Save