Re: [Mesa-dev] [PATCH 2/2] swrast: fix unmatched span-array-ChanType
On Sat, Nov 19, 2011 at 12:49 AM, Brian Paul bri...@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 Liuyuanhan@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 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] swrast: fix unmatched span-array-ChanType
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 Liuyuanhan@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. */ + span-array-ChanType = CHAN_TYPE; end: for (i = 0; i numArgsRGB || i numArgsA; i++) { otherwise, Reviewed-by: Brian Paul bri...@vmware.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] swrast: fix unmatched span-array-ChanType
On 11/18/2011 08:49 AM, Brian Paul 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 Liuyuanhan@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. */ I was about to make the same suggestion. + span-array-ChanType = CHAN_TYPE; end: for (i = 0; i numArgsRGB || i numArgsA; i++) { otherwise, Reviewed-by: Brian Paul bri...@vmware.com Both patches are also Reviewed-by: Ian Romanick ian.d.roman...@intel.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev