summaryrefslogtreecommitdiff
path: root/xserver/glamor
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2020-01-26 13:48:57 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2020-01-26 13:48:57 +0000
commit0b585b26e75f318c4a2ca0194181cefd303394c3 (patch)
tree22678ed2f03b9b1523708ae540eb797ce58eb29f /xserver/glamor
parent9a275cbecce88b0cbe38f434bd0e09a6632d329b (diff)
Update to xserver 1.20.7 plus 2 extra fixes from upstream. ok jsg@
Diffstat (limited to 'xserver/glamor')
-rw-r--r--xserver/glamor/glamor.c1
-rw-r--r--xserver/glamor/glamor.h2
-rw-r--r--xserver/glamor/glamor_egl.c16
3 files changed, 19 insertions, 0 deletions
diff --git a/xserver/glamor/glamor.c b/xserver/glamor/glamor.c
index b1c7d9f13..a6cc798f8 100644
--- a/xserver/glamor/glamor.c
+++ b/xserver/glamor/glamor.c
@@ -624,6 +624,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
epoxy_gl_version() >= 30 ||
epoxy_has_gl_extension("GL_NV_pack_subimage");
glamor_priv->has_dual_blend =
+ glamor_priv->glsl_version >= 130 &&
epoxy_has_gl_extension("GL_ARB_blend_func_extended");
glamor_priv->can_copyplane = (gl_version >= 30);
diff --git a/xserver/glamor/glamor.h b/xserver/glamor/glamor.h
index 09e9c895c..3f9d265db 100644
--- a/xserver/glamor/glamor.h
+++ b/xserver/glamor/glamor.h
@@ -395,6 +395,8 @@ extern _X_EXPORT Bool
struct gbm_bo *bo,
Bool used_modifiers);
+extern _X_EXPORT const char *glamor_egl_get_driver_name(ScreenPtr screen);
+
#endif
extern _X_EXPORT void glamor_egl_screen_init(ScreenPtr screen,
diff --git a/xserver/glamor/glamor_egl.c b/xserver/glamor/glamor_egl.c
index 366991d2c..b77f676da 100644
--- a/xserver/glamor/glamor_egl.c
+++ b/xserver/glamor/glamor_egl.c
@@ -688,6 +688,22 @@ glamor_get_modifiers(ScreenPtr screen, uint32_t format,
#endif
}
+_X_EXPORT const char *
+glamor_egl_get_driver_name(ScreenPtr screen)
+{
+#ifdef GLAMOR_HAS_EGL_QUERY_DRIVER
+ struct glamor_egl_screen_private *glamor_egl;
+
+ glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen));
+
+ if (epoxy_has_egl_extension(glamor_egl->display, "EGL_MESA_query_driver"))
+ return eglGetDisplayDriverName(glamor_egl->display);
+#endif
+
+ return NULL;
+}
+
+
static Bool
glamor_egl_destroy_pixmap(PixmapPtr pixmap)
{