From: Matt Turner Date: Mon, 11 Mar 2013 21:57:16 +0000 (-0700) Subject: mesa: Use MIN3 instead of two MIN2s. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58548833129f0e197cd84e357b1df14b1b135d96;p=mesa.git mesa: Use MIN3 instead of two MIN2s. --- diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index c395b2963f5..1666a66c127 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -548,10 +548,11 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, ASSERT(maxLevels > 0); - t->_MaxLevel = - baseLevel + baseImage->MaxNumLevels - 1; /* 'p' in the GL spec */ - t->_MaxLevel = MIN2(t->_MaxLevel, t->MaxLevel); - t->_MaxLevel = MIN2(t->_MaxLevel, maxLevels - 1); /* 'q' in the GL spec */ + t->_MaxLevel = MIN3(t->MaxLevel, + /* 'p' in the GL spec */ + baseLevel + baseImage->MaxNumLevels - 1, + /* 'q' in the GL spec */ + maxLevels - 1); /* Compute _MaxLambda = q - p in the spec used during mipmapping */ t->_MaxLambda = (GLfloat) (t->_MaxLevel - baseLevel);