diff options
author | Brian Paul <[email protected]> | 2014-02-25 09:53:49 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-02-25 12:35:07 -0700 |
commit | c88a0b6af318c02b2ffa6958187672da9b3838ce (patch) | |
tree | 78250021b93857b39e649a0ba36b85af5d9f31d0 /src/mesa | |
parent | 9855477e903e00f7457adb15594048416444b992 (diff) |
st/mesa: add comment to explain _min(), _maxf(), etc. functions
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 6 |
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; |