From 77df88727cb0a423dd5cb41498c2302d9df4fce7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Aug 2002 00:45:07 +0000 Subject: struct sw_span is again allocated on the stack, but the arrays of span data are broken out into a new struct span_arrays which is allocated per-context (to avoid huge stack allocations - a problem on Windows). This lets us use span.redStep instead of span->redStep (for example) to hopefully get slightly better performance in the triangle functions. --- src/mesa/swrast/s_pixeltex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/swrast/s_pixeltex.c') diff --git a/src/mesa/swrast/s_pixeltex.c b/src/mesa/swrast/s_pixeltex.c index 3afda84fa0..687dfe307a 100644 --- a/src/mesa/swrast/s_pixeltex.c +++ b/src/mesa/swrast/s_pixeltex.c @@ -1,4 +1,4 @@ -/* $Id: s_pixeltex.c,v 1.9 2002/05/02 00:59:20 brianp Exp $ */ +/* $Id: s_pixeltex.c,v 1.10 2002/08/07 00:45:07 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -99,13 +99,13 @@ _swrast_pixel_texture(GLcontext *ctx, struct sw_span *span) /* convert colors into texture coordinates */ pixeltexgen( ctx, span->end, - (const GLchan (*)[4]) span->color.rgba, - span->texcoords[0] ); + (const GLchan (*)[4]) span->array->rgba, + span->array->texcoords[0] ); /* copy the new texture units for all enabled units */ for (unit = 1; unit < ctx->Const.MaxTextureUnits; unit++) { if (ctx->Texture.Unit[unit]._ReallyEnabled) { - MEMCPY( span->texcoords[unit], span->texcoords[0], + MEMCPY( span->array->texcoords[unit], span->array->texcoords[0], span->end * 4 * sizeof(GLfloat) ); } } -- cgit v1.2.3