Mesa (master): mesa: Use MIN3 instead of two MIN2s.
Matt Turner
mattst88 at kemper.freedesktop.org
Fri Aug 2 16:51:34 UTC 2013
Module: Mesa
Branch: master
Commit: 58548833129f0e197cd84e357b1df14b1b135d96
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=58548833129f0e197cd84e357b1df14b1b135d96
Author: Matt Turner <mattst88 at gmail.com>
Date: Mon Mar 11 14:57:16 2013 -0700
mesa: Use MIN3 instead of two MIN2s.
---
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 c395b29..1666a66 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);
More information about the mesa-commit
mailing list