[dri2] Add tail pointer to reemitDrawableInfo callback.
authorKristian Høgsberg <krh@redhat.com>
Tue, 4 Mar 2008 00:08:26 +0000 (19:08 -0500)
committerKristian Høgsberg <krh@redhat.com>
Tue, 4 Mar 2008 00:16:20 +0000 (19:16 -0500)
When the DRI doesn't parse the event buffer for a while, the X server
may overwrite data that the driver didn't get a chance to look at.  The
reemitDrawableInfo callback requests that the X server reemit all info
for the specified drawable.  To make use of this, the drive needs to know
the new tail pointer so it know where to start reading from.

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

index 175ff2d3affb8f5b02f5fe950056e41c36ab5aba..a815c28dbc9d6e5607e2e87380f4092a61221c9f 100644 (file)
@@ -424,8 +424,9 @@ struct __DRIcoreDRI2ExtensionRec {
      * specified drawable in the DRI2 event buffer.
      *
      * \param draw the drawable for which to request info
+     * \param tail the new event buffer tail pointer
      */
-    void (*reemitDrawableInfo)(__DRIdrawable *draw);
+    void (*reemitDrawableInfo)(__DRIdrawable *draw, unsigned int *tail);
 
 };
 
index 72836538830fc9e9c8b44941150a0ae6a44f3e8f..59224c6651fb02ed2b4330435feb30d35994b423 100644 (file)
@@ -303,7 +303,7 @@ __driParseEvents(__DRIscreenPrivate *psp, __DRIdrawablePrivate *pdp)
        * server overwrote it and we have to reset our tail
        * pointer. */
        DRM_UNLOCK(psp->fd, psp->lock, pcp->hHWContext);
-       (*psp->dri2.core->reemitDrawableInfo)(pdp->pdraw);
+       (*psp->dri2.core->reemitDrawableInfo)(pdp->pdraw, &pdp->dri2.tail);
        DRM_LIGHT_LOCK(psp->fd, psp->lock, pcp->hHWContext);
     }