r200: fix some cube map issues
[mesa.git] / src / mesa / drivers / dri / savage / savagespan.h
index cb3a1b52fd7efed677533857e3325a4aaa7ab407..53a7f8b97c8679a62960735e93cfe8fda807c4d6 100644 (file)
 #ifndef _SAVAGE_SPAN_H
 #define _SAVAGE_SPAN_H
 
+#include "drirenderbuffer.h"
+
+
 extern void savageDDInitSpanFuncs( GLcontext *ctx );
 
+extern void
+savageSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis,
+                       GLboolean float_depth);
+
+
 /*
  * Savage 16-bit float depth format with zExpOffset=16:
  *   4 bit unsigned exponent, 12 bit mantissa
@@ -47,7 +55,7 @@ extern void savageDDInitSpanFuncs( GLcontext *ctx );
  *
  * Note that there is no encoding for numbers < 2^-16.
  */
-static __inline GLuint savageEncodeFloat16( GLdouble x )
+static INLINE GLuint savageEncodeFloat16( GLdouble x )
 {
     GLint r = (GLint)(x * 0x10000000);
     GLint exp = 0;
@@ -59,7 +67,7 @@ static __inline GLuint savageEncodeFloat16( GLdouble x )
     }
     return exp > 0xf ? 0xffff : (r - 0x1000) | (exp << 12);
 }
-static __inline GLdouble savageDecodeFloat16( GLuint x )
+static INLINE GLdouble savageDecodeFloat16( GLuint x )
 {
     static const GLdouble pow2[16] = {
        1.0/(1<<28), 1.0/(1<<27), 1.0/(1<<26), 1.0/(1<<25),
@@ -84,7 +92,7 @@ static __inline GLdouble savageDecodeFloat16( GLuint x )
  *
  * Details analogous to the 16-bit format.
  */
-static __inline GLuint savageEncodeFloat24( GLdouble x )
+static INLINE GLuint savageEncodeFloat24( GLdouble x )
 {
     int64_t r = (int64_t)(x * ((int64_t)1 << (19+32)));
     GLint exp = 0;
@@ -97,7 +105,7 @@ static __inline GLuint savageEncodeFloat24( GLdouble x )
     return exp > 0x1f ? 0xffffff : (r - 0x80000) | (exp << 19);
 }
 #define _1 (int64_t)1
-static __inline GLdouble savageDecodeFloat24( GLuint x )
+static INLINE GLdouble savageDecodeFloat24( GLuint x )
 {
     static const GLdouble pow2[32] = {
        1.0/(_1<<51), 1.0/(_1<<50), 1.0/(_1<<49), 1.0/(_1<<48),
@@ -125,4 +133,5 @@ static __inline GLdouble savageDecodeFloat24( GLuint x )
 }
 #undef _1
 
+
 #endif