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/mga/server/mga_dri.c | 10 +++++----- src/mesa/drivers/dri/mga/server/mga_dri.h | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'src/mesa/drivers/dri/mga/server') diff --git a/src/mesa/drivers/dri/mga/server/mga_dri.c b/src/mesa/drivers/dri/mga/server/mga_dri.c index a9830814a1a..258ace83a0e 100644 --- a/src/mesa/drivers/dri/mga/server/mga_dri.c +++ b/src/mesa/drivers/dri/mga/server/mga_dri.c @@ -206,7 +206,7 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga) return 0; } fprintf( stderr, - "[agp] WARP microcode handle = 0x%08lx\n", + "[agp] WARP microcode handle = 0x%08x\n", pMga->warp.handle ); if ( drmMap( ctx->drmFD, @@ -233,7 +233,7 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga) return 0; } fprintf( stderr, - "[agp] Primary DMA handle = 0x%08lx\n", + "[agp] Primary DMA handle = 0x%08x\n", pMga->primary.handle ); if ( drmMap( ctx->drmFD, @@ -260,7 +260,7 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga) return 0; } fprintf( stderr, - "[agp] DMA buffers handle = 0x%08lx\n", + "[agp] DMA buffers handle = 0x%08x\n", pMga->buffers.handle ); if ( drmMap( ctx->drmFD, @@ -304,7 +304,7 @@ static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga) } /* should i map it ? */ fprintf( stderr, - "[agp] agpTexture handle = 0x%08lx\n", + "[agp] agpTexture handle = 0x%08x\n", pMga->agpTextures.handle ); fprintf( stderr, "[agp] agpTexture size: %d kb\n", pMga->agpTextures.size/1024 ); @@ -339,7 +339,7 @@ static int MGADRIMapInit( struct DRIDriverContextRec *ctx, MGAPtr pMga ) return 0; } fprintf( stderr, - "[drm] Status handle = 0x%08lx\n", + "[drm] Status handle = 0x%08x\n", pMga->status.handle ); if ( drmMap( ctx->drmFD, diff --git a/src/mesa/drivers/dri/mga/server/mga_dri.h b/src/mesa/drivers/dri/mga/server/mga_dri.h index 1ef6592196c..03b8414603a 100644 --- a/src/mesa/drivers/dri/mga/server/mga_dri.h +++ b/src/mesa/drivers/dri/mga/server/mga_dri.h @@ -49,6 +49,16 @@ # define DEPRECATED #endif +#if 1 +typedef struct _mgaDrmRegion { + drm_handle_t handle; + unsigned int offset; + drmSize size; +} mgaDrmRegion, *mgaDrmRegionPtr; +#else +#define mgaDrmRegion drmRegion +#endif + typedef struct { int chipset; int width DEPRECATED; @@ -91,10 +101,10 @@ typedef struct { * for the X.org 6.9 / 7.0 release), these fields should be removed. */ /*@{*/ - drmRegion registers; /**< MMIO registers. */ - drmRegion status DEPRECATED; /**< No longer used on the client-side. */ - drmRegion primary; /**< Primary DMA region. */ - drmRegion buffers DEPRECATED; /**< No longer used on the client-side. */ + mgaDrmRegion registers; /**< MMIO registers. */ + mgaDrmRegion status DEPRECATED; /**< No longer used on the client-side. */ + mgaDrmRegion primary; /**< Primary DMA region. */ + mgaDrmRegion buffers DEPRECATED; /**< No longer used on the client-side. */ /*@}*/ unsigned int sarea_priv_offset; -- cgit v1.2.3