aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage/savage_xmesa.c
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2005-08-15 06:59:24 +0000
committerAlan Hourihane <[email protected]>2005-08-15 06:59:24 +0000
commitdabec11d277e68b6940e741651e61102767240b9 (patch)
tree12e8d6988b4b20a0d4fbcf4312ee89f66ddb1225 /src/mesa/drivers/dri/savage/savage_xmesa.c
parent69dc32cfac945bf664ddfbd6f0116404f893e66e (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/savage/savage_xmesa.c')
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index d57b2c52d45..12cf78535ad 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -170,6 +170,11 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
savageScreenPrivate *savageScreen;
SAVAGEDRIPtr gDRIPriv = (SAVAGEDRIPtr)sPriv->pDevPriv;
+ if (sPriv->devPrivSize != sizeof(SAVAGEDRIRec)) {
+ fprintf(stderr,"\nERROR! sizeof(SAVAGEDRIRec) does not match passed size from device driver\n");
+ return GL_FALSE;
+ }
+
/* Allocate the private area */
savageScreen = (savageScreenPrivate *)Xmalloc(sizeof(savageScreenPrivate));
if (!savageScreen)