diff options
author | Brian Paul <brianp@vmware.com> | 2009-01-21 09:05:02 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-01-21 09:05:02 -0700 |
commit | 8c7135ee14fb6f4d8b6e64d570daee3512c99438 (patch) | |
tree | 9ddb66af510718955c0f422189f2a5e46c63b76f /src/mesa/swrast | |
parent | 4683cab29a74d6b3cefdd915aaf91e6b4f667d27 (diff) |
swrast: fix redundant texture application in affine_textured_triangle().
This function does simple texture mapping so disable normal texture mapping
before we call _swrast_write_rgba_span() so that we don't do it twice.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_triangle.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 2033ab5529..a2e8433e27 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.3 + * Version: 7.3 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * @@ -263,6 +263,10 @@ affine_span(GLcontext *ctx, SWspan *span, struct affine_info *info) { GLchan sample[4]; /* the filtered texture sample */ + const GLuint texEnableSave = ctx->Texture._EnabledUnits; + + /* Disable tex units so they're not re-applied in swrast_write_rgba_span */ + ctx->Texture._EnabledUnits = 0x0; /* Instead of defining a function for each mode, a test is done * between the outer and inner loops. This is to reduce code size @@ -493,8 +497,12 @@ affine_span(GLcontext *ctx, SWspan *span, } span->interpMask &= ~SPAN_RGBA; ASSERT(span->arrayMask & SPAN_RGBA); + _swrast_write_rgba_span(ctx, span); + /* re-enable texture units */ + ctx->Texture._EnabledUnits = texEnableSave; + #undef SPAN_NEAREST #undef SPAN_LINEAR } |