summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-03-11 14:57:16 -0700
committerMatt Turner <[email protected]>2013-08-02 09:51:57 -0700
commit58548833129f0e197cd84e357b1df14b1b135d96 (patch)
tree716077bd03c89e3c60e608bcc4d8d495dd35e644 /src/mesa/main/texobj.c
parent01bdad3173479176e579a8f6bb8309f683c5fa79 (diff)
mesa: Use MIN3 instead of two MIN2s.
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r--src/mesa/main/texobj.c9
1 files changed, 5 insertions, 4 deletions
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);