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/trident/trident_context.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/drivers/dri/trident') diff --git a/src/mesa/drivers/dri/trident/trident_context.c b/src/mesa/drivers/dri/trident/trident_context.c index 8d0717937e..b44c6205c9 100644 --- a/src/mesa/drivers/dri/trident/trident_context.c +++ b/src/mesa/drivers/dri/trident/trident_context.c @@ -358,6 +358,10 @@ tridentScreenPtr tridentCreateScreen( __DRIscreenPrivate *sPriv ) TRIDENTDRIPtr tDRIPriv = (TRIDENTDRIPtr)sPriv->pDevPriv; tridentScreenPtr tridentScreen; + if (sPriv->devPrivSize != sizeof(TRIDENTDRIRec)) { + fprintf(stderr,"\nERROR! sizeof(TRIDENTDRIRec) does not match passed size from device driver\n"); + return GL_FALSE; + } /* Allocate the private area */ tridentScreen = (tridentScreenPtr) CALLOC( sizeof(*tridentScreen) ); -- cgit v1.2.3