st/mesa: add comment to explain _min(), _maxf(), etc. functions
authorBrian Paul <brianp@vmware.com>
Tue, 25 Feb 2014 16:53:49 +0000 (09:53 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 25 Feb 2014 19:35:07 +0000 (12:35 -0700)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_extensions.c

index d053efbb20f513d574b2647087e9c6053d156548..18ddd4e471a1574cd259ba36cf84224bbaa5bdbe 100644 (file)
 #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;