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

Liu Aleaxander aleaxander at gmail.com
Sat Nov 19 06:32:30 PST 2011


On Sat, Nov 19, 2011 at 12:49 AM, Brian Paul <brianp at vmware.com> wrote:
> On 11/18/2011 12:38 AM, Yuanhan Liu wrote:
>>
>> 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.
>> +    */
>
> Maybe rewrite that comment as:
>
> /* The span->array->rgba values are of CHAN type so set
>  * span->array->ChanType field accordingly.
>  */

Yeah, a nicer one. Will change it next week. Thanks.

-- 
regards
Yuanhan Liu


More information about the mesa-dev mailing list