fix GL_BACK color material bug
[mesa.git] / src / mesa / drivers / svga / svgamesa24.c
index 152779bf1275288a46c210549cddf180008de530..6f7cc9c2214017ef6d4af86424bf4c90a0a57630 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: svgamesa24.c,v 1.4 2000/01/25 00:03:02 brianp Exp $ */
+/* $Id: svgamesa24.c,v 1.7 2000/06/14 21:59:07 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
  * Additional authors:  Slawomir Szczyrba <steev@hot.pl>  (Mesa 3.2)
  */
 
+#ifdef HAVE_CONFIG_H
+#include "conf.h"
+#endif
+
 #ifdef SVGA
 
 #include "svgapix.h"
@@ -34,6 +38,7 @@
 
 
 #if 0
+/* this doesn't compile with GCC on RedHat 6.1 */
 static inline int RGB2BGR24(int c)
 {
        asm("rorw  $8, %0\n"     
@@ -44,13 +49,10 @@ static inline int RGB2BGR24(int c)
     return c;
 }
 #else
-static int RGB2BGR24(int c)
+static unsigned long RGB2BGR24(unsigned long color)
 {
-   /* XXX this isn't right */
-   return c;
+   return (color & 0xff00)|(color>>16)|((color & 0xff)<<16);
 }
-
-
 #endif
 
 static void __svga_drawpixel24(int x, int y, GLubyte r, GLubyte g, GLubyte b)
@@ -231,4 +233,14 @@ void __read_rgba_pixels24( const GLcontext *ctx,
    }
 }
 
+#else
+
+
+/* silence compiler warning */
+extern void _mesa_svga24_dummy_function(void);
+void _mesa_svga24_dummy_function(void)
+{
+}
+
+
 #endif