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