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. 6
      src/virgl_egl_context.c

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

Loading…
Cancel
Save