[Mesa-dev] [PATCH 2/2] mesa: Use MIN3 instead of two MIN2s.
Matt Turner
mattst88 at gmail.com
Mon Apr 8 10:29:47 PDT 2013
---
src/mesa/main/texobj.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index d0fcb12..28b8130 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);
--
1.7.8.6
More information about the mesa-dev
mailing list