dri: add backbuffer use flag
[mesa.git] / src / egl / drivers / dri2 / egl_dri2.h
index 0e837b3eb8bf03043626050b60848a3493eefbf6..52ad92b182d300070bda41570fee97dd7bc9caee 100644 (file)
 #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
@@ -145,6 +149,8 @@ struct dri2_egl_display_vtbl {
    EGLBoolean (*get_sync_values)(_EGLDisplay *display, _EGLSurface *surface,
                                  EGLuint64KHR *ust, EGLuint64KHR *msc,
                                  EGLuint64KHR *sbc);
+
+   __DRIdrawable *(*get_dri_drawable)(_EGLSurface *surf);
 };
 
 struct dri2_egl_display
@@ -158,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;
@@ -190,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
@@ -203,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
@@ -324,9 +335,15 @@ dri2_setup_screen(_EGLDisplay *disp);
 EGLBoolean
 dri2_load_driver_swrast(_EGLDisplay *disp);
 
+EGLBoolean
+dri2_load_driver_dri3(_EGLDisplay *disp);
+
 EGLBoolean
 dri2_create_screen(_EGLDisplay *disp);
 
+__DRIdrawable *
+dri2_surface_get_dri_drawable(_EGLSurface *surf);
+
 __DRIimage *
 dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data);