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

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Tue Jun  6 22:58:12 2017 +0200

mesa: remove useless check in _mesa_update_pixel()

The only caller is _mesa_update_state_locked() which already
checks if _NEW_PIXEL is set before calling _mesa_update_pixel().

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>
Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

---

 src/mesa/main/pixel.c | 5 ++---
 src/mesa/main/pixel.h | 2 +-
 src/mesa/main/state.c | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 608a545470..218e9fdd6b 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -626,10 +626,9 @@ update_image_transfer_state(struct gl_context *ctx)
 /**
  * Update mesa pixel transfer derived state.
  */
-void _mesa_update_pixel( struct gl_context *ctx, GLuint new_state )
+void _mesa_update_pixel( struct gl_context *ctx )
 {
-   if (new_state & _NEW_PIXEL)
-      update_image_transfer_state(ctx);
+   update_image_transfer_state(ctx);
 }
 
 
diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h
index fd1782e1bc..17e7376281 100644
--- a/src/mesa/main/pixel.h
+++ b/src/mesa/main/pixel.h
@@ -64,7 +64,7 @@ void GLAPIENTRY
 _mesa_PixelTransferi( GLenum pname, GLint param );
 
 extern void 
-_mesa_update_pixel( struct gl_context *ctx, GLuint newstate );
+_mesa_update_pixel( struct gl_context *ctx );
 
 extern void 
 _mesa_init_pixel( struct gl_context * ctx );
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 73872b822a..d534f554ba 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -382,7 +382,7 @@ _mesa_update_state_locked( struct gl_context *ctx )
       _mesa_update_stencil( ctx );
 
    if (new_state & _NEW_PIXEL)
-      _mesa_update_pixel( ctx, new_state );
+      _mesa_update_pixel( ctx );
 
    /* ctx->_NeedEyeCoords is now up to date.
     *

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to