summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/sis
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/sis
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/sis')
-rw-r--r--src/mesa/drivers/dri/sis/server/sis_dri.h1
-rw-r--r--src/mesa/drivers/dri/sis/sis_screen.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/sis/server/sis_dri.h b/src/mesa/drivers/dri/sis/server/sis_dri.h
index df18ff0bacc..a05662430e2 100644
--- a/src/mesa/drivers/dri/sis/server/sis_dri.h
+++ b/src/mesa/drivers/dri/sis/server/sis_dri.h
@@ -38,7 +38,6 @@ typedef struct {
typedef struct {
drm_handle_t handle;
drmSize size;
- drmAddress map;
} sisRegion, *sisRegionPtr;
typedef struct {
diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c
index 174a74169ce..8815d0e8326 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};