[Mesa-dev] [PATCH] r300/compiler: remove useless check

Tom Stellard tom at stellard.net
Tue Oct 14 09:24:13 PDT 2014


On Tue, Oct 14, 2014 at 03:27:58AM +0200, David Heidelberger wrote:
> 
> This code is already in if (!variable->C->is_r500) so no need check
> twice.
> 

I've pushed this patch, thanks!

-Tom

> Signed-off-by: David Heidelberger <david.heidelberger at ixit.cz>
> ---
>   src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c 
> b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
> index 64b225d..14f93fb 100644
> --- a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
> +++ b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
> @@ -387,11 +387,8 @@ static enum rc_reg_class variable_get_class(
>   						 * instructions can't be
>   						 * swizzle on r300/r400 GPUs.
>   						 */
> -						if (!variable->C->is_r500) {
> -							can_change_writemask = 0;
> -							break;
> -						}
> -						old_swizzle = r.U.I.Src->Swizzle;
> +						can_change_writemask = 0;
> +						break;
>   					}
>   					new_swizzle = rc_adjust_channels(
>   						old_swizzle, conversion_swizzle);
> -- 
> 2.1.2

> From 524f212763d824040fd0d362b0230770ed8faba1 Mon Sep 17 00:00:00 2001
> From: David Heidelberger <david.heidelberger at ixit.cz>
> Date: Tue, 14 Oct 2014 02:25:01 +0200
> Subject: [PATCH] r300/compiler: remove useless check
> 
> This code is already in if (!variable->C->is_r500) so no need check
> twice.
> 
> Signed-off-by: David Heidelberger <david.heidelberger at ixit.cz>
> ---
>  src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
> index 64b225d..14f93fb 100644
> --- a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
> +++ b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
> @@ -387,11 +387,8 @@ static enum rc_reg_class variable_get_class(
>  						 * instructions can't be
>  						 * swizzle on r300/r400 GPUs.
>  						 */
> -						if (!variable->C->is_r500) {
> -							can_change_writemask = 0;
> -							break;
> -						}
> -						old_swizzle = r.U.I.Src->Swizzle;
> +						can_change_writemask = 0;
> +						break;
>  					}
>  					new_swizzle = rc_adjust_channels(
>  						old_swizzle, conversion_swizzle);
> -- 
> 2.1.2
> 

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list