summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.h
diff options
context:
space:
mode:
authorBoyan Ding <boyan.j.ding@gmail.com>2015-07-21 23:44:00 +0800
committerMartin Peres <martin.peres@linux.intel.com>2015-11-17 17:26:20 +0200
commitf35198badeb956a8f435727d805a47c7e42610d0 (patch)
tree055cc089ff20ad8101c632f4c2d9612f1c7684bf /src/egl/drivers/dri2/egl_dri2.h
parenta25df5457121d40fef86929d4c10d8058a4d5c72 (diff)
downloadexternal_mesa3d-f35198badeb956a8f435727d805a47c7e42610d0.zip
external_mesa3d-f35198badeb956a8f435727d805a47c7e42610d0.tar.gz
external_mesa3d-f35198badeb956a8f435727d805a47c7e42610d0.tar.bz2
egl/x11: Implement dri3 support with loader's dri3 helper
v2: From Martin Peres - Tell we are compiling the dri3 backend in configure.ac - Update the Makefile.am - get rid of the LIBDRM_HAS_RENDERNODE_SUPPORT macro - fix some warnings related to EGLuint64KHR to int64_t conversions - use dri2_get_dri_config to get the __DRIconfig instead of open-coding it - replace the occasional tabs with spaces v3: From Martin Peres - fix and indent problem (Matt Turner) - drop the authenticate function, use NULL in the vtable instead (Emil) - drop some useless includes (Emil Velikov) - mandate libdrm (Emil Velikov) - link to xcb-dri3 (Kristian Høgsberg) - convert to the new loader interface for drwable (Kristian) - remove some dead code after the dropping of some vfuncs (Kristian) - add a comment on the topic of rendering to the frontbuffer v4: From Martin Peres - do not expose the preserved swap behavior (Acked by Eric Anholt) Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Signed-off-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index c3c9fc0..52ad92b 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -35,6 +35,10 @@
#include <xcb/dri2.h>
#include <xcb/xfixes.h>
#include <X11/Xlib-xcb.h>
+
+#ifdef HAVE_DRI3
+#include "loader_dri3_helper.h"
+#endif
#endif
#ifdef HAVE_WAYLAND_PLATFORM
@@ -160,6 +164,7 @@ struct dri2_egl_display
const __DRIconfig **driver_configs;
void *driver;
const __DRIcoreExtension *core;
+ const __DRIimageDriverExtension *image_driver;
const __DRIdri2Extension *dri2;
const __DRIswrastExtension *swrast;
const __DRI2flushExtension *flush;
@@ -192,6 +197,9 @@ struct dri2_egl_display
#ifdef HAVE_X11_PLATFORM
xcb_connection_t *conn;
int screen;
+#ifdef HAVE_DRI3
+ struct loader_dri3_extensions loader_dri3_ext;
+#endif
#endif
#ifdef HAVE_WAYLAND_PLATFORM
@@ -205,8 +213,9 @@ struct dri2_egl_display
int formats;
uint32_t capabilities;
int is_render_node;
- int is_different_gpu;
#endif
+
+ int is_different_gpu;
};
struct dri2_egl_context
@@ -327,6 +336,9 @@ EGLBoolean
dri2_load_driver_swrast(_EGLDisplay *disp);
EGLBoolean
+dri2_load_driver_dri3(_EGLDisplay *disp);
+
+EGLBoolean
dri2_create_screen(_EGLDisplay *disp);
__DRIdrawable *