egl_dri2: make flush extension useable by drm platform
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Wed, 25 Jan 2012 14:24:15 +0000 (16:24 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 27 Mar 2012 12:28:07 +0000 (08:28 -0400)
src/egl/drivers/dri2/platform_drm.c
src/gbm/backends/dri/gbm_dri.c
src/gbm/backends/dri/gbm_driint.h

index 3dc2c40c4e66cc229b17bdc247ce247fa80080dc..bd3d1e0c2c26a0f67b1c60d322a0fdfb7d217315 100644 (file)
@@ -141,6 +141,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
    dri2_dpy->core = dri2_dpy->gbm_dri->core;
    dri2_dpy->dri2 = dri2_dpy->gbm_dri->dri2;
    dri2_dpy->image = dri2_dpy->gbm_dri->image;
+   dri2_dpy->flush = dri2_dpy->gbm_dri->flush;
    dri2_dpy->driver_configs = dri2_dpy->gbm_dri->driver_configs;
 
    dri2_dpy->gbm_dri->lookup_image = dri2_lookup_egl_image;
index 98f14cd53439b60d028bcf6177cfe86e8a02aa37..1e02287651cdc75b5c1e0e7acb643881558b38b1 100644 (file)
@@ -70,6 +70,7 @@ struct dri_extension_match {
 };
 
 static struct dri_extension_match dri_core_extensions[] = {
+   { __DRI2_FLUSH, 1, offsetof(struct gbm_dri_device, flush) },
    { __DRI_IMAGE, 1, offsetof(struct gbm_dri_device, image) },
    { NULL, 0, 0 }
 };
index c5b5e17a4eefa587a08704ccf8cde774a4549c02..d801a081375245097be72402ed1309db9a00fb61 100644 (file)
@@ -46,6 +46,7 @@ struct gbm_dri_device {
    __DRIcoreExtension   *core;
    __DRIdri2Extension   *dri2;
    __DRIimageExtension  *image;
+   __DRI2flushExtension *flush;
 
    const __DRIconfig   **driver_configs;
    const __DRIextension *extensions[3];