DRI2: Add event buffer head as an argument to driCreateNewDrawable().
authorKristian Høgsberg <krh@sasori.boston.redhat.com>
Mon, 10 Mar 2008 01:16:30 +0000 (21:16 -0400)
committerKristian Høgsberg <krh@sasori.boston.redhat.com>
Mon, 10 Mar 2008 01:16:30 +0000 (21:16 -0400)
The DRI driver needs to know where in the buffer to start reading.

include/GL/internal/dri_interface.h
src/mesa/drivers/dri/common/dri_util.c

index a815c28dbc9d6e5607e2e87380f4092a61221c9f..0cd9f944dd05cb12032f868b82355877b05520dd 100644 (file)
@@ -482,6 +482,7 @@ struct __DRIscreenRec {
                               const __GLcontextModes *modes,
                               __DRIdrawable *pdraw,
                               drm_drawable_t hwDrawable,
+                              unsigned int head,
                               int renderType, const int *attrs);
 
     /**
index 59224c6651fb02ed2b4330435feb30d35994b423..733cfae165036bc1b87ed12825698bc441e544f7 100644 (file)
@@ -49,6 +49,7 @@ static void *driCreateNewDrawable(__DRIscreen *screen,
                                  const __GLcontextModes *modes,
                                   __DRIdrawable *pdraw,
                                  drm_drawable_t hwDrawable,
+                                 unsigned int head,
                                   int renderType, const int *attrs);
 
 static void driDestroyDrawable(__DRIdrawable *drawable);
@@ -552,13 +553,13 @@ static void *driCreateNewDrawable(__DRIscreen *screen,
                                  const __GLcontextModes *modes,
                                  __DRIdrawable *pdraw,
                                  drm_drawable_t hwDrawable,
+                                 unsigned int head,
                                  int renderType,
                                  const int *attrs)
 {
     __DRIscreenPrivate *psp;
     __DRIdrawablePrivate *pdp;
 
-
     pdraw->private = NULL;
 
     /* Since pbuffers are not yet supported, no drawable attributes are
@@ -612,7 +613,7 @@ static void *driCreateNewDrawable(__DRIscreen *screen,
     pdp->swapBuffers = psp->DriverAPI.SwapBuffers;
 
     if (psp->dri2.enabled) {
-       pdp->dri2.tail = 0;
+        pdp->dri2.tail = head;
        pdp->pBackClipRects = _mesa_malloc(sizeof *pdp->pBackClipRects);
     }