summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-08-26 20:03:03 +0100
committerKeith Whitwell <keithw@vmware.com>2010-08-27 13:08:54 +0100
commite826d0e8170028da553d2018b833af7c26b8dc1b (patch)
tree35f1ffc63fa0a529fbd77faf47493b7950d83ccc
parentb91553355f848f2174d53429699b116734781ad7 (diff)
util: add MIN4, MAX4
-rw-r--r--src/gallium/auxiliary/util/u_math.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index fe19466436..6ba4e24f4c 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -566,6 +566,9 @@ util_bswap16(uint16_t n)
#define MIN3( A, B, C ) MIN2( MIN2( A, B ), C )
#define MAX3( A, B, C ) MAX2( MAX2( A, B ), C )
+#define MIN4( A, B, C, D ) MIN2( MIN2( A, B ), MIN2(C, D) )
+#define MAX4( A, B, C, D ) MAX2( MAX2( A, B ), MIN2(C, D) )
+
/**
* Align a value, only works pot alignemnts.