summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2003-12-08 17:14:47 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2003-12-08 17:14:47 +0000
commit8ed323166978145afaa10651039e473367d78a63 (patch)
tree55e95fd46b2ec85f8ff3c449d5ada298dba95a48 /src/mesa
parent243093f544ab79ed92cac9d615b5b9659f56dea3 (diff)
build in SOLO environment
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/tdfx/server/tdfx_dri.h28
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.c14
2 files changed, 40 insertions, 2 deletions
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
index 0000000000..956b7e7034
--- /dev/null
+++ b/src/mesa/drivers/dri/tdfx/server/tdfx_dri.h
@@ -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
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index 480dc8064a..48cff3f02c 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -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