egl: remove the compile time check for EGL_MESA_drm_image

The define EGL_MESA_drm_image is always set by the required version of
libepoxy, and since the availability of the extension EGL_MESA_drm_image
is driver dependend the run-time test in virgl_egl_init is sufficient.

Thanks to Emil Velikov for giving me the heads up about this EGL extension
stuff.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 6 years ago committed by Jakob Bornecrantz
parent bf87b3cfb1
commit d85c54f60d
  1. 8
      src/virgl_egl_context.c

@ -385,8 +385,9 @@ int virgl_egl_get_fd_for_texture(struct virgl_egl *ve, uint32_t tex_id, int *fd)
&offset);
if (!b)
goto out_destroy;
} else {
#ifdef EGL_MESA_drm_image
} else {
/* No need to check have_mesa_drm_image, because if we come here
* it is supported (imposed by virgl_egl_init) */
EGLint handle;
int r;
b = eglExportDRMImageMESA(ve->egl_display,
@ -402,9 +403,6 @@ int virgl_egl_get_fd_for_texture(struct virgl_egl *ve, uint32_t tex_id, int *fd)
r = drmPrimeHandleToFD(ve->fd, handle, DRM_CLOEXEC, fd);
if (r < 0)
goto out_destroy;
#else
goto out_destroy;
#endif
}
ret = 0;
out_destroy:

Loading…
Cancel
Save