Fix a couple issues related to GetDrawableInfo. In the new DRI
authorIan Romanick <idr@us.ibm.com>
Tue, 1 Jun 2004 19:20:12 +0000 (19:20 +0000)
committerIan Romanick <idr@us.ibm.com>
Tue, 1 Jun 2004 19:20:12 +0000 (19:20 +0000)
interface, it must be available from libGL, and the the typedef in
dri_util.h was wrong.

src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h

index 9a8d247e59257088684ac014a9dc6d9af61038da..13101755b3e04d0b5910b6ca29d739e9b639d132 100644 (file)
@@ -826,7 +826,13 @@ static void *driCreateNewDrawable(Display *dpy,
     pdp->getInfo = (GetDrawableInfo *)
        glXGetProcAddress( (const GLubyte *) "__glXGetDrawableInfo" );
     if ( pdp->getInfo == NULL ) {
+#ifdef DRI_NEW_INTERFACE_ONLY
+        (void)XF86DRIDestroyDrawable(dpy, modes->screen, pdp->draw);
+       Xfree(pdp);
+       return NULL;
+#else
        pdp->getInfo = XF86DRIGetDrawableInfo;
+#endif /* DRI_NEW_INTERFACE_ONLY */
     }
 
     if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, modes,
index 627a58562a5df3d46fc29ba552978adceec0c99e..17f26d1a210fad795ba02d1920a606b8ff40aaa7 100644 (file)
@@ -257,9 +257,9 @@ struct __DRIswapInfoRec {
 typedef Bool (GetDrawableInfo)( Display *dpy, int scrn, __DRIid draw,
     unsigned int * index, unsigned int * stamp,
     int * x, int * y, int * width, int * height,
-    int * numClipRects, drm_clip_rect_t * pClipRects,
+    int * numClipRects, drm_clip_rect_t ** pClipRects,
     int * backX, int * backY,
-    int * numBackClipRects, drm_clip_rect_t * pBackClipRects );
+    int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
 
 
 /**