summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-02-16 12:08:28 -0800
committerIan Romanick <ian.d.romanick@intel.com>2009-02-16 12:08:56 -0800
commit51ae4d6bbfd95cac8a9cdefcd6f22fbe21a6cb9d (patch)
treeb3745bb229c67586740059a9e54e33b03a0d903e /glx
parentcaa5310e163b040689383f6d25ccab5ef1b2e215 (diff)
glx: Add comments around some extension string weirdness
Diffstat (limited to 'glx')
-rw-r--r--glx/glxdri.c6
-rw-r--r--glx/glxdri2.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/glx/glxdri.c b/glx/glxdri.c
index b3b3e279b..cc6d93976 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -1136,6 +1136,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
+ /* The first call simply determines the length of the extension string.
+ * This allows us to allocate some memory to hold the extension string,
+ * but it requires that we call __glXGetExtensionString a second time.
+ */
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
if (buffer_size > 0) {
if (screen->base.GLXextensions != NULL) {
@@ -1150,7 +1154,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer);
screen->enterVT = pScrn->EnterVT;
- pScrn->EnterVT = glxDRIEnterVT;
+ pScrn->EnterVT = glxDRIEnterVT;
screen->leaveVT = pScrn->LeaveVT;
pScrn->LeaveVT = glxDRILeaveVT;
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 66e08895c..b12293acb 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -583,6 +583,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
+ /* The first call simply determines the length of the extension string.
+ * This allows us to allocate some memory to hold the extension string,
+ * but it requires that we call __glXGetExtensionString a second time.
+ */
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
if (buffer_size > 0) {
if (screen->base.GLXextensions != NULL) {