diff options
author | Alan Hourihane <[email protected]> | 2005-08-15 06:59:24 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2005-08-15 06:59:24 +0000 |
commit | dabec11d277e68b6940e741651e61102767240b9 (patch) | |
tree | 12e8d6988b4b20a0d4fbcf4312ee89f66ddb1225 /src/mesa/drivers/dri/tdfx | |
parent | 69dc32cfac945bf664ddfbd6f0116404f893e66e (diff) |
Add Egberts fixes for 64bit architectures
Add additional checks for the *DRIRec info structure passed in from the
device driver. This ensures that things fallback to indirect rendering if
the DDX driver has had modifications (i.e. removal of the drmAddress field).
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/server/tdfx_dri.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_screen.c | 7 |
2 files changed, 6 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 index 8f3104f3d97..acd0b9ae5ba 100644 --- a/src/mesa/drivers/dri/tdfx/server/tdfx_dri.h +++ b/src/mesa/drivers/dri/tdfx/server/tdfx_dri.h @@ -9,7 +9,6 @@ typedef struct { drm_handle_t regs; drmSize regsSize; - drmAddress regsMap; int deviceID; int width; int height; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index 0da4d7e3c2e..ab64f7986de 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -74,6 +74,11 @@ tdfxCreateScreen( __DRIscreenPrivate *sPriv ) tdfxScreenPrivate *fxScreen; TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv; + if (sPriv->devPrivSize != sizeof(TDFXDRIRec)) { + fprintf(stderr,"\nERROR! sizeof(TDFXDRIRec) does not match passed size from device driver\n"); + return GL_FALSE; + } + /* Allocate the private area */ fxScreen = (tdfxScreenPrivate *) CALLOC( sizeof(tdfxScreenPrivate) ); if ( !fxScreen ) @@ -441,7 +446,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc __GLcontextModes ** driver_modes ) { __DRIscreenPrivate *psp; - static const __DRIversion ddx_expected = { 1, 0, 0 }; + static const __DRIversion ddx_expected = { 1, 1, 0 }; static const __DRIversion dri_expected = { 4, 0, 0 }; static const __DRIversion drm_expected = { 1, 0, 0 }; |