egl/wayland: don't populate dri2_dpy->swrast_loader_extension
[mesa.git] / src / egl / drivers / dri2 / egl_dri2.h
index ef799398474368f0ba73d8efb11e1e40cfebdd03..f51c3c6bbdf47d6f5fc2f19c204f420bc95aadb0 100644 (file)
@@ -143,6 +143,10 @@ struct dri2_egl_display_vtbl {
    EGLint (*query_buffer_age)(_EGLDriver *drv, _EGLDisplay *dpy,
                               _EGLSurface *surf);
 
+   EGLBoolean (*query_surface)(_EGLDriver *drv, _EGLDisplay *dpy,
+                               _EGLSurface *surf, EGLint attribute,
+                               EGLint *value);
+
    struct wl_buffer* (*create_wayland_buffer_from_image)(
                         _EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *img);
 
@@ -174,10 +178,14 @@ struct dri2_egl_display
    const __DRI2configQueryExtension *config;
    const __DRI2fenceExtension *fence;
    const __DRI2rendererQueryExtension *rendererQuery;
+   const __DRI2interopExtension *interop;
    int                       fd;
 
+   /* dri2_initialize/dri2_terminate increment/decrement this count, so does
+    * dri2_make_current (tracks if there are active contexts/surfaces). */
+   int                       ref_count;
+
    int                       own_device;
-   int                       swap_available;
    int                       invalidate_available;
    int                       min_swap_interval;
    int                       max_swap_interval;
@@ -186,7 +194,6 @@ struct dri2_egl_display
    struct gbm_dri_device    *gbm_dri;
 #endif
 
-   char                     *device_name;
    char                     *driver_name;
 
    __DRIdri2LoaderExtension    dri2_loader_extension;
@@ -197,6 +204,7 @@ struct dri2_egl_display
 #ifdef HAVE_X11_PLATFORM
    xcb_connection_t         *conn;
    int                      screen;
+   int                      swap_available;
 #ifdef HAVE_DRI3
    struct loader_dri3_extensions loader_dri3_ext;
 #endif
@@ -212,9 +220,10 @@ struct dri2_egl_display
    int                      authenticated;
    int                      formats;
    uint32_t                  capabilities;
-   int                      is_render_node;
+   char                     *device_name;
 #endif
 
+   int              is_render_node;
    int                      is_different_gpu;
 };
 
@@ -285,12 +294,17 @@ struct dri2_egl_surface
 #ifdef HAVE_ANDROID_PLATFORM
    struct ANativeWindow *window;
    struct ANativeWindowBuffer *buffer;
+   __DRIimage *dri_image;
 
    /* EGL-owned buffers */
    __DRIbuffer           *local_buffers[__DRI_BUFFER_COUNT];
 #endif
-};
 
+#if defined(HAVE_SURFACELESS_PLATFORM)
+      __DRIimage           *front;
+      unsigned int         visual;
+#endif
+};
 
 struct dri2_egl_config
 {
@@ -359,6 +373,10 @@ dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
                      _EGLContext *ctx, EGLenum target,
                      EGLClientBuffer buffer, const EGLint *attr_list);
 
+_EGLImage *
+dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
+                         EGLClientBuffer buffer, const EGLint *attr_list);
+
 EGLBoolean
 dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp);