DRI2: Return event buffer head index in DRI2CreateDrawable.
And pass it to the DRI driver in AIGLX.
This commit is contained in:
parent
911f0c1476
commit
acedc03367
|
@ -704,7 +704,7 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
|
||||||
(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
|
(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
|
||||||
modes,
|
modes,
|
||||||
&private->driDrawable,
|
&private->driDrawable,
|
||||||
hwDrawable, 0, NULL);
|
hwDrawable, 0, 0, NULL);
|
||||||
|
|
||||||
if (private->driDrawable.private == NULL) {
|
if (private->driDrawable.private == NULL) {
|
||||||
__glXenterServer(GL_FALSE);
|
__glXenterServer(GL_FALSE);
|
||||||
|
|
|
@ -341,6 +341,7 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
|
||||||
__GLXDRIdrawable *private;
|
__GLXDRIdrawable *private;
|
||||||
GLboolean retval;
|
GLboolean retval;
|
||||||
drm_drawable_t hwDrawable;
|
drm_drawable_t hwDrawable;
|
||||||
|
unsigned int head;
|
||||||
|
|
||||||
private = xalloc(sizeof *private);
|
private = xalloc(sizeof *private);
|
||||||
if (private == NULL)
|
if (private == NULL)
|
||||||
|
@ -359,13 +360,14 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
|
||||||
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
||||||
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
|
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
|
||||||
|
|
||||||
retval = DRI2CreateDrawable(screen->pScreen, pDraw, &hwDrawable);
|
retval = DRI2CreateDrawable(screen->pScreen, pDraw,
|
||||||
|
&hwDrawable, &head);
|
||||||
|
|
||||||
private->driDrawable.private =
|
private->driDrawable.private =
|
||||||
(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
|
(driScreen->driScreen.createNewDrawable)(&driScreen->driScreen,
|
||||||
modes,
|
modes,
|
||||||
&private->driDrawable,
|
&private->driDrawable,
|
||||||
hwDrawable, 0, NULL);
|
hwDrawable, head, 0, NULL);
|
||||||
|
|
||||||
return &private->base;
|
return &private->base;
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,8 +262,8 @@ DRI2CloseScreen(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
DRI2CreateDrawable(ScreenPtr pScreen,
|
DRI2CreateDrawable(ScreenPtr pScreen, DrawablePtr pDraw,
|
||||||
DrawablePtr pDraw, drm_drawable_t *pDrmDrawable)
|
drm_drawable_t *pDrmDrawable, unsigned int *head)
|
||||||
{
|
{
|
||||||
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
|
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
@ -293,6 +293,7 @@ DRI2CreateDrawable(ScreenPtr pScreen,
|
||||||
|
|
||||||
*pDrmDrawable = pPriv->drawable;
|
*pDrmDrawable = pPriv->drawable;
|
||||||
|
|
||||||
|
*head = ds->buffer->head;
|
||||||
DRI2PostDrawableConfig(pDraw);
|
DRI2PostDrawableConfig(pDraw);
|
||||||
DRI2PostBufferAttach(pDraw);
|
DRI2PostBufferAttach(pDraw);
|
||||||
DRI2ScreenCommitEvents(ds);
|
DRI2ScreenCommitEvents(ds);
|
||||||
|
|
|
@ -66,7 +66,8 @@ void DRI2Unlock(ScreenPtr pScreen);
|
||||||
|
|
||||||
Bool DRI2CreateDrawable(ScreenPtr pScreen,
|
Bool DRI2CreateDrawable(ScreenPtr pScreen,
|
||||||
DrawablePtr pDraw,
|
DrawablePtr pDraw,
|
||||||
drm_drawable_t *pDrmDrawable);
|
drm_drawable_t *pDrmDrawable,
|
||||||
|
unsigned int *head);
|
||||||
|
|
||||||
void DRI2DestroyDrawable(ScreenPtr pScreen,
|
void DRI2DestroyDrawable(ScreenPtr pScreen,
|
||||||
DrawablePtr pDraw);
|
DrawablePtr pDraw);
|
||||||
|
|
Loading…
Reference in New Issue