diff options
Diffstat (limited to 'src/mesa/swrast/s_pixeltex.c')
-rw-r--r-- | src/mesa/swrast/s_pixeltex.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/mesa/swrast/s_pixeltex.c b/src/mesa/swrast/s_pixeltex.c index fab67da69fb..c2b597a9afd 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.7 2002/04/04 16:53:59 brianp Exp $ */ +/* $Id: s_pixeltex.c,v 1.8 2002/04/12 15:39:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -97,6 +97,9 @@ _swrast_pixel_texture(GLcontext *ctx, struct sw_span *span) GLchan primary_rgba[MAX_WIDTH][4]; GLuint unit; + ASSERT(!(span->arrayMask & SPAN_TEXTURE)); + span->arrayMask |= SPAN_TEXTURE; + MEMCPY(primary_rgba, span->color.rgba, 4 * span->end * sizeof(GLchan)); for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { @@ -104,24 +107,25 @@ _swrast_pixel_texture(GLcontext *ctx, struct sw_span *span) pixeltexgen(ctx, span->end, (const GLchan (*)[4]) span->color.rgba, span->texcoords[unit]); - _swrast_texture_fragments(ctx, unit, span->end, - span->texcoords[unit], - NULL, /* lambda */ - (CONST GLchan (*)[4]) primary_rgba, - span->color.rgba); + _swrast_texture_fragments(ctx, unit, span, + (CONST GLchan (*)[4]) primary_rgba); } } + /* this is a work-around to be fixed by initializing again span */ + span->arrayMask &= ~SPAN_TEXTURE; } else { /* single texture, unit 0 */ ASSERT(ctx->Texture._ReallyEnabled & TEXTURE0_ANY); + ASSERT(!(span->arrayMask & SPAN_TEXTURE)); + span->arrayMask |= SPAN_TEXTURE; + pixeltexgen(ctx, span->end, (const GLchan (*)[4]) span->color.rgba, span->texcoords[0]); - _swrast_texture_fragments(ctx, 0, span->end, - span->texcoords[0], - NULL, /* lambda */ - (CONST GLchan (*)[4]) span->color.rgba, - (GLchan (*)[4]) span->color.rgba); + _swrast_texture_fragments(ctx, 0, span, + (CONST GLchan (*)[4]) span->color.rgba); + /* this is a work-around to be fixed */ + span->arrayMask &= ~SPAN_TEXTURE; } } |