From 540bb3a8303a051ba690d7d9ecaee4d83b74cdbb Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 5 Feb 2004 06:39:20 +0000 Subject: [PATCH] fix ugly bug triggered by macro expansion --- src/mesa/drivers/dri/i810/i810render.c | 2 +- src/mesa/drivers/dri/i830/i830_render.c | 2 +- src/mesa/drivers/dri/mga/mgarender.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i810/i810render.c b/src/mesa/drivers/dri/i810/i810render.c index c674378953f..bb8db8dbcdd 100644 --- a/src/mesa/drivers/dri/i810/i810render.c +++ b/src/mesa/drivers/dri/i810/i810render.c @@ -107,7 +107,7 @@ static const GLenum reduced_prim[GL_POLYGON+1] = { (I810_DMA_BUF_SZ-4) / (imesa->vertex_size * 4) #define ALLOC_VERTS( nr ) \ - i810AllocDmaLow( imesa, nr * imesa->vertex_size * 4) + i810AllocDmaLow( imesa, (nr) * imesa->vertex_size * 4) #define EMIT_VERTS( ctx, j, nr, buf ) \ i810_emit_contiguous_verts(ctx, j, (j)+(nr), buf) diff --git a/src/mesa/drivers/dri/i830/i830_render.c b/src/mesa/drivers/dri/i830/i830_render.c index c1564a54e5b..498384bdb29 100644 --- a/src/mesa/drivers/dri/i830/i830_render.c +++ b/src/mesa/drivers/dri/i830/i830_render.c @@ -124,7 +124,7 @@ static const int scale_prim[GL_POLYGON+1] = { #define ALLOC_VERTS( nr ) \ - i830AllocDmaLow( imesa, nr * imesa->vertex_size * 4) + i830AllocDmaLow( imesa, (nr) * imesa->vertex_size * 4) #define EMIT_VERTS( ctx, j, nr, buf ) \ _tnl_emit_vertices_to_buffer(ctx, j, (j)+(nr), buf) diff --git a/src/mesa/drivers/dri/mga/mgarender.c b/src/mesa/drivers/dri/mga/mgarender.c index 3dd15e21a67..a7de390be6d 100644 --- a/src/mesa/drivers/dri/mga/mgarender.c +++ b/src/mesa/drivers/dri/mga/mgarender.c @@ -109,7 +109,7 @@ static void mgaDmaPrimitive( GLcontext *ctx, GLenum prim ) #define ALLOC_VERTS( nr ) \ - mgaAllocDmaLow( mmesa, nr * mmesa->vertex_size * 4) + mgaAllocDmaLow( mmesa, (nr) * mmesa->vertex_size * 4) #define EMIT_VERTS( ctx, j, nr, buf ) \ mga_emit_contiguous_verts(ctx, j, (j)+(nr), buf) -- 2.30.2