From 47cf442c1164b6b406117fccfb8b564602741ee3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 16 May 2001 20:27:12 +0000 Subject: use DEFARRAY, etc macros to work around 32k data limit on Macs (Tom Goon) --- src/mesa/swrast/s_drawpix.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/mesa/swrast/s_drawpix.c') diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index e914eb7013..59b2d0294b 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -1,4 +1,4 @@ -/* $Id: s_drawpix.c,v 1.18 2001/05/15 21:30:27 brianp Exp $ */ +/* $Id: s_drawpix.c,v 1.19 2001/05/16 20:27:12 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -818,11 +818,18 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, continue; if (ctx->Texture._ReallyEnabled && ctx->Pixel.PixelTextureEnabled) { - GLfloat s[MAX_WIDTH], t[MAX_WIDTH], r[MAX_WIDTH], q[MAX_WIDTH]; GLchan primary_rgba[MAX_WIDTH][4]; GLuint unit; - /* XXX not sure how multitexture is supposed to work here */ + DEFARRAY(GLfloat, s, MAX_WIDTH); /* mac 32k limitation */ + DEFARRAY(GLfloat, t, MAX_WIDTH); + DEFARRAY(GLfloat, r, MAX_WIDTH); + DEFARRAY(GLfloat, q, MAX_WIDTH); + CHECKARRAY(s, return); /* mac 32k limitation */ + CHECKARRAY(t, return); + CHECKARRAY(r, return); + CHECKARRAY(q, return); + /* XXX not sure how multitexture is supposed to work here */ MEMCPY(primary_rgba, rgba, 4 * width * sizeof(GLchan)); for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { @@ -834,6 +841,10 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, rgba); } } + UNDEFARRAY(s); /* mac 32k limitation */ + UNDEFARRAY(t); + UNDEFARRAY(r); + UNDEFARRAY(q); } if (quickDraw) { -- cgit v1.2.3