Mesa (master): Fix missing dri2_load_driver on platform_drm
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 11 19:42:09 UTC 2019
Module: Mesa
Branch: master
Commit: 2c1983f75767765686e8308a5841c5c26b5a0348
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c1983f75767765686e8308a5841c5c26b5a0348
Author: Jean Hertel <jean.hertel at hotmail.com>
Date: Tue Sep 10 21:00:07 2019 +0200
Fix missing dri2_load_driver on platform_drm
Signed-off-by: Jean Hertel <jean.hertel at hotmail.com>
Acked-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
---
src/egl/drivers/dri2/platform_drm.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index f2491054fe6..7b13129ee3a 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -739,6 +739,21 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
disp->Device = dev;
dri2_dpy->driver_name = strdup(dri2_dpy->gbm_dri->driver_name);
+ dri2_dpy->is_render_node = drmGetNodeTypeFromFd(dri2_dpy->fd) == DRM_NODE_RENDER;
+
+ /* render nodes cannot use Gem names, and thus do not support
+ * the __DRI_DRI2_LOADER extension */
+ if (!dri2_dpy->is_render_node) {
+ if (!dri2_load_driver(disp)) {
+ err = "DRI2: failed to load driver";
+ goto cleanup;
+ }
+ } else {
+ if (!dri2_load_driver_dri3(disp)) {
+ err = "DRI3: failed to load driver";
+ goto cleanup;
+ }
+ }
dri2_dpy->dri_screen = dri2_dpy->gbm_dri->screen;
dri2_dpy->core = dri2_dpy->gbm_dri->core;
More information about the mesa-commit
mailing list