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/sis/sis_screen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/sis/sis_screen.c') diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index 174a74169c..8815d0e832 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -129,6 +129,10 @@ sisCreateScreen( __DRIscreenPrivate *sPriv ) sisScreenPtr sisScreen; SISDRIPtr sisDRIPriv = (SISDRIPtr)sPriv->pDevPriv; + if (sPriv->devPrivSize != sizeof(SISDRIRec)) { + fprintf(stderr,"\nERROR! sizeof(SISDRIRec) does not match passed size from device driver\n"); + return GL_FALSE; + } /* Allocate the private area */ sisScreen = (sisScreenPtr)CALLOC( sizeof(*sisScreen) ); @@ -427,7 +431,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, { __DRIscreenPrivate *psp; - static const __DRIversion ddx_expected = {0, 1, 0}; + static const __DRIversion ddx_expected = {0, 8, 0}; static const __DRIversion dri_expected = {4, 0, 0}; static const __DRIversion drm_expected = {1, 0, 0}; -- cgit v1.2.3