From 8ed323166978145afaa10651039e473367d78a63 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Mon, 8 Dec 2003 17:14:47 +0000 Subject: [PATCH] build in SOLO environment --- src/mesa/drivers/dri/tdfx/server/tdfx_dri.h | 28 +++++++++++++++++++++ src/mesa/drivers/dri/tdfx/tdfx_screen.c | 14 +++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 src/mesa/drivers/dri/tdfx/server/tdfx_dri.h 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 00000000000..956b7e7034c --- /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 480dc8064a8..48cff3f02cf 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 -- 2.30.2