summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-04-06 12:36:15 -0700
committerKeith Packard <keithp@keithp.com>2010-04-06 12:36:15 -0700
commita7698a677682a32960b885c22fdba2add70f4658 (patch)
tree69974832e40853c8b21f44346f862a8dfabce4f4 /glx
parent495cec794dad95ed0c79048f3c410ad23e7d5ea4 (diff)
parent165a4a9c7de0fcc6ef6a6421736b412ccb35965e (diff)
Merge remote branch 'jbarnes/master'
Diffstat (limited to 'glx')
-rw-r--r--glx/glxdri2.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index edd29b0e1..e791bf6bf 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -616,6 +616,7 @@ glxDRILeaveVT (int index, int flags)
static void
initializeExtensions(__GLXDRIscreen *screen)
{
+ ScreenPtr pScreen = screen->base.pScreen;
const __DRIextension **extensions;
int i;
@@ -625,10 +626,17 @@ initializeExtensions(__GLXDRIscreen *screen)
"GLX_MESA_copy_sub_buffer");
LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n");
- /* FIXME: only if DDX supports it */
__glXEnableExtension(screen->glx_enable_bits, "GLX_INTEL_swap_event");
LogMessage(X_INFO, "AIGLX: enabled GLX_INTEL_swap_event\n");
+ if (DRI2HasSwapControl(pScreen)) {
+ __glXEnableExtension(screen->glx_enable_bits,
+ "GLX_SGI_swap_control");
+ __glXEnableExtension(screen->glx_enable_bits,
+ "GLX_MESA_swap_control");
+ LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n");
+ }
+
for (i = 0; extensions[i]; i++) {
#ifdef __DRI_READ_DRAWABLE
if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) {
@@ -639,19 +647,6 @@ initializeExtensions(__GLXDRIscreen *screen)
}
#endif
-#ifdef __DRI_SWAP_CONTROL
- if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) {
- screen->swapControl =
- (const __DRIswapControlExtension *) extensions[i];
- __glXEnableExtension(screen->glx_enable_bits,
- "GLX_SGI_swap_control");
- __glXEnableExtension(screen->glx_enable_bits,
- "GLX_MESA_swap_control");
-
- LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n");
- }
-#endif
-
#ifdef __DRI_TEX_BUFFER
if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {
screen->texBuffer =