diff options
author | Dave Airlie <[email protected]> | 2016-10-14 13:10:26 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-10-19 09:05:25 +1000 |
commit | 78bce52f9a57ea020ef7b9386216efe151be9542 (patch) | |
tree | 52a93a0beed3a6327537fa80bc861465b141acd5 /src/mesa/main | |
parent | f5daaba0fdd842bf04ede903aea3e63d10a27c6e (diff) |
util: move min/max/clamp macros to util macros.h
Although the vulkan drivers include mesa macros.h, for
radv I'd like to move away from that.
Reviewed-by: Nicolai Hähnle <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/macros.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index ed207d44a64..03a228b4474 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -660,19 +660,6 @@ INTERP_4F(GLfloat t, GLfloat dst[4], const GLfloat out[4], const GLfloat in[4]) -/** Clamp X to [MIN,MAX] */ -#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) ) - -/** Minimum of two values: */ -#define MIN2( A, B ) ( (A)<(B) ? (A) : (B) ) - -/** Maximum of two values: */ -#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) - -/** Minimum and maximum of three values: */ -#define MIN3( A, B, C ) ((A) < (B) ? MIN2(A, C) : MIN2(B, C)) -#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C)) - static inline unsigned minify(unsigned value, unsigned levels) { |