[Mesa-dev] [PATCH 2/2] swr: Remove unneeeded comparison

Cherniak, Bruce bruce.cherniak at intel.com
Tue Sep 26 18:02:33 UTC 2017


Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com> 

> On Sep 25, 2017, at 5:28 PM, George Kyriazis <george.kyriazis at intel.com> wrote:
> 
> No need to check if screen->pipe != pipe, so we can just assign it.  Just do it.
> ---
> src/gallium/drivers/swr/swr_state.cpp | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
> index 893bd6e..c6da4fc 100644
> --- a/src/gallium/drivers/swr/swr_state.cpp
> +++ b/src/gallium/drivers/swr/swr_state.cpp
> @@ -1074,8 +1074,7 @@ swr_update_derived(struct pipe_context *pipe,
>    }
> 
>    /* Update screen->pipe to current pipe context. */
> -   if (screen->pipe != pipe)
> -      screen->pipe = pipe;
> +   screen->pipe = pipe;
> 
>    /* Any state that requires dirty flags to be re-triggered sets this mask */
>    /* For example, user_buffer vertex and index buffers. */
> -- 
> 2.7.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list