mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 01:48:02 +02:00
DRI2: Look for flush extension in screen extensions, not driver extensions
This commit is contained in:
parent
b91597188c
commit
01a443b3b8
1 changed files with 10 additions and 6 deletions
|
|
@ -173,11 +173,11 @@ __glXDRIdrawableSwapBuffers(__GLXdrawable *drawable)
|
|||
__GLXDRIdrawable *priv = (__GLXDRIdrawable *) drawable;
|
||||
__GLXDRIscreen *screen = priv->screen;
|
||||
|
||||
(*screen->flush->flushInvalidate)(priv->driDrawable);
|
||||
|
||||
if (!DRI2SwapBuffers(drawable->pDraw))
|
||||
return FALSE;
|
||||
|
||||
(*screen->flush->flushInvalidate)(priv->driDrawable);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -585,6 +585,14 @@ initializeExtensions(__GLXDRIscreen *screen)
|
|||
LogMessage(X_INFO, "AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __DRI2_FLUSH
|
||||
if (strcmp(extensions[i]->name, __DRI2_FLUSH) == 0 &&
|
||||
extensions[i]->version >= __DRI2_FLUSH_VERSION) {
|
||||
screen->flush = (__DRI2flushExtension *) extensions[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Ignore unknown extensions */
|
||||
}
|
||||
}
|
||||
|
|
@ -647,10 +655,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
|||
extensions[i]->version >= __DRI_DRI2_VERSION) {
|
||||
screen->dri2 = (const __DRIdri2Extension *) extensions[i];
|
||||
}
|
||||
if (strcmp(extensions[i]->name, __DRI2_FLUSH) == 0 &&
|
||||
extensions[i]->version >= __DRI2_FLUSH_VERSION) {
|
||||
screen->flush = (__DRI2flushExtension *) extensions[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (screen->core == NULL || screen->dri2 == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue