svga: remove useless MAX2() call
authorBrian Paul <brianp@vmware.com>
Tue, 8 Sep 2015 15:40:29 +0000 (09:40 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 10 Sep 2015 18:23:46 +0000 (12:23 -0600)
The sum of two unsigned ints is always >= 0.  Found with Coverity.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_state_tss.c

index a13980d0e13303ee9723f8f0d9a671615a5eb3c5..5991da13868c474aef2c50be00cbc3b17db1dedc 100644 (file)
@@ -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);
       }