[Mesa-dev] [PATCH 1/5] mesa: remove the redundant check
Brian Paul
brianp at vmware.com
Wed Nov 2 06:14:53 PDT 2011
On 11/02/2011 03:56 AM, Yuanhan Liu wrote:
> Signed-off-by: Yuanhan Liu<yuanhan.liu at linux.intel.com>
> ---
> src/mesa/main/texparam.c | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
> index dc5ee33..b031e18 100644
> --- a/src/mesa/main/texparam.c
> +++ b/src/mesa/main/texparam.c
> @@ -394,12 +394,11 @@ set_tex_parameteri(struct gl_context *ctx,
> return GL_FALSE;
> }
> ASSERT(comp< 4);
> - if (swz>= 0) {
> - flush(ctx);
> - texObj->Swizzle[comp] = params[0];
> - set_swizzle_component(&texObj->_Swizzle, comp, swz);
> - return GL_TRUE;
> - }
> +
> + flush(ctx);
> + texObj->Swizzle[comp] = params[0];
> + set_swizzle_component(&texObj->_Swizzle, comp, swz);
> + return GL_TRUE;
> }
> goto invalid_pname;
>
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list