summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-07-13 19:00:46 +1000
committerDave Airlie <airlied@linux.ie>2008-07-13 19:00:46 +1000
commit4fab47b13c214dc79e0ae5d8001521029ce34231 (patch)
tree5cef140eea4f1956cda116809cf4af511a092896
parente81ba58bf4c20229677cdf89b5970b55cefb2199 (diff)
glx/dri: only report DRI2 extensions when DRI2 is enabled.
Fixes bug 15477
-rw-r--r--src/glx/x11/dri2_glx.c2
-rw-r--r--src/glx/x11/dri_common.c4
-rw-r--r--src/glx/x11/dri_common.h2
-rw-r--r--src/glx/x11/dri_glx.c2
-rw-r--r--src/glx/x11/drisw_glx.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c
index b679c72c10..0be65bce62 100644
--- a/src/glx/x11/dri2_glx.c
+++ b/src/glx/x11/dri2_glx.c
@@ -308,7 +308,7 @@ static __GLXDRIscreen *dri2CreateScreen(__GLXscreenConfigs *psc, int screen,
return NULL;
}
- driBindExtensions(psc);
+ driBindExtensions(psc, 1);
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
diff --git a/src/glx/x11/dri_common.c b/src/glx/x11/dri_common.c
index b159d193a5..8175f46c54 100644
--- a/src/glx/x11/dri_common.c
+++ b/src/glx/x11/dri_common.c
@@ -329,7 +329,7 @@ driConvertConfigs(const __DRIcoreExtension *core,
}
_X_HIDDEN void
-driBindExtensions(__GLXscreenConfigs *psc)
+driBindExtensions(__GLXscreenConfigs *psc, int dri2)
{
const __DRIextension **extensions;
int i;
@@ -386,7 +386,7 @@ driBindExtensions(__GLXscreenConfigs *psc)
#endif
#ifdef __DRI_TEX_BUFFER
- if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {
+ if ((strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) && dri2) {
psc->texBuffer = (__DRItexBufferExtension *) extensions[i];
__glXEnableDirectExtension(psc, "GLX_EXT_texture_from_pixmap");
}
diff --git a/src/glx/x11/dri_common.h b/src/glx/x11/dri_common.h
index 3556510335..15f6cc87b9 100644
--- a/src/glx/x11/dri_common.h
+++ b/src/glx/x11/dri_common.h
@@ -55,6 +55,6 @@ extern void ErrorMessageF(const char *f, ...);
extern void *driOpenDriver(const char *driverName);
-extern void driBindExtensions(__GLXscreenConfigs *psc);
+extern void driBindExtensions(__GLXscreenConfigs *psc, int dri2);
#endif /* _DRI_COMMON_H */
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index d53f2d9854..82653f1625 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -635,7 +635,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
return NULL;
}
- driBindExtensions(psc);
+ driBindExtensions(psc, 0);
psp->destroyScreen = driDestroyScreen;
psp->createContext = driCreateContext;
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index f7ff001121..bcf7e144ef 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -390,7 +390,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
goto handle_error;
}
- driBindExtensions(psc);
+ driBindExtensions(psc, 0);
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);