summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-02-25 09:53:49 -0700
committerBrian Paul <[email protected]>2014-02-25 12:35:07 -0700
commitc88a0b6af318c02b2ffa6958187672da9b3838ce (patch)
tree78250021b93857b39e649a0ba36b85af5d9f31d0 /src
parent9855477e903e00f7457adb15594048416444b992 (diff)
st/mesa: add comment to explain _min(), _maxf(), etc. functions
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_extensions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index d053efbb20f..18ddd4e471a 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -39,6 +39,12 @@
#include "st_extensions.h"
#include "st_format.h"
+
+/*
+ * Note: we use these function rather than the MIN2, MAX2, CLAMP macros to
+ * avoid evaluating arguments (which are often function calls) more than once.
+ */
+
static unsigned _min(unsigned a, unsigned b)
{
return (a < b) ? a : b;