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

Author: Brian Paul <[email protected]>
Date:   Tue Sep  8 09:40:29 2015 -0600

svga: remove useless MAX2() call

The sum of two unsigned ints is always >= 0.  Found with Coverity.

Reviewed-by: Charmaine Lee <[email protected]>

---

 src/gallium/drivers/svga/svga_state_tss.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_state_tss.c 
b/src/gallium/drivers/svga/svga_state_tss.c
index a13980d..5991da1 100644
--- a/src/gallium/drivers/svga/svga_state_tss.c
+++ b/src/gallium/drivers/svga/svga_state_tss.c
@@ -90,7 +90,7 @@ emit_tex_binding_unit(struct svga_context *svga,
       }
       else {
          last_level = MIN2(sv->u.tex.last_level, sv->texture->last_level);
-         min_lod = MAX2(0, (s->view_min_lod + sv->u.tex.first_level));
+         min_lod = s->view_min_lod + sv->u.tex.first_level;
          min_lod = MIN2(min_lod, last_level);
          max_lod = MIN2(s->view_max_lod + sv->u.tex.first_level, last_level);
       }

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

Reply via email to