vrend: Don't try to deref gbm if it was not initialized

minigbm allocations being enabled does not imply that GBM is also
initialized, e.g. if the renderer uses a GLX context, so don't try
to dereference gbm.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: John Bates <jbates@chromium.org>
macos/master
Gert Wollny 3 years ago
parent 138b8ad95a
commit edf38395d6
  1. 2
      src/vrend_renderer.c

@ -10949,7 +10949,7 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c
} }
#ifdef ENABLE_MINIGBM_ALLOCATION #ifdef ENABLE_MINIGBM_ALLOCATION
if (has_feature(feat_memory_object) && has_feature(feat_memory_object_fd)) { if (gbm && has_feature(feat_memory_object) && has_feature(feat_memory_object_fd)) {
if (!strcmp(gbm_device_get_backend_name(gbm->device), "i915") && if (!strcmp(gbm_device_get_backend_name(gbm->device), "i915") &&
!vrend_winsys_different_gpu()) !vrend_winsys_different_gpu())
caps->v2.capability_bits |= VIRGL_CAP_ARB_BUFFER_STORAGE; caps->v2.capability_bits |= VIRGL_CAP_ARB_BUFFER_STORAGE;

Loading…
Cancel
Save