build in SOLO environment
authorAlan Hourihane <alanh@tungstengraphics.com>
Mon, 8 Dec 2003 17:14:47 +0000 (17:14 +0000)
committerAlan Hourihane <alanh@tungstengraphics.com>
Mon, 8 Dec 2003 17:14:47 +0000 (17:14 +0000)
src/mesa/drivers/dri/tdfx/server/tdfx_dri.h [new file with mode: 0644]
src/mesa/drivers/dri/tdfx/tdfx_screen.c

diff --git a/src/mesa/drivers/dri/tdfx/server/tdfx_dri.h b/src/mesa/drivers/dri/tdfx/server/tdfx_dri.h
new file mode 100644 (file)
index 0000000..956b7e7
--- /dev/null
@@ -0,0 +1,28 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.h,v 1.5 2001/03/21 17:02:26 dawes Exp $ */
+
+#ifndef _TDFX_DRI_
+#define _TDFX_DRI_
+
+#include "xf86drm.h"
+
+typedef struct {
+  drmHandle regs;
+  drmSize regsSize;
+  drmAddress regsMap;
+  int deviceID;
+  int width;
+  int height;
+  int mem;
+  int cpp;
+  int stride;
+  int fifoOffset;
+  int fifoSize;
+  int fbOffset;
+  int backOffset;
+  int depthOffset;
+  int textureOffset;
+  int textureSize;
+  unsigned int sarea_priv_offset;
+} TDFXDRIRec, *TDFXDRIPtr;
+
+#endif
index 480dc8064a80a148d74794e63650767a7c1d772d..48cff3f02cf3bcf3481894cccd5ce56bf407021d 100644 (file)
@@ -67,7 +67,7 @@ tdfxCreateScreen( __DRIscreenPrivate *sPriv )
    TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv;
 
    /* Allocate the private area */
-   fxScreen = (tdfxScreenPrivate *) Xmalloc( sizeof(tdfxScreenPrivate) );
+   fxScreen = (tdfxScreenPrivate *) CALLOC( sizeof(tdfxScreenPrivate) );
    if ( !fxScreen )
       return GL_FALSE;
 
@@ -108,7 +108,7 @@ tdfxDestroyScreen( __DRIscreenPrivate *sPriv )
    if ( fxScreen ) {
       drmUnmap( fxScreen->regs.map, fxScreen->regs.size );
 
-      Xfree( fxScreen );
+      FREE( fxScreen );
       sPriv->private = NULL;
    }
 }
@@ -322,6 +322,7 @@ static const struct __DriverAPIRec tdfxAPI = {
  * The __driCreateScreen name is the symbol that libGL.so fetches.
  * Return:  pointer to a __DRIscreenPrivate.
  */
+#ifndef _SOLO
 void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
                         int numConfigs, __GLXvisualConfig *config)
 {
@@ -329,3 +330,12 @@ void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
    psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &tdfxAPI);
    return (void *) psp;
 }
+#else
+void *__driCreateScreen(struct DRIDriverRec *driver,
+                        struct DRIDriverContextRec *driverContext)
+{
+   __DRIscreenPrivate *psp;
+   psp = __driUtilCreateScreen(driver, driverContext, &tdfxAPI);
+   return (void *) psp;
+}
+#endif