Mesa (master): swrast: fix unmatched span->array->ChanType

Yuanhan Liu yliu at kemper.freedesktop.org
Mon Nov 21 08:35:11 UTC 2011


Module: Mesa
Branch: master
Commit: 2e6402feb754dd6384ee27fe623a7f9fce66dcaf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2e6402feb754dd6384ee27fe623a7f9fce66dcaf

Author: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Date:   Mon Nov 21 16:31:58 2011 +0800

swrast: fix unmatched span->array->ChanType

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

v2: pick a nicer comment from Brian

Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/swrast/s_texcombine.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 0686acd..1fce5c5 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -545,6 +545,10 @@ 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]);
    }
+   /* The span->array->rgba values are of CHAN type so set
+    * span->array->ChanType field accordingly.
+    */
+   span->array->ChanType = CHAN_TYPE;
 
 end:
    for (i = 0; i < numArgsRGB || i < numArgsA; i++) {




More information about the mesa-commit mailing list