From dabec11d277e68b6940e741651e61102767240b9 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Mon, 15 Aug 2005 06:59:24 +0000 Subject: 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). --- src/mesa/drivers/dri/r200/r200_screen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/drivers/dri/r200/r200_screen.c') diff --git a/src/mesa/drivers/dri/r200/r200_screen.c b/src/mesa/drivers/dri/r200/r200_screen.c index 480ee64f00..b4c360c218 100644 --- a/src/mesa/drivers/dri/r200/r200_screen.c +++ b/src/mesa/drivers/dri/r200/r200_screen.c @@ -239,6 +239,10 @@ r200CreateScreen( __DRIscreenPrivate *sPriv ) (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension")); void * const psc = sPriv->psc->screenConfigs; + if (sPriv->devPrivSize != sizeof(RADEONDRIRec)) { + fprintf(stderr,"\nERROR! sizeof(RADEONDRIRec) does not match passed size from device driver\n"); + return GL_FALSE; + } /* Allocate the private area */ screen = (r200ScreenPtr) CALLOC( sizeof(*screen) ); -- cgit v1.2.3