[Mesa-dev] [PATCH 2/2] swrast: fix unmatched span->array->ChanType

Yuanhan Liu yuanhan.liu at linux.intel.com
Thu Nov 17 23:38:48 PST 2011


texture_combine converts the result rgba to CHAN_TYPE from FLOAT. At the
same time, make sure the span->array->ChanType is changed, too.

Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
---
 src/mesa/swrast/s_texcombine.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 0686acd..9f9b7fb 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -545,6 +545,11 @@ texture_combine( struct gl_context *ctx, GLuint unit,
       UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][BCOMP], rgba[i][BCOMP]);
       UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][ACOMP], rgba[i][ACOMP]);
    }
+   /*
+    * span->array->rgba is coverted to CHAN type by force, so it's a
+    * need to make sure the span->array->ChanType is converted, too.
+    */
+   span->array->ChanType = CHAN_TYPE;
 
 end:
    for (i = 0; i < numArgsRGB || i < numArgsA; i++) {
-- 
1.7.4.4



More information about the mesa-dev mailing list