Mesa (master): egl/drm: use dri2_setup_extensions() over the extensions provided by GBM
Emil Velikov
evelikov at kemper.freedesktop.org
Mon May 29 15:52:26 UTC 2017
Module: Mesa
Branch: master
Commit: 90d0ad14ca900aeedf1ae9bbff32266067a33b6e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=90d0ad14ca900aeedf1ae9bbff32266067a33b6e
Author: Emil Velikov <emil.velikov at collabora.com>
Date: Thu May 11 16:34:47 2017 +0100
egl/drm: use dri2_setup_extensions() over the extensions provided by GBM
Allows us to keep things in sync easier and lets us simplify the
interface between the two even further.
v2: Don't set GBM's extensions.
Cc: Rob Herring <robh at kernel.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Tested-by: Rob Herring <robh at kernel.org>
---
src/egl/drivers/dri2/platform_drm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 80e824f3d5..0e16d520bd 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -716,12 +716,8 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
dri2_dpy->dri_screen = dri2_dpy->gbm_dri->screen;
dri2_dpy->core = dri2_dpy->gbm_dri->core;
dri2_dpy->dri2 = dri2_dpy->gbm_dri->dri2;
- dri2_dpy->fence = dri2_dpy->gbm_dri->fence;
- dri2_dpy->image = dri2_dpy->gbm_dri->image;
- dri2_dpy->flush = dri2_dpy->gbm_dri->flush;
dri2_dpy->swrast = dri2_dpy->gbm_dri->swrast;
dri2_dpy->driver_configs = dri2_dpy->gbm_dri->driver_configs;
- dri2_dpy->interop = dri2_dpy->gbm_dri->interop;
dri2_dpy->gbm_dri->lookup_image = dri2_lookup_egl_image;
dri2_dpy->gbm_dri->lookup_user_data = disp;
@@ -737,6 +733,11 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
dri2_dpy->gbm_dri->base.surface_release_buffer = release_buffer;
dri2_dpy->gbm_dri->base.surface_has_free_buffers = has_free_buffers;
+ if (!dri2_setup_extensions(disp)) {
+ err = "DRI2: failed to find required DRI extensions";
+ goto cleanup;
+ }
+
dri2_setup_screen(disp);
if (!drm_add_configs_for_visuals(drv, disp)) {
More information about the mesa-commit
mailing list