summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2008-03-09 21:16:30 -0400
committerKristian Høgsberg <[email protected]>2008-03-09 21:16:30 -0400
commit0bba0e5be7a4a7275dad1edc34bdcc134ea1f424 (patch)
treea9a2470c38645bb923d21f71cf01993e58dd2d35
parent810e0549afad45469bef532c1f2d355f3fde0bbb (diff)
DRI2: Add event buffer head as an argument to driCreateNewDrawable().
The DRI driver needs to know where in the buffer to start reading.
-rw-r--r--include/GL/internal/dri_interface.h1
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index a815c28dbc9..0cd9f944dd0 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -482,6 +482,7 @@ struct __DRIscreenRec {
const __GLcontextModes *modes,
__DRIdrawable *pdraw,
drm_drawable_t hwDrawable,
+ unsigned int head,
int renderType, const int *attrs);
/**
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 59224c6651f..733cfae1650 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -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);
}