Module: Mesa
Branch: master
Commit: e927cb55a998941f3889f127f3d4175ceb1f5b82
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e927cb55a998941f3889f127f3d4175ceb1f5b82

Author: George Kyriazis <[email protected]>
Date:   Mon Sep 25 12:58:18 2017 -0500

swr: Remove unneeeded comparison

No need to check if screen->pipe != pipe, so we can just assign it.  Just do it.

Reviewed-by: Bruce Cherniak <[email protected]>

---

 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 893bd6e5bc..c6da4fcb8e 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. */

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to