Add two aliases for some PointParameters entrypoints for libglx compatibility.
[mesa.git] / src / glx / x11 / pixel.c
index b279a8d73da864c8b2cfd8f2e63aa418169e437a..3b3a1811abb9d84a26cb31c4c0aab238d02be71b 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "packrender.h"
 
-static GLubyte MsbToLsbTable[256] = {
+static const GLubyte MsbToLsbTable[256] = {
     0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
     0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
     0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
@@ -71,11 +71,11 @@ static GLubyte MsbToLsbTable[256] = {
     0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
 };
 
-static GLubyte LowBitsMask[9] = {
+static const GLubyte LowBitsMask[9] = {
     0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff,
 };
 
-static GLubyte HighBitsMask[9] = {
+static const GLubyte HighBitsMask[9] = {
     0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff,
 };
 
@@ -249,31 +249,12 @@ void __glFillImage(__GLXcontext *gc, GLint dim, GLint width, GLint height,
 
     /* Setup store modes that describe what we just did */
     if (modes) {
-       if (dim == 3) {
-           GLubyte *pc = modes;
-           __GLX_PUT_CHAR(0,GL_FALSE);
-           __GLX_PUT_CHAR(1,GL_FALSE);
-           __GLX_PUT_CHAR(2,0);
-           __GLX_PUT_CHAR(3,0);
-           __GLX_PUT_LONG(4,0);
-           __GLX_PUT_LONG(8,0);
-           __GLX_PUT_LONG(12,0);
-           __GLX_PUT_LONG(16,0);
-           __GLX_PUT_LONG(20,0);
-           __GLX_PUT_LONG(24,0);
-           __GLX_PUT_LONG(28,0);
-           __GLX_PUT_LONG(32,1);
-       } else {
-           GLubyte *pc = modes;
-           __GLX_PUT_CHAR(0,GL_FALSE);
-           __GLX_PUT_CHAR(1,GL_FALSE);
-           __GLX_PUT_CHAR(2,0);
-           __GLX_PUT_CHAR(3,0);
-           __GLX_PUT_LONG(4,0);
-           __GLX_PUT_LONG(8,0);
-           __GLX_PUT_LONG(12,0);
-           __GLX_PUT_LONG(16,1);
-       }
+       if ( dim < 3 ) {
+         (void) memcpy( modes, __glXDefaultPixelStore + 4, 20 );
+       }
+       else {
+         (void) memcpy( modes, __glXDefaultPixelStore + 0, 36 );
+       }
     }
 }