-/* $Id: svgamesa24.c,v 1.4 2000/01/25 00:03:02 brianp Exp $ */
+/* $Id: svgamesa24.c,v 1.5 2000/01/25 20:21:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
#if 0
+/* this doesn't compile with GCC on RedHat 6.1 */
static inline int RGB2BGR24(int c)
{
asm("rorw $8, %0\n"
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)
-/* $Id: svgamesa32.c,v 1.4 2000/01/25 00:03:02 brianp Exp $ */
+/* $Id: svgamesa32.c,v 1.5 2000/01/25 20:21:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
#include "svgamesa32.h"
#if 0
+/* this doesn't compile with GCC on RedHat 6.1 */
static inline int RGB2BGR32(int c)
{
asm("rorw $8, %0\n"
return c;
}
#else
-static int RGB2BGR32(int c)
+static unsigned long RGB2BGR32(unsigned long color)
{
- /* XXX this isn't right */
- return c;
+ return (color & 0xff00)|(color>>16)|((color & 0xff)<<16);
}
#endif