diff options
author | Brian Paul <[email protected]> | 2002-04-12 15:39:58 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-04-12 15:39:58 +0000 |
commit | b7f5e92f1749ce4601a758f66ddc64959f11742b (patch) | |
tree | b9d7056d88824cb49eab181c3ca6290039e1886f /src/mesa/swrast/s_pixeltex.c | |
parent | 9add9a21d8c51ee4238169265541fa9a40f0a8b0 (diff) |
Klaus Niederkrueger's latest changes: use INIT_SPAN() to init span primitive
type, width, interp mask and array mask.
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; } } |