From d5cc77e37c59b9ab635cbc90151f1b2fc69201c6 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 30 Aug 2005 19:14:23 +0000 Subject: [PATCH] Fixes from https://bugs.freedesktop.org/attachment.cgi?id=3077 --- src/mesa/drivers/dri/unichrome/via_screen.c | 5 +++-- src/mesa/drivers/dri/unichrome/via_texcombine.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 50342f3ff59..4ca4a071a5f 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -100,6 +100,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv) PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension = (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension")); void * const psc = sPriv->psc->screenConfigs; + drmAddress map; if (sPriv->devPrivSize != sizeof(VIADRIRec)) { fprintf(stderr,"\nERROR! sizeof(VIADRIRec) does not match passed size from device driver\n"); @@ -150,7 +151,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv) if (drmMap(sPriv->fd, gDRIPriv->regs.handle, gDRIPriv->regs.size, - (drmAddress *)&viaScreen->reg) != 0) { + &map) != 0) { FREE(viaScreen); sPriv->private = NULL; __driUtilMessage("viaInitDriver: drmMap regs failed"); @@ -162,8 +163,8 @@ viaInitDriver(__DRIscreenPrivate *sPriv) gDRIPriv->agp.handle, gDRIPriv->agp.size, (drmAddress *)&viaScreen->agpLinearStart) != 0) { - FREE(viaScreen); drmUnmap(viaScreen->reg, gDRIPriv->agp.size); + FREE(viaScreen); sPriv->private = NULL; __driUtilMessage("viaInitDriver: drmMap agp failed"); return GL_FALSE; diff --git a/src/mesa/drivers/dri/unichrome/via_texcombine.c b/src/mesa/drivers/dri/unichrome/via_texcombine.c index e691c553f99..d604457bfd8 100644 --- a/src/mesa/drivers/dri/unichrome/via_texcombine.c +++ b/src/mesa/drivers/dri/unichrome/via_texcombine.c @@ -111,7 +111,7 @@ viaTexCombineState( struct via_context *vmesa, unsigned constant_alpha[3]; unsigned bias_alpha = 0; unsigned abc_alpha = 0; - const struct gl_texture_unit const * texUnit = + const struct gl_texture_unit * texUnit = &vmesa->glCtx->Texture.Unit[unit]; unsigned env_color[4]; -- 2.30.2